2.10.8 • Published 3 years ago

sparkworks-cargo-client v2.10.8

Weekly downloads
18
License
-
Repository
-
Last release
3 years ago

Cargo Client

Build Status

This library acts as a client for SparkWorks CaRGO. The library is designed to be used inside an Angular application.

install

$ npm install -g sparkworks-cargo-client

usage

To use the library simply add in your tsconfig.json the following setting:

  {
      "compilerOptions": {
        ...
      },
      "include": [
        "./src",
        "./node_modules/sparkworks-cargo-client/"
      ]
  }

importing in angular

To use the library import it in your Angular service/module using the following in app.module.ts

    import {DataService as HistoryService, PhenomenonDTO, PhenomenonService, ResourceDTO, ResourceService} from 'sparkworks-cargo-client';
    import {ApiModule, Configuration} from 'sparkworks-cargo-client';
    
    @NgModule({
      declarations: [
        ...
      ],
      imports: [
        ApiModule,
      ],
      providers: [
        OAuthGuard,
        LoggedInGuard,
        {
          provide: Configuration,
          useFactory: (oauthService: OAuthService) => new Configuration({
            basePath: environment.sparkworksapiurl,
            accessToken: oauthService.getAccessToken()
          }),
          deps: [OAuthService],
          multi: false 
        },
        MessagingService,
        CookieService
      ],
      ...
    })
2.10.8

3 years ago

2.10.7

3 years ago

2.10.6

4 years ago

2.10.5

4 years ago

2.10.4

4 years ago

2.10.1

4 years ago

2.7.1

4 years ago

2.8.3

4 years ago

2.8.5

4 years ago

2.8.4

4 years ago

2.10.3

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago