This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@op/api-sdk

1.1.1 • Public • Published

op-api-javascript-sdk

Build Status

Description

Simple universal SDK for easy consumption of OP APIs.

Installation

npm install @op/api-sdk

Usage

import SDK from "@op/api-sdk";

const options = {
    headers: {
        'x-api-key': 'your-api-key',
    }
}

const client = new SDK.Client(options)

See requests for required headers.

You can set request options for client instance, and also for each request function call, which is useful because you can then use global instance of SDK client, with globally defined x-api-key, but still give separate x-authorization header for each user:

const userOptions = {
    headers: {
        'x-authorization': userSession.getAuthorizationKey({bank: "OP"})
    }
}

const accounts = await client.getAllAccounts(userOptions);

For further reading, please see our API documentation

Developing

Running tests

Dependencies (3)

Dev Dependencies (7)

Package Sidebar

Install

npm i @op/api-sdk

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

64.1 kB

Total Files

32

Last publish

Collaborators

  • op