uphold/uphold-sdk-javascript

Name: uphold-sdk-javascript

Owner: Uphold

Description: Uphold SDK for JavaScript

Created: 2017-05-18 10:14:57.0

Updated: 2018-05-22 17:28:15.0

Pushed: 2018-05-22 17:28:14.0

Homepage: https://uphold.github.io/uphold-sdk-javascript

Size: 1075

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Uphold SDK for JavaScript

This SDK is built on top of the Uphold API and it's designed to help developers integrate Uphold services into their applications, by making it easier for them to interact with the API in a clean and controlled manner.

It provides developers the facilities to handle authentication, requests, pagination and error handling.

Documentation

Please consult the documentation website for a more detailed specification of the SDK and its modules:

Supported platforms

This SDK can be used on both browser and Node.js environments.

There are no major dependencies other than the fact that it uses the Fetch API to perform network requests, which some browsers do not yet support.

However, you can easily cover your bases by adding a polyfill. If this is a solution you are not comfortable with then please consult the Client documentation and follow the instructions on how to override it.

Usage

In this section we feature a simple usage example:

rt SDK from '@uphold/uphold-sdk-javascript';

t sdk = new SDK({
ientId: 'foo',
ientSecret: 'bar'


authorize('code')
hen(() => sdk.getMe())
hen(user => {
console.log(user);
;
Options

Below you can consult the list of available options you can pass to the SDK constructor:

| Key | Required | Default | Description | |:——————|:———|:————————-|:————————————–| | accessTokenKey | No | uphold.access_token | Key used to store the access_token | | baseUrl | No | https://api.uphold.com | Uphold API's url | | clientId | Yes | | Your client id | | clientSecret | Yes | | Your client secret | | itemsPerPage | No | 10 | Pagination size | | refreshTokenKey | No | uphold.refresh_token | Key used to store the refresh_token | | version | No | v0 | Uphold API's version |

Installation

To install the SDK just type into your terminal:

m install @uphold/uphold-sdk-javascript

Or, if you're using yarn:

rn add @uphold/uphold-sdk-javascript
Feedback, bugs & contributions

Contributions are welcome, consult the guidelines for contributing for instructions.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.