On this page

## Methods

### (inner) fetch(publicKeyOrHandle, withAccountDataopt)

Fetches Releases Published, Releases Collected, Hubs collaborated on, Posts published, Exchanges made (open, completed, cancelled), and Releases with Revenue Share for an Account.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain accounts (Release, Hub, Post, Exchange).

Source
  - resources/accounts.js, line 22

Example

    const account = await NinaClient.Account.fetch("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

### (inner) fetchAll(paginationopt)

Fetches all accounts.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`pagination` | Object | <optional> | {limit: 20, offset: 0, sort: 'desc'} | Pagination options.

Source
  - resources/accounts.js, line 7

Example

    const accounts = await NinaClient.Account.fetchAll();

### (inner) fetchCollected(publicKey, withAccountDataopt)

Fetches the Releases collected by an Account.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain Release accounts.

Source
  - resources/accounts.js, line 45

Example

    const collection = await NinaClient.Account.fetchCollected("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

### (inner) fetchExchanges(publicKey, withAccountDataopt)

Fetches the open, cancelled and completed Exchanges for an Account.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain Exchange accounts.

Source
  - resources/accounts.js, line 78

Example

    const exchanges = await NinaClient.Account.fetchExchanges("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

### (inner) fetchHubs(publicKey, withAccountData)

Fetches the Hubs that an Account is a collaborator on.

Parameters:

Name | Type | Description
--- | --- | ---
`publicKey` | String |
`withAccountData` | Boolean | Include full on-chain Hub accounts.

Source
  - resources/accounts.js, line 34

Example

    const hubs = await NinaClient.Account.fetchHubs("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ";

### (inner) fetchPosts(publicKey, withAccountDataopt)

Fetches the Posts published by an Account.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain Post accounts.

Source
  - resources/accounts.js, line 67

Example

    const posts = await NinaClient.Account.fetchPosts("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

### (inner) fetchPublished(publicKey, withAccountDataopt)

Fetches the Releases that an Account has published.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain Release accounts.

Source
  - resources/accounts.js, line 56

Example

    const published = await NinaClient.Account.fetchPublished("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

### (inner) fetchRevenueShares(publicKey, withAccountDataopt)

Fetches the Releases that an Account has Revenue Share on.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  |
`withAccountData` | Boolean | <optional> | false | Include full on-chain Release accounts.

Source
  - resources/accounts.js, line 89

Example

    const revenueShares = await NinaClient.Account.fetchRevenueShares("52xYtQzDaxeTGcz3WD37mAJgqVFAzR72EnGYaSHab5DQ");

Type anything to view search result