0.1.4 • Published 6 years ago

@musora/services v0.1.4

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

js-services - @musora/services

HTTP request modules for all Musora back-end services

Build Status Coverage Status

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 tests
  • yarn docs - Auto generate documentation
0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago