On this page

## Methods

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

Fetches a Hub along with it's Releases, Collaborators, and Posts.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub account.
`withAccountData` | Boolean | <optional> | false | Include full on-chain Hub, HubRelease, HubPost, HubContent, HubCollaborator, Release, and Post accounts.

Source
  - resources/hubs.js, line 27

Example

    const hub = await NinaClient.Hub.fetch('ninas-picks');

### (inner) fetchAll(paginationopt, withAccountDataopt)

Fetches all hubs.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`pagination` | Object | <optional> | {limit: 20, offset: 0, sort: 'desc'} | Pagination options.
`withAccountData` | Boolean | <optional> | false | Include full on-chain Hub accounts.

Source
  - resources/hubs.js, line 7

Example

    const hubs = await NinaClient.Hub.fetchAll();

### (inner) fetchCollaborators(publicKeyOrHandle, withAccountDataopt)

Fetches the Collaborators of a Hub.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub account.
`withAccountData` | Boolean | <optional> | false | Include full on-chain HubCollaborator accounts.

Source
  - resources/hubs.js, line 38

Example

    const collaborators = await NinaClient.Hub.fetchCollaborators('ninas-picks');

### (inner) fetchHubPost(publicKeyOrHandle, hubPostPublicKey, withAccountDataopt)

Fetches a hubPost

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub.
`hubPostPublicKey` | String |  |  | The public key of the HubPost.
`withAccountData` | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts.

Source
  - resources/hubs.js, line 83

Example

    const hubPost = await NinaClient.Hub.fetchHubPost('ninas-picks', 'H2aoAZfxbQX6s77yj31Duy7DiJnJcN3Gg1HkA2VuvNUZ');

### (inner) fetchHubRelease(publicKeyOrHandle, hubReleasePublicKey, withAccountDataopt)

Fetches a Release for a Hub.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub.
`hubReleasePublicKey` | String |  |  | The public key of the HubRelease.
`withAccountData` | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts.

Source
  - resources/hubs.js, line 71

Example

    const hubRelease = await NinaClient.Hub.fetchHubRelease('ninas-picks', 'H2aoAZfxbQX6s77yj31Duy7DiJnJcN3Gg1HkA2VuvNUZ);

### (inner) fetchPosts(publicKeyOrHandle, withAccountDataopt)

Fetches Posts for a hub.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub account.
`withAccountData` | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts.

Source
  - resources/hubs.js, line 60

Example

    const posts = await NinaClient.Hub.fetchPosts('ninas-picks');

### (inner) fetchReleases(publicKeyOrHandle, withAccountDataopt)

Fetches Releases for a Hub.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKeyOrHandle` | String |  |  | The public key or handle of the Hub account.
`withAccountData` | Boolean | <optional> | false | Include full on-chain HubRelease, HubContent, and Release accounts.

Source
  - resources/hubs.js, line 49

Example

    const releases = await NinaClient.Hub.fetchReleases('ninas-picks');

Type anything to view search result