Get news listing
The news.getNewsListing method on a Client instance makes a GET request to the news endpoint and returns an object containing news posts and other additional data.
Example
const newsListing = await api.news.getNewsListing();
Parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
| options | GetNewsListingOptions | ✓ |
options.query
| Parameter | Type | Optional | Description |
|---|---|---|---|
| limit | number | ✓ | Limit number of results |
| year | number | ✓ | Filter news posts by a specific year |
| cursor_string | string | ✓ | Pagination cursor |
Returns
Promise<NewsListing>;
Types
Possible Exceptions
See the error handling documentation for more information.
invalid_json_syntaxnetwork_errorunexpected_response
Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .