Methods

(inner) fetch(publicKey, Transaction)

Fetches a Post.

Parameters:
NameTypeDescription
publicKeyString

The public key of the Subscription.

TransactionString

The transaction Id of an already existing Subscription.

Example
const subscriptions = await NinaClient.Subscription.fetch("K8XJr7LHWJeJJARTvnsFZViqxBzyDSjsfpS6iBuWhrV");

(inner) fetchAll(paginationopt)

Fetches all Subscriptionss.

Parameters:
NameTypeAttributesDefaultDescription
paginationObject<optional>
{limit: 20, offset: 0, sort: 'desc'}

Pagination options.

Example
const subscriptions = await NinaClient.Subscription.fetchAll();

(inner) subscriptionSubscribe(client, subscribeToAccount, hubHandle) → {Object}

Parameters:
NameTypeDescription
clientObject

the NinaClient instance

subscribeToAccountString

the account to subscribe to

hubHandleString

the hub handle to subscribe to

Returns:

the subscription data

Type: 
Object

(inner) subscriptionUnsubscribe(client, unsubscribeAccount) → {Object}

Parameters:
NameTypeDescription
clientObject

the NinaClient instance

unsubscribeAccountString

the account to unsubscribe from

Returns:

the subscription data

Type: 
Object