Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
interfaces
APIError.ts
AuthAPIClient.ts
Constants.ts move timeout into constant Jul 25, 2017
DataAPIClient.ts
README.md

README.md

Classes

AuthAPIClient
DataAPIClient

AuthAPIClient

This class is responsible for performing authentication with TrueLayer

new AuthAPIClient()

Class is responsible for performing authentication with TrueLayer

new AuthAPIClient(options)

Creates an instance of AuthAPIClient. If no constructor options are passed then look for environment variables by default.

Param Type
options IOptions

authAPIClient.getAuthUrl(redirectURI, scope, nonce, [state], [enableMock]) ⇒ string

Builds a correctly formatted authentication url

Kind: instance method of AuthAPIClient

Param Type
redirectURI string
scope Array.<string>
nonce string
[responseMode] string
[state] string
[enableMock] boolean

authAPIClient.exchangeCodeForToken(redirectURI, code) ⇒ Promise.<IToken>

Exchanges an auth code for an access token

Kind: instance method of AuthAPIClient

Param Type
redirectURI string
code string

authAPIClient.refreshAccessToken(refreshToken) ⇒ Promise.<IToken>

Exchanges a refresh token for a fresh access token

Kind: instance method of AuthAPIClient

Param Type
refreshToken string


DataAPIClient

Class responsible for calling to the Data endpoints

DataAPIClient.callAPI(accessToken, path, [qs]) ⇒ Promise.<IResponse.<T>>

Generic API calling function

Kind: static method of DataAPIClient
Template: T

Param Type
accessToken string
path string
[qs] object

DataAPIClient.getMe(accessToken) ⇒ Promise.<IResponse.<IMe>>

Call to /me API.

Kind: static method of DataAPIClient

Param Type
accessToken string

DataAPIClient.getInfo(accessToken) ⇒ Promise.<IResponse.<IInfo>>

Call to /info API.

Kind: static method of DataAPIClient

Param Type
accessToken string

DataAPIClient.getAccounts(accessToken) ⇒ Promise.<IResponse.<IAccount>>

Call to /accounts API.

Kind: static method of DataAPIClient

Param Type
accessToken string

DataAPIClient.getAccount(accessToken, accountId) ⇒ Promise.<IResponse.<IAccount>>

Call to /accounts/account_id API.

Kind: static method of DataAPIClient

Param Type
accessToken string
accountId string

DataAPIClient.getTransactions(accessToken, accountId, from, to) ⇒ Promise.<IResponse.<ITransaction>>

Call to /accounts/account_id/transactions API

Date format expected: YYYY-MM-DD

Kind: static method of DataAPIClient

Param Type
accessToken string
accountId string
from string format: YYYY-MM-DD
to string format: YYYY-MM-DD

DataAPIClient.getBalance(accessToken, accountId) ⇒ Promise.<IResponse.<IBalance>>

Call to /accounts/account_id/balance API

Kind: static method of DataAPIClient

Param Type
accessToken string
accountId string

DataAPIClient.validateToken(accessToken) ⇒ boolean

Returns whether the token has expired or not

Kind: static method of DataAPIClient

Param Type
accessToken string
You can’t perform that action at this time.