@musora/services
v0.1.4
Published
HTTP request modules for all Musora back-end services
Downloads
7
Keywords
Readme
js-services - @musora/services
HTTP request modules for all Musora back-end services
Installation
Yarn
yard add @musora/services
NPM
npm install @musora/services --save
Usage
Configure the Instance
When your app starts up, you can call the configue
method below to configure your current
request instance with some defaults, like the base url and the users authentication token.
import { configure } from '@musora/services';
configure({
baseUrl: 'https://drumeo.com/laravel/public',
contentType: 'application/json',
accept: 'application/json',
authToken: '...'
});
Entire Module
import Services from '@musora/services';
Services.Railcontent.getContent(...);
Individual Module
import { Railcontent } from '@musora/services';
Railcontent.getContent(...);
Individual Function
import { getContent } from '@musora/services';
getContent(...);
Local Development
yarn test
- Run all testsyarn docs
- Auto generate documentation