On this page

## Methods

### (inner) fetch(publicKey, withAccountDataopt)

Fetches a Post.

Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`publicKey` | String |  |  | The public key of the Post.
`withAccountData` | Boolean | <optional> | false | Fetch full on-chain Post account.

Source
  - resources/posts.js, line 27

Example

    const post = await NinaClient.Post.fetch("K8XJr7LHWJeJJARTvnsFZViqxBzyDSjsfpS6iBuWhrV");

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

Fetches all Posts.

Parameters:

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

Source
  - resources/posts.js, line 7

Example

    const posts = await NinaClient.Post.fetchAll();

Type anything to view search result