Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@orbis-systems/orbis-api-client

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbis-systems/orbis-api-client

This library comes comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

  • 2.1.6
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
3
Weekly downloads
 
Created
Source

This is in early development and is not ready for implementation.

This library comes comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Installation

npm i -s @orbis-systems/orbis-api-client

Inclusion

Node
require("babel-core/register");
require("babel-polyfill");

const APIClient = require("@orbis-systems/orbis-api-client");

or

require("babel-core/register");
require("babel-polyfill");

import APIClient from '@orbis-systems/orbis-api-client';
Browser
<script src="browser-bundle.js"></script>

Usage

Node
const config = {
   base_url: 'https://example.com/', //Obtained from Orbis
   auth_url: 'https://example.com/'
};

(async () => 
{
    let client = new APIClient(config);
    await client.login('username', 'password');
});
Browser
const config = {
   base_url: 'https://example.com/', //Obtained from Orbis
   auth_url: 'https://example.com/'
};

var client = new APIClient(config)
client.login('username', 'password');

Session Stores

By default, the session store will use LocalStorage. In the browser, LocalStorage will utilize localStorage, and in NodeJS it will store them in ./session.

You can create a custom session store by extending the SessionStore class. To use it, pass it as the session_store on the config like:

const config = {
   ...
   session_store: CustomStore,
   ...
};

You must implement the methods:

  • get(key)
  • set(key, value, expiration_in_minutes)
  • has(key) (Returns boolean. Should also return false if it has expired)

FAQs

Package last updated on 02 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc