babyloania-api-client

1.1.54 • Public • Published

Babyloania API Client

Service API Wrapper

Installation

$ npm install --save https://github.com/babyloania/api-client.git

How To Use

// Use default configuration
var config = {};
var babyloania = require("babyloania-api-client")(config);

// Auth Service methods
var Auth = babyloania.Auth;

// Post form login to retrieve user and token
Auth.login("arkka.d@gmail.com","12345", function(err, results){
	console.log("Get response from login endpoint")
	console.log(results);
}); 

For more sample, see https://github.com/babyloania/api-client-sandbox/

Configuration

Default package configuration, change whenever necessary.

// Default configuration
var config =
  {
      protocol: "http",
      hostname: "127.0.0.1",
      services: {
          auth: {
              endpoint: "auth",
              port: 3300
          },
          product: {
              endpoint: "products",
              port: 3400
          },
          customer: {
              endpoint: "customers",
              port: 3500
          },
          order: {
              endpoint: "orders",
              port: 3600
          }
      };

Readme

Keywords

none

Package Sidebar

Install

npm i babyloania-api-client

Weekly Downloads

4

Version

1.1.54

License

ISC

Last publish

Collaborators

  • arkka