Module: Twister

Twister singleton class descriping the state fo the Twister network.
Source:

Methods

(inner) doHashtagPosts(tag, cbfunc, querySettings)

Creates TwisterUser object if not a present in cache and return it.
Parameters:
Name Type Description
tag string
cbfunc function callback function. Gets called with an array of TwisterPost objects as parameter.
querySettings Object {@see getQuerySettings}
Source:

(inner) getAccount()

returns the TwisterAccount object for a given user. The user must already be loaded (except for the "guest" user). To load wallets from the server use loadServerAccounts.
Source:

(inner) getAccounts()

returns an array with all current TwisterAccount objects. To load wallets from the server use loadServerAccounts.
Source:

(inner) getPromotedPosts()

returns the TwisterPromotedPosts object.
Source:

(inner) getUser(username)

Creates TwisterUser object if not a present in cache and return it.
Parameters:
Name Type Description
username string
Source:

(inner) getUser(username)

Creates TwisterUser object if not a present in cache and return it.
Parameters:
Name Type Description
username string
Source:

(inner) init()

Parameters:
Name Type Description
options.host string endpoint for JSON-RPC queries used by default
options.timeout int timeout for JSON-RPC in milliseconds
options.errorfunc function called when JSON-RPC error occurs
options.verifySignatures bool possible options are "none","instant" and "background". Default is "background"
options.querySettingsByType bool
options.maxDHTQueries bool
Source:

(inner) loadAccounts()

loads available account into the wallet.
Source:

(inner) serializeCache()

Reloads the cache from a flattened cache object
Source:

(inner) serializeCache()

Flattens the complete cache into a nested object which can be used to reload the cache later.
Source: