1.0.7 • Published 3 years ago

infeed v1.0.7

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

Briefly plugin helper

Briefly provides a simple and comprehensive toolset for saving auth credentials and settings to Briefly for your Briefly plugins.


This library is available as an npm package. To install it run:

npm i infeed --save

Using Briefly

Briefly comes with a number of methods used to interact with the Briefly API.

getSettings

Used for fetching the settings and auth credentials for the given plugin

Example:

import { getSettings } from "infeed";

const connectionId = "this_is_my_briefly_plugin_id";
const token = "this_is_my_briefly_plugin_token";

const settings = await getSettings(connectionId, token);

console.log(settings);

configure

Used for saving settings and auth credentials to the Briefly API for the given plugin.

Example:

import { configure } from "infeed";

const connectionId = "this_is_my_briefly_plugin_id";
const token = "this_is_my_briefly_plugin_token";

const settings = {
    "accesstoken": "this_is_the_token_supplied_by_my_service",
    "propertyID": "1",
    "anotherCustomSetting": "some value"
};

configure(connectionId, token, settings);

Parameters

connectionId

Type: string

The id of your plugin, supplied to the plugin at mount by Briefly.

const connectionId = "12345678abcdefgh";

token

Type: string

An access token to Briefly for your plugin, supplied to the plugin at mount by Briefly.

const token = "abcdefghjiklmnopqrstuvxyz";

settings

Type: object

An object of the settings your plugin wishes to save to Briefly, structured as an object with each key-value pair being the data you wish to save.

const settings = {
    "accessToken": "abcdefg",
    "otherSetting": "some value"
};
1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

8 years ago