{"_id":"360-lib","name":"360-lib","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"360-lib","version":"1.0.0","description":"### Building","main":"index.js","scripts":{"ng":"ng","start":"ng serve","build":"ng build","watch":"ng build --watch --configuration development","test":"ng test"},"author":"","license":"ISC","dependencies":{"@angular/cli":"^13.3.5"},"_id":"360-lib@1.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-1szwURHG2BAcO/eOIh6+z/a4c2Omv9n98QNG8Q+yUbAEOnvr7WU3Lle0tCTtZhCpYdepqYBArdRWFiMExIR6ug==","shasum":"520bba7a8e3022aca486e59b2fb5452fa2daaae2","tarball":"https://registry.npmjs.org/360-lib/-/360-lib-1.0.0.tgz","fileCount":143,"unpackedSize":558366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVuURx6IASt441kJejYvauI6KhmvsMudHswCcJsWkybAiB/Mzh9Dslzqd0C9/BgEWDq+i64KMDKD9qw/PR98eAqEQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJighjmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNfQ/5AT81rzSrU0updV9rl97c0agwtRERLxcU5mUxOwgmOXCvL0+o\r\n423eO83clRKIuZu62ylV2fuE3H57zMH7v8BPHOTrNNQ6/ehFmATv1qGRkhvp\r\n0gO/DBayYqojSktYRC1CABCmf/vtuBSS7jEb7AD0kQXyO0h5iERjbRBXWbVR\r\nl8x3clvEHxJEbkNQhpHvOrkc0N73J5Eibssy0Usy7oSUO3T+7SMXnbF6+A3S\r\nVNXHG7C18UYd3IGhzfJQtjdFBE61dB2D6UYK9WcOOPvnpyaV2EeU6IbsjH7V\r\nuSh13CKo/In2+gCEDy60nPKOK9gXA90maN9lqn9HzJbDKHDwCXmDY5DsFWAU\r\nz7HtLgEZ6/1+ENp+Z56+AP/ZN/fXHVEdCCm/BLKbNr6ioLMNMTuWoGo0qNH1\r\n4whL8q3AAR6o+s28Tyi8uoF/HRjlpifZEZljR1StuTFR2I+XadKHEv+X6t19\r\n2pUW4qXDKSVCORb9Lroe7HDk0yJ+zpkkQri1c0bu0FTnrTL8tt44bgQjCGsY\r\nE0kVY7QLm99Mnv18NSBUiQc8MUSI9+rf2+/qdOqxSQStsHQryuchIsSHeZUT\r\nAIignfnndztVd3AjthqL22Vz9Bcarn+9h6ZMo8te9rCJM5yo9Jy6yMtpG5hl\r\nLFfUOrBn5YQA1PeekuIGLIUYnBktpXT8rIY=\r\n=oVL/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"hlechelle","email":"lechelle.heloise@gmail.com"},"directories":{},"maintainers":[{"name":"hlechelle","email":"lechelle.heloise@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/360-lib_1.0.0_1652693222296_0.32615747445117527"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-16T09:27:02.295Z","1.0.0":"2022-05-16T09:27:02.483Z","modified":"2022-05-16T09:27:02.609Z"},"maintainers":[{"name":"hlechelle","email":"lechelle.heloise@gmail.com"}],"description":"### Building","license":"ISC","readme":"## @\n\n### Building\n\nTo install the required dependencies and to build the typescript sources run:\n```\nnpm install\nnpm run build\n```\n\n### publishing\n\nFirst build the package than run ```npm publish```\n\n### consuming\n\nNavigate to the folder of your consuming project and run one of next commands.\n\n_published:_\n\n```\nnpm install @ --save\n```\n\n_without publishing (not recommended):_\n\n```\nnpm install PATH_TO_GENERATED_PACKAGE --save\n```\n\n_using `npm link`:_\n\nIn PATH_TO_GENERATED_PACKAGE:\n```\nnpm link\n```\n\nIn your project:\n```\nnpm link \n```\n\n__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.\nPlease refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround.\nPublished packages are not effected by this issue.\n\n\n#### General usage\n\nIn your Angular project:\n\n\n```\n// without configuring providers\nimport { ApiModule } from '';\nimport { HttpClientModule } from '@angular/common/http';\n\n\n@NgModule({\n    imports: [\n        ApiModule,\n        // make sure to import the HttpClientModule in the AppModule only,\n        // see https://github.com/angular/angular/issues/20575\n        HttpClientModule\n    ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\n// configuring providers\nimport { ApiModule, Configuration, ConfigurationParameters } from '';\n\nexport function apiConfigFactory (): Configuration => {\n  const params: ConfigurationParameters = {\n    // set configuration parameters here.\n  }\n  return new Configuration(params);\n}\n\n@NgModule({\n    imports: [ ApiModule.forRoot(apiConfigFactory) ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\nimport { DefaultApi } from '';\n\nexport class AppComponent {\n\t constructor(private apiGateway: DefaultApi) { }\n}\n```\n\nNote: The ApiModule is restricted to being instantiated once app wide.\nThis is to ensure that all services are treated as singletons.\n\n#### Using multiple swagger files / APIs / ApiModules\nIn order to use multiple `ApiModules` generated from different swagger files,\nyou can create an alias name when importing the modules\nin order to avoid naming conflicts:\n```\nimport { ApiModule } from 'my-api-path';\nimport { ApiModule as OtherApiModule } from 'my-other-api-path';\nimport { HttpClientModule } from '@angular/common/http';\n\n\n@NgModule({\n  imports: [\n    ApiModule,\n    OtherApiModule,\n    // make sure to import the HttpClientModule in the AppModule only,\n    // see https://github.com/angular/angular/issues/20575\n    HttpClientModule\n  ]\n})\nexport class AppModule {\n\n}\n```\n\n\n### Set service base path\nIf different than the generated base path, during app bootstrap, you can provide the base path to your service. \n\n```\nimport { BASE_PATH } from '';\n\nbootstrap(AppComponent, [\n    { provide: BASE_PATH, useValue: 'https://your-web-service.com' },\n]);\n```\nor\n\n```\nimport { BASE_PATH } from '';\n\n@NgModule({\n    imports: [],\n    declarations: [ AppComponent ],\n    providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n\n#### Using @angular/cli\nFirst extend your `src/environments/*.ts` files by adding the corresponding base path:\n\n```\nexport const environment = {\n  production: false,\n  API_BASE_PATH: 'http://127.0.0.1:8080'\n};\n```\n\nIn the src/app/app.module.ts:\n```\nimport { BASE_PATH } from '';\nimport { environment } from '../environments/environment';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [ ],\n  providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { }\n```  ","readmeFilename":"README.md"}