Home Reference Source
import FablabsAPI from 'fablabsjs/src/index.js'
public class | source

FablabsAPI

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

auth: *

public

config: {...config: Object, ..._default_config: Object}

public

token: *

Method Summary

Public Methods
public

api(): Api

Get an instance of the API initialized with the current config and token

public

Get the authorization url for fablabs.io authorization code

public

async handleAuthCode(code: String): Object

Handle the authorization code obtained from the Authorization endpoint and request an Access token.

Public Constructors

public constructor() source

Public Members

public auth: * source

public config: {...config: Object, ..._default_config: Object} source

public token: * source

Public Methods

public api(): Api source

Get an instance of the API initialized with the current config and token

Return:

Api

public authorization_url(): * source

Get the authorization url for fablabs.io authorization code

Return:

*

string the authorization url

public async handleAuthCode(code: String): Object source

Handle the authorization code obtained from the Authorization endpoint and request an Access token.

Params:

NameTypeAttributeDescription
code String

Return:

Object