{"_id":"99voices_npm_profiles_client","_rev":"2-fa1688cc393fe05bc4c8f0002130d4ef","name":"99voices_npm_profiles_client","description":"A client for the profiles service","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"99voices_npm_profiles_client","version":"1.0.0","description":"A client for the profiles service","main":"dist/index.js","repository":{"type":"git","url":"https://github.com/designtesbrot/99voices_npm_profiles_client"},"author":{"name":"caspar.bauer0@gmail.com"},"license":"MIT","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1"},"scripts":{"start":"yarn install && ./node_modules/.bin/babel --watch --out-dir ./dist ./src"},"dependencies":{"swagger-client":"^3.4.3"},"_id":"99voices_npm_profiles_client@1.0.0","dist":{"shasum":"7bea23cbbdc5fac1bbe700e616059952991e3e00","tarball":"https://registry.npmjs.org/99voices_npm_profiles_client/-/99voices_npm_profiles_client-1.0.0.tgz","integrity":"sha512-VGykKSFwiUkBpqFuMXsaNXIYLLIsbDqBrQdqy9jCITi3WRTM6Fk3/tUs4PgtYVTrYpUa8Ex2IAGw2xA5wa0Heg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYZWAL0JLeVgKSKXFI7F7+04yiBCUuhLziazGGoLHkrwIhAOBp80rc3wfI3L74J0h8sIUSFz0pW1OH7MGTuhzwclkn"}]},"maintainers":[{"name":"designtesbrot","email":"caspar.bauer0@gmail.com"}],"_npmUser":{"name":"designtesbrot","email":"caspar.bauer0@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/99voices_npm_profiles_client-1.0.0.tgz_1514492328451_0.43131741834804416"}}},"readme":"# Profiles Client\n\nThis package contains a client for the profiles service. It is build on, and defacto returns an instance\nof [swagger-js](https://github.com/swagger-api/swagger-js). For an in depth Overview\nof the api of the object returned by this package, see the documentation\nof [swagger-js](https://github.com/swagger-api/swagger-js).\n\n## Development\n\nThis package is developed within a docker container. Run `scripts/run.sh` to obtain\nthe development environment. Run every yarn operation through the container like\n`docker exec -it ${container_id} yarn ...`. The container watches for file changes on the\nsources and automatically rebuilds the distribution code. Before running `yarn publish`\nbe sure to run `yarn login`.\n\n## Usage\n\nThis package contains and returns a singleton. Meaning that you can require the\nfile wherever you want to, and you will always obtain the same client instance.\nIn order for this to work it is vital that the client instance is first initialized.\nThis is an asynchronous process and done like this:\n\n```\nimport Config from '99voices_npm_config';\nimport Client from '99voices_npm_profiles_client';\n\nlet config = Config();\nconst token = \"x.y.z\"; // should be obtained via the 99voices_npm_authentication_client -> login\n\nconsole.log(config.get('RECORDINGS_CLIENT_SPEC_URL')) // 'http://tyk:8080/profiles/1.0.0/spec.yaml' => the url the client should fetch the spec from and will be build based on\n\nClient({config,token}).then( client => { ... }).catch( err => { ... })\n```\n\n### Initialization\n\nThis package uses the constructor of [swagger-js](https://github.com/swagger-api/swagger-js).\nThe constructor `Client({config, token, options, purge})` passes the `options` on to the\nswagger constructor. See [swagger-js](https://github.com/swagger-api/swagger-js) for\nan in depth overview of this object. The `purge` attribute can be set to `true` which\nforces to refetch the spec and rebuild the client, even if there is one already.\nAfter the client is initialized, this package will also patch its basePath for\ndirect use. It assumes that when the spec is at 'http://tyk:8080/profiles/1.0.0/spec.yaml',\nthe basePath of the API will be 'http://tyk:8080/profiles/1.0.0/'\n","maintainers":[{"name":"designtesbrot","email":"caspar.bauer0@gmail.com"}],"time":{"modified":"2022-06-12T14:09:01.063Z","created":"2017-12-28T20:18:49.675Z","1.0.0":"2017-12-28T20:18:49.675Z"},"repository":{"type":"git","url":"https://github.com/designtesbrot/99voices_npm_profiles_client"},"author":{"name":"caspar.bauer0@gmail.com"},"license":"MIT","readmeFilename":"README.md"}