{"_id":"@brainspore/transport","_rev":"9-c2674ec2dc570d2bddd9dc9c0dc4fada","name":"@brainspore/transport","description":"network transport services utility lightweight library","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.4":{"name":"@brainspore/transport","version":"0.0.4","keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"author":{"name":"Paullaster Okoth"},"license":"MIT","_id":"@brainspore/transport@0.0.4","homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"dist":{"shasum":"07630237fd07067f0f846f7b834d4eab3d4a1131","tarball":"https://registry.npmjs.org/@brainspore/transport/-/transport-0.0.4.tgz","fileCount":12,"integrity":"sha512-zn/Pa5s5qL3ut55yYsmPVPhRrxu49HrwYDKku7y/MwDU1e8Z052Re9bLwNRHEANjF6ykmGdu9dBOS9nVmXlW4g==","signatures":[{"sig":"MEUCIQCZ8yxedgsz3BZy8JXwsvQNZ8gKK0GVgaXntXww7v8VgQIgGOytXPlNfxY+QWWLu0HnJQInM7aURvz/ASncLce/MoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6959},"main":"index.js","type":"module","gitHead":"ea026ae6419e9fc8edf756172a4c25abaa3c4bc6","scripts":{"test":"jest"},"_npmUser":{"name":"paullaster","email":"paullasterokoth98@gmail.com"},"repository":{"url":"git+https://github.com/BrainSporeLLC/network-transporter.git","type":"git"},"_npmVersion":"10.2.4","description":"network transport services utility lightweight library","directories":{},"_nodeVersion":"21.6.2","dependencies":{"axios":"^1.7.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport_0.0.4_1718982404775_0.7914344532918316","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@brainspore/transport","version":"0.0.5","keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"author":{"name":"Paullaster Okoth"},"license":"MIT","_id":"@brainspore/transport@0.0.5","homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"dist":{"shasum":"66eb940a48ab184711a3953f90d10f741c8faa07","tarball":"https://registry.npmjs.org/@brainspore/transport/-/transport-0.0.5.tgz","fileCount":12,"integrity":"sha512-tJyAdtGW21JtGHakJNpNNfr1hHYAJMO8znswOTQQ/u+ckokxBLNOfEikLO4HPtafe1OPjV9Fzwjyp7bYgDUKmg==","signatures":[{"sig":"MEYCIQDafQhu4epemhssvovWHdtGtX9o19rwfc6WUL79vKdg0wIhAJ5DRqGup+D+fQXNYXuMnk2AXBSz1pyxtYBszTvLU1Lc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6870},"main":"index.js","type":"module","gitHead":"f018305845cc43dfbbc7557ff6541051b1b1ad70","scripts":{"test":"jest"},"_npmUser":{"name":"paullaster","email":"paullasterokoth98@gmail.com"},"repository":{"url":"git+https://github.com/BrainSporeLLC/network-transporter.git","type":"git"},"_npmVersion":"10.2.4","description":"network transport services utility lightweight library","directories":{},"_nodeVersion":"21.6.2","dependencies":{"axios":"^1.7.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport_0.0.5_1719000362123_0.16939382344175247","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@brainspore/transport","version":"0.0.6","keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"author":{"name":"Paullaster Okoth"},"license":"MIT","_id":"@brainspore/transport@0.0.6","homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"dist":{"shasum":"cbcc3f4f444b9c7c7e73790c9c2816c296babec8","tarball":"https://registry.npmjs.org/@brainspore/transport/-/transport-0.0.6.tgz","fileCount":12,"integrity":"sha512-rdRmVQieaeD0rSnnaUZwtVMALwK0nPnK2XBRkiKmhLNBIvcObuZDJZw7Y4eeWN2aMt8NLl5mmxqak7thgCSFSw==","signatures":[{"sig":"MEUCIFAkR0zsz7YCakOijZ5acueM2DspuU4FNDbB/OJhBhjxAiEA3kL8JnHnuxLh4Uk6sAWx6igIFPi1L721fPjRN4mOkrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6928},"main":"index.js","type":"module","gitHead":"3d178cfbf53aa0443fa5d7d52b9f1333d38b8be0","scripts":{"test":"jest"},"_npmUser":{"name":"paullaster","email":"paullasterokoth98@gmail.com"},"repository":{"url":"git+https://github.com/BrainSporeLLC/network-transporter.git","type":"git"},"_npmVersion":"10.2.4","description":"network transport services utility lightweight library","directories":{},"_nodeVersion":"21.6.2","dependencies":{"axios":"^1.7.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport_0.0.6_1719004757059_0.7108030099660574","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"@brainspore/transport","version":"0.0.7","keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"author":{"name":"Paullaster Okoth"},"license":"MIT","_id":"@brainspore/transport@0.0.7","homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"dist":{"shasum":"4c9fbd870887c1b8179053019d23717b1fe17461","tarball":"https://registry.npmjs.org/@brainspore/transport/-/transport-0.0.7.tgz","fileCount":12,"integrity":"sha512-44Pboi5wUcDt2jJ3bDONyxDHrJWnqmOozoocsjVvI3Vrlcps5Uy3znMkaaCJ6bQblp2Pja75k14lZENM+Mh2XQ==","signatures":[{"sig":"MEYCIQDj/dhji2lTWJxKmBp82DDye59/qrGbWf0cqOicDde68AIhAJmHnvkvawE80Lh1OjcCQm4K3ODMR3b9tgzMnYpLVnHq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6920},"main":"index.js","type":"module","gitHead":"00e268d0c5b61e1da77e76a031a9389fbaf2d20d","scripts":{"test":"jest"},"_npmUser":{"name":"paullaster","email":"paullasterokoth98@gmail.com"},"repository":{"url":"git+https://github.com/BrainSporeLLC/network-transporter.git","type":"git"},"_npmVersion":"10.2.4","description":"network transport services utility lightweight library","directories":{},"_nodeVersion":"21.6.2","dependencies":{"axios":"^1.7.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport_0.0.7_1719006213470_0.44333943034836","host":"s3://npm-registry-packages"}},"0.0.8":{"name":"@brainspore/transport","version":"0.0.8","description":"network transport services utility lightweight library","main":"index.js","type":"module","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/BrainSporeLLC/network-transporter.git"},"keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"author":{"name":"Paullaster Okoth"},"license":"MIT","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","dependencies":{"axios":"^1.7.2"},"_id":"@brainspore/transport@0.0.8","gitHead":"997541482f0493b399ca68fba4b1f90047c1a745","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-+yqwWawW45UGk0DhvNGI5VwF0jkBIklcp0MYNb3Xb+hYv03CbXEVdA8XBNS6TWYAMBXdDsU1AKLdP/+rXfShDA==","shasum":"2db62bbf905a24a3f1323fbae5e1d50c1275ecb2","tarball":"https://registry.npmjs.org/@brainspore/transport/-/transport-0.0.8.tgz","fileCount":12,"unpackedSize":6947,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGbfAtJ+7NbiiszDcmmyjrB186ElfrbtytaclCHMIQb7AiBqFvJwU/H+6Krype6Ht10hvJ0rFDA2U4RyAoRmbIXyCg=="}]},"_npmUser":{"name":"paullaster","email":"paullasterokoth98@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/transport_0.0.8_1719006593311_0.9267853966167856"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-21T15:06:44.678Z","modified":"2024-06-21T21:49:53.655Z","0.0.1":"2024-06-21T14:59:02.316Z","0.0.4":"2024-06-21T15:06:44.957Z","0.0.5":"2024-06-21T20:06:02.299Z","0.0.6":"2024-06-21T21:19:17.199Z","0.0.7":"2024-06-21T21:43:33.640Z","0.0.8":"2024-06-21T21:49:53.476Z"},"maintainers":[{"name":"paullaster","email":"paullasterokoth98@gmail.com"}],"author":{"name":"Paullaster Okoth"},"repository":{"type":"git","url":"git+https://github.com/BrainSporeLLC/network-transporter.git"},"keywords":["axios","js","node.js","react.js","vue.js","fetch","socket","socket.io"],"license":"MIT","homepage":"https://github.com/BrainSporeLLC/network-transporter#readme","bugs":{"url":"https://github.com/BrainSporeLLC/network-transporter/issues"},"readme":"# Network-transporter\n\nA lightweight network communication utility library\n\n- From Web services communication to real time communication to remote procedure calls, we got your back.\n\nThis utility library brings you a plug and play implementation to all known communication services inluding;\n\n`RESTful Clients` <a href=\"https://en.wikipedia.org/wiki/REST\">RESTful APIs</a>\n\n`WebSockets` <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API\">WebSockets API</a>\n\n`WebRTC` <a href=\"https://webrtc.org/\">Read about WebRTC</a>\n\n`SOAP` <a href=\"https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm\">SOAP API Developer Guide</a>\n\n`Message Ques` <a href=\"https://aws.amazon.com/message-queue/#:~:text=Message%20Queues&text=A%20message%20queue%20is%20a,once%2C%20by%20a%20single%20consumer.\">Message Ques</a>\n\n`SignalIR` <a href=\"https://dotnet.microsoft.com/en-us/apps/aspnet/signalr\">SignalIR</a>\n\n`graphQL` <a href=\"https://graphql.org/learn/\">GraphQl</a>\n\n`gRPC` <a href=\"https://grpc.io/docs/\">gRPC</a>\n\n`RPC` <a href=\"https://solana.com/docs/rpc\">RPC</a>\n\n### Installation\nTo install this utility\nrun\n\n```bash \nnpm i @brainspore/transport\n```\n\n### How to use this utility\n\n#### RESTful API\n1. Axios example\n\n```js\n// auth.js\nexport class AuthService {\n    #token;\n    #user;\n    /*\n    *isAuthenticated: boolean\n    */\n\n   //If you don't call this method isAuthenticated, you must give it this alias how you\n    //prefer\n    isAuthenticated() {\n        return true;\n    }\n    //If you don't call this method getToken, you must give it this alias how you\n    //prefer\n    getToken() {  \n        return this.#token;\n    }\n    //If you don't call this method logout, you must give it this alias how you\n    //prefer\n    async logout() {\n        session.clear();\n    }\n}\n// Util Index file for API service calls\n// index.js\n import { Request } from \"@bs/transport\";\n import {apiBaseUrl} from \"@environment\" //update this path to point to your environment file\n import {AuthService} from \"auth.js\";\n\n export _request = new Request(new AuthService(), apiBaseUrl);\n\n//OR\n\nexport _request = new Request(new AuthService(), apiBaseUrl, { timeout: 5000 });\n\n// You can now import _request to any of your file.\n\n// Using _request in your file\n// customer.js\nconst postCustomer = (payload) => {\n    // start loader for UX\n    // This method is async. Supports both async and async and Promise \n    _request.axiosRequest({\n        url: 'customer',\n        method: 'POST',\n        data: payload,\n    })\n    .then((response) =>{\n        console.log(response);\n    })\n    .catch((err) =>{});\n}\n\n// Example of How environment file can look like:\n// environment/index.js\nexport {\napiBaseUrl\n} = process.env\n\n```\n","readmeFilename":"README.md"}