3.2.0 • Published 6 years ago

crest-client v3.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Crest Client

A starter for creating your own typescript client module for a Crest Compliant Server.

  1. Update package.json => change the package name to a private-scoped module
  2. Update package.json => change the git url
  3. Get the packages: npm install
  4. Build your client npm run down path/to/crest/server
  5. Publish your client: npm login, npm publish

down will add the routes to the module.

Usage:

#In your client project:
npm login #Provide your user credentials.
npm install @myproject/crest-client --save
import { APIClient, MessageCategoryClass } from '@myproject/crest-client';

//TODO show how to implement this as APIService in an Angular project
//TODO provide clarification on httpMechansim and storageMechanism

let apiClient = new APIClient("http://localhost:3000", httpMechanism, storageMechanism);
let resultObservable<GetOutput<MessageCategoryClass.GetOutput>> = await apiClient.do('@/message/category', Method.GET, {

});
resultObservable.subscribe(messageCats => {
    messageCats.list.forEach(cat => {
        console.log(cat.name);
    });
    let idToFind = 10;
    console.log('this is the entire MessageCategoryClass.GetOutput which has id 10', messageCats.index[10]);
})
3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.2.1

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago