1.0.7 • Published 5 years ago

oracle-d-api v1.0.7

Weekly downloads
3
License
CC-BY-ND-4.0
Repository
github
Last release
5 years ago

Oracle-D API

If you want to use the Oracle-D API please apply for an API key at: https://api.oracle-d.com/v1

Licence

This package is licenced under CC BY-ND 4.0

Installation

npm i oracle-d-api --save

Usage

const OracleD = require("oracle-d-api");

let api = new OracleD.AccountAPI.API({api_key: "MY_SECRET_API_KEY"});

// request a new account

let newAccount = new OracleD.AccountAPI.Account({username:"mynewusername",email:"user.email@provider.com"});

api.requestAccount(newAccount).then(account => {
    console.log(account);
}).catch(e => {
     console.log(e)
});

let account = new OracleD.AccountAPI.Account({_id: "accountID"});

// get the accounts' status

api.getAccountStatus(account.data).then(account => {
    console.log(account)
}).catch(e => {
    console.log(e)
});

// get all requested accounts
api.getAccountList().then(data => {
    console.log(data)
});

// get information about my api key
api.getDappStatus().then(data => {
    console.log(data)
});

//The following methods do not require an api_key

// get a list of dapps which have access to the api

api.getDappStatus().then(data => {
    console.log(data)
});

// get a list of accounts created by a dapp

api.getDappAccountList(id).then(data => {
    console.log(data)
});
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago