Get news post
The news.getNewsPost method on a Client instance makes a GET request to the news/{news} endpoint and returns a news post.
Example
const newsPost = await api.news.getNewsPost('2023-01-19-gmt-apps-now-open');
Parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
| news | string | number | ID or slug of the news post to get | |
| options | GetNewsPostOptions | ✓ |
options.query
| Parameter | Type | Optional | Description |
|---|---|---|---|
| key | ‘id’ | ✓ | Specify whether the query must be done with a news post ID (id) or a slug (unset value) |
Returns
Promise<
NewsPost & {
content: string;
navigation: NewsNavigation;
}
>;
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 .