-
Notifications
You must be signed in to change notification settings - Fork 15
v2.site.news.list
cyperdark edited this page May 23, 2023
·
1 revision
Returns a list of news posts and related metadata
const { auth } = require('osu-api-extended');
await auth.login(client_id, client_secret);
await v2.site.news.list(object)
Parameter | Type | Description |
---|---|---|
object.limit | number |
Maximum number of posts (12 default, 1 minimum, 21 maximum) |
object.year | number |
Year to return posts from |
object.cursorPublished | string |
Pagination cursorPublished |
object.cursorId | number |
Pagination cursorId |
export interface response {
news_posts: {
id: number;
author: string;
edit_url: string;
first_image: string;
published_at: string;
updated_at: string;
slug: string;
title: string;
preview: string;
}[];
news_sidebar: {
current_year: number;
news_posts: {
id: number;
author: string;
edit_url: string;
first_image: string;
published_at: string;
updated_at: string;
slug: string;
title: string;
}[];
years: number[];
};
search: {
limit: number;
sort: string;
year: string;
};
cursor: {
published_at: string;
id: number;
};
cursor_string: string;
}