Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Extension API

Thomas Greiner edited this page Mar 13, 2018 · 1 revision

You can find all APIs that the extension exposes to the outside in the "flattrAPI" module, which can be accessed by calling require("flattrAPI") in the context of the extension's background page.

Methods

dailyProcessing(lastProcessing)

Processes history items since given timestamp, which includes the submission of flattrs to the server.

Arguments

  • number lastProcessing – The UNIX timestamp of the last time processing was done.

setSubscription(subscription)

Changes the account's subscription state of the extension (see also Flattr API Authentication).

Arguments

  • Subscription|(null) subscription – The subscription state.
    • boolean active – Indicates if the subscription is active.

setToken(accessToken)

Changes the account credentials (see also Flattr API Authentication).

Arguments

  • string|(null) accessToken – The access token that corresponds to an authenticated account.
Clone this wiki locally