@mobie/mobie
Javascript sdk for mobie APIs
Last updated 5 months ago by dblaze47 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mobie/mobie 
SYNC missed versions from official npm registry.

Mobie Javascript SDK

About

This is the Javascript SDK for the Mobie API.

Installation

via NPM:

npm install @mobie/mobie

via CDN:

https://cdn.jsdelivr.net/npm/@mobie/mobie@{version_number}/build/mobie.min.js

or use the minified file in the build folder

Getting started

Client Side

Initialize the SDK with:

window.mobie = new Mobie(config);

or

const mobie = new Mobie(config);(NodeJS)

Your config object should contain:

  • storageMethod - Options are session for sessionStorage and local for localStorage

  • apiVersion - Default is 3 (Version 3 is the only currently supported version)

  • apiToken - Your Mobie API token

Example:

	var config = {
		apiVersion: 3, 
		storageMethod: "local",
		apiToken: "authenticationTokenHere"
	}

Server Side (NodeJS)

Initialize the sdk with: const mobie = new Mobie(config);

Your config object should contain:

  • apiVersion - Default is 3 (Version 3 is the only currently supported version)

  • apiToken - Your Mobie API token

Example:

	var config = {
		apiVersion: 3, 
		apiToken: "authenticationTokenHere"
	}

Custom API url

To use this SDK with a custom API url, your config object should contain customAPIURL

Example:

	var config = {
		...,
		customAPIURL: "https://whatever.stuff/
	}

Documentation and usage

For more detailed documentation and usage Docs.

License

MIT license.

Current Tags

  • 1.0.1                                ...           latest (5 months ago)

2 Versions

  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |