Git Product home page Git Product logo

uphold-sdk-javascript's Introduction

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:

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

const sdk = new SDK({
  clientId: 'foo',
  clientSecret: 'bar'
});

sdk.authorize('code')
  .then(() => sdk.getMe())
  .then(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:

$ npm install @uphold/uphold-sdk-javascript

Or, if you're using yarn:

$ yarn add @uphold/uphold-sdk-javascript

Feedback, bugs & contributions

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

License

MIT

uphold-sdk-javascript's People

Contributors

d-moreira avatar evq avatar hitmanmcc avatar pgom avatar ruipenso avatar ryanml avatar sandromachado avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.