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

ParameterTypeOptionalDescription
newsstring | numberID or slug of the news post to get
optionsGetNewsPostOptions✓

options.query

ParameterTypeOptionalDescription
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_syntax
  • network_error
  • unexpected_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 .