UNPKG

osu-api-extended

Version:

Advanced osu! api wrapper for v1 and v2, with extra stuff

1,234 lines 72 kB
/** * ##### Description * Object containing methods for retrieving beatmaps data. */ export declare const beatmaps: { /** * ##### Description * Covers API Endpoints regarding beatmap packs. * */ packs: { /** * ### `GET` [/v2/beatmaps/packs](https://osu.ppy.sh/docs/index.html#get-beatmap-packs) * `async` Retrieves a list of all available beatmap packs. * * &nbsp; * * ## Parameters * - `params.type` - Type of the beatmap pack. * - `params.cusor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap-packs) | [Check return types](../types/v2/beatmaps_packs_list.ts) */ list: (params: { type: import("../types").IBeatmapPackType; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_packs_list").BeatmapsPacksListResponse & import("../types").IError>; /** * ### `GET` [/v2/beatmaps/packs/{pack_tag}](https://osu.ppy.sh/docs/index.html#get-beatmap-pack) * `async` Retrieves a beatmap pack by given ID. * * &nbsp; * * ### Parameters * - `pack_tag` - ID of the beatmap pack to retrieve. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap-pack) | [Check return types](../types/v2/beatmaps_packs_details.ts) */ details: (pack_tag: string, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_packs_details").BeatmapsPacksDetailsResponse & import("../types").IError>; }; /** * ### `GET` [/v2/beatmaps/lookup](https://osu.ppy.sh/docs/index.html#lookup-beatmap) * ### `GET` [/v2/beatmapsets/lookup](https://osu.ppy.sh/docs/index.html#get-apiv2beatmapsetslookup) * ### `POST` [/v2/beatmaps/{beatmap}/attributes](https://osu.ppy.sh/docs/index.html#get-beatmap-attributes) * ### `GET` [/v2/beatmaps](https://osu.ppy.sh/docs/index.html#get-beatmaps) * `async` Lookup for a beatmap by given parameters. * * &nbsp; * * ### Global Parameters * - `params.type` - Type of lookup. * * & &nbsp; * * ### Parameters for `params.type:'difficulty'` * - `params.id` - ID of the difficulty to lookup for. * - `params.checksum` - Checksum of the difficulty to lookup. * - `params.filename` - Filename of the difficulty to lookup. * * &nbsp; * * ### Parameters for `params.type:'set'` * - `params.id` - ID of the beatmap set to lookup for. * * &nbsp; * * ### Parameters for `params.type:'attribute'` * - `params.id` - ID of the beatmap to lookup for. * - `params.mods` - Mod combination of the beatmap to lookup for. * - `params.mode` - Mode of the beatmap to lookup for. * * &nbsp; * * ### Parameters for `params.type:'difficulties'` * - `params.ids` - IDs of the difficulties to lookup for. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#lookup-beatmap) | [Check return types](../types/v2/beatmaps_lookup.ts) */ lookup: <T extends { type: "difficulty"; id: number; checksum: string; filename: string; } | { type: "set"; id: number; } | { /** * ##### Description * Object containing methods for retrieving beatmaps data. */ type: "attributes"; id: number; mods: number; mode: import("../types").Modes_names; } | { type: "difficulties"; ids: number[]; /** * ##### Description * Covers API Endpoints regarding beatmap packs. * */ }>(params: T, addons?: import("../types").IDefaultParams) => Promise<T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "difficulty" ? import("../types/v2/beatmaps_lookup_difficulty").BeatmapsLookupDifficulty & import("../types").IError : T_1 extends "set" ? import("../types/v2/beatmaps_lookup_set").BeatmapsLookupSet & import("../types").IError : T_1 extends "attributes" ? import("../types/v2/beatmaps_lookup_attributes").BeatmapsLookupAttributes & import("../types").IError : T_1 extends "difficulties" ? import("../types/v2/beatmaps_lookup_difficulties").BeatmapsLookupDifficultiesResponse[] & import("../types").IError : import("../types").IError : never : never>; /** * ### `GET` [v2/beatmaps/{beatmap}](https://osu.ppy.sh/docs/index.html#get-beatmap) * ### `GET` [v2/beatmapsets/{beatmapset}](https://osu.ppy.sh/docs/index.html#get-apiv2beatmapsetsbeatmapset) * `async` Retrieves a beatmap or beatmap set by given ID. * * &nbsp; * * ##### Parameters * - `params.type` - The type to search for. * - `params.id` - The ID to search for. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap) | [Check return types](../types/v2/beatmaps_details.ts) */ details: <T_2 extends { type: "difficulty"; id: number; } | { type: "set"; id: number; }>(params: T_2, addons?: import("../types").IDefaultParams) => Promise<T_2["type"] extends infer T_3 ? T_3 extends T_2["type"] ? T_3 extends "difficulty" ? import("../types/v2/beamaps_details_difficulty").BeamapsDetailsDifficulty & import("../types").IError : T_3 extends "set" ? import("../types/v2/beamaps_details_set").BeamapsDetailsSet & import("../types").IError : import("../types").IError : never : never>; /** * ##### Description * Covers API Endpoints regarding beatmap set events. */ events: { /** * ### `GET` [v2/beatmapsets/{beatmapset}/events](https://osu.ppy.sh/docs/index.html#get-apiv2beatmapsetsevents) * `async` Retrieves a list of beatmap set events. * * &nbsp; * * ### Parameters * - `obj.user` - Filter by author of the event. * - `obj.types` - Filter by type of the event. * - `obj.min_date` - Filter by minimum date of the event. * - `obj.max_date` - Filter by maximum date of the event. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2beatmapsetsevents) | [Check return types](../types/v2/beatmaps_events_list.ts) */ list: (obj: { user: string | number; types: import("../types").beatmap_events_types[]; min_date: string; max_date: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_events").BeatmapsEvents & import("../types").IError>; }; /** * `async` Downloads a beatmap or beatmap set by given ID. (Supports different hosts) * * &nbsp; * * ### Available hosts * - `type:'difficulty'`: osu, osu_direct_mirror, catboy * - `type:'set'`: osu, beatconnect, nerinyan, osu_direct_mirror, sayobot, gatari, ripple, catboy * * &nbsp; * * ### Global Parameters * - `params.type` - Type of the beatmap. * - `params.id` - ID of the beatmap or beatmap set. * - `params.host` - Host of the download source. * - `params.file_path` - Path to the save location. * - `params.overwrite` - Whether to overwrite the file if it already exists. * * &nbsp; * * ### Parameters for `params.type:'set'` * - `params.no_video?` - Whether to include video in the download. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2beatmapsetsbeatmapsetdownload) | [Check return types](../types/v2/beatmaps_download.ts) */ download: <T_4 extends { type: "difficulty"; id: number; host: "osu" | "osu_direct_mirror" | "catboy"; file_path: string; overwrite?: boolean; progress_track_fn?: (host: string, progress: number) => void; } | { type: "set"; id: number; host: "osu" | "osu_direct_mirror" | "catboy" | "beatconnect" | "nerinyan" | "sayobot" | "gatari" | "ripple"; file_path: string; no_video?: boolean; overwrite?: boolean; progress_track_fn?: (host: string, progress: number) => void; }>(params: T_4, addons?: import("../types").IDefaultParams) => Promise<{ status: string; destination?: string; elapsed_time?: number; } & import("../types").IError>; /** * ##### Description * Covers API Endpoints regarding beatmap discussions. */ discussions: { /** * ### `GET` [/v2/beatmapsets/discussions`](https://osu.ppy.sh/docs/index.html#get-beatmapset-discussions) * `async` Retrieves a list of beatmap set discussions. * * &nbsp; * * ### Parameters * - `params.only_unresolved?` - Filter by unresolved discussions. * - `params.user?` - Filter by author of the discussion. * - `params.beatmap_id?` - Filter by beatmap ID. * - `params.beatmapset_id?` - Filter by beatmap set ID. * - `params.beatmapset_status?` - Filter by beatmap set status. * - `params.message_type?` - Filter by message type. * - `params.limit?` - Maximum number of discussions to return. * - `params.sort?` - Sort order of the discussions. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmapset-discussions) | [Check return types](../types/v2/beatmaps_discussions_list.ts) */ list: (params: { only_unresolved?: boolean; user?: number; beatmap_id?: number; beatmapset_id?: number; beatmapset_status?: "ranked" | "qualified" | "loved" | "all" | "disqualified" | "never_qualified"; message_types?: ("all" | "suggestion" | "problem" | "mapper_note" | "praise" | "hype" | "review")[]; limit?: number; sort?: "id_desc" | "id_asc"; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_discussions_list").BeatmapsDiscussionsListResponse & import("../types").IError>; /** * ### `GET` [/v2/beatmapsets/discussions/posts](https://osu.ppy.sh/docs/index.html#beatmapset-discussions) * `async` Retrieves the posts of a beatmap set discussion. * * &nbsp; * * ### Parameters * - `params.discussion_id?` - ID of the beatmap set discussion to retrieve. * - `params.sort?` - Sort order of the posts. * - `params.type?` - Filter by type of the post. * - `params.limit?` - Maximum number of posts to return. * - `params.user?` - Filter by author of the post. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#beatmapset-discussions) | [Check return types](../types/v2/beatmaps_discussions_posts.ts) */ posts: (params: { discussion_id?: number; sort?: "id_desc" | "id_asc"; types?: ("first" | "reply" | "system")[]; user?: number; limit?: number; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_discussions_list").BeatmapsDiscussionsListResponse & import("../types").IError>; /** * ### `GET` [/v2/beatmapsets/discussions/votes](https://osu.ppy.sh/docs/index.html#get-beatmapset-discussion-votes) * `async` Retrieves the votes given to beatmap set discussions. * * &nbsp; * * ### Parameters * - `params.discussion_id?` - ID of the beatmap set discussion to retrieve. * - `params.sort?` - Sort order of the votes. * - `params.score?` - Filter by score of the vote. * - `params.user?` - Filter by author of the vote. * - `params.receiver?` - Filter by receiver of the vote. * - `params.limit?` - Maximum number of votes to return. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmapset-discussion-votes) | [Check return types](../types/v2/beatmaps_discussions_votes.ts) */ votes: (params: { discussion_id?: number; sort?: "id_desc" | "id_asc"; score?: "1" | "-1"; user?: number; receiver?: number; limit?: number; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/beatmaps_discussions_list").BeatmapsDiscussionsListResponse & import("../types").IError>; }; /** * Currently broken. */ actions: <T_5 extends { type: "favourite"; beatmapset_id: number; add: boolean; }>(params: T_5, addons?: import("../types").IDefaultParams) => Promise<T_5["type"] extends infer T_6 ? T_6 extends T_5["type"] ? T_6 extends "difficulty" ? any : T_6 extends "difficulties" ? any : import("../types").IError : never : never>; }; /** * ##### Description * Covers API Endpoints regarding changelogs. */ export declare const changelogs: { /** * ### `GET` [/v2/changelogs](https://osu.ppy.sh/docs/index.html#get-changelog-listing) * ### `GET` [/v2/changelogs/{changelog}](https://osu.ppy.sh/docs/index.html#lookup-changelog-build) * `async` Retrieves a list of all available changelogs. * * &nbsp; * * ### Global Parameters * - `params.type` - Fetch type. * - `params.message_formats` - Return format. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Parameters for `type:'all'` * - `params.from_build?` - Minimum build version. * - `params.to_build?` - Maximum build version. * - `params.stream_name?` - Stream name to return builds from. * - `params.max_id?` - Maximum build ID. * * &nbsp; * * ### Parameters for `type:'lookup'` * - `params.changelog` - Build version, update stream name, or build ID. * - `params.key` - Unset to query by build version or stream name, or id to query by build ID. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-changelog-listing) | [Check return types](../types/v2/changelogs_list.ts) */ list: <T extends { type: "all"; from_build?: string; to_build?: string; stream_name?: string; max_id?: string; message_formats?: ("html" | "markdown")[]; } | { type: "lookup"; message_formats: ("html" | "markdown")[]; changelog: string; key: string; }>(params: T, addons?: import("../types").IDefaultParams) => Promise<T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "all" ? import("../types/v2/changelogs_list_all").ChangelogsListAllResponse & import("../types").IError : T_1 extends "lookup" ? import("../types/v2/changelogs_list_lookup").ChangelogsListLookupResponse & import("../types").IError : import("../types").IError : never : never>; /** * ### `GET` [/v2/changelog/{stream}/{build}](https://osu.ppy.sh/docs/index.html#get-changelog-build) * `async` Retrieves details of the specified build. * * &nbsp; * * ### Parameters * - `params.stream_name` - Update stream name. * - `params.build_version` - Build version. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-changelog-build) | [Check return types](../types/v2/changelogs_details.ts) */ details: (params: { stream_name: string; build_version: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/changelogs_details").changelogsDetailsResponse[] & import("../types").IError>; }; /** * ##### Description * Covers API Endpoints regarding comments. */ export declare const comments: { /** * ### `GET` [/v2/comments](https://osu.ppy.sh/api/v2/comments) * `async` Retrieves a list of all comments by given parameters. * * &nbsp; * * ### Parameters * - `params.type?` - Type of the resource to get comments from. * - `params.id?` - ID of the resource to get comments from. * - `params.parent_id?` - ID of the parent comment. * - `params.after_id?` - ID of the comment after which the comments will be returned. * - `params.cursor?.id`- The ID of the cursor. * - `params.cursor?.created_at` - The timestamp of the cursor. * - `params.sort?` - Sort order of the comments. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-comments-listing) | [Check return types](../types/v2/comments_list.ts) */ list: (params: { type?: "news_post" | "beatmapset" | "Build"; id?: string; parent_id?: string; after_id?: string; cursor?: { id: number; created_at: string; }; sort?: "new" | "old" | "top"; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/comments_list").CommentsListResponse & import("../types").IError>; /** * ### `GET` [/v2/comments/{comment}](https://osu.ppy.sh/docs/index.html#get-a-comment) * `async` Retrieves a comment by given parameters. * * &nbsp; * * ### Parameters * - `params.comment_id` - ID of the comment to retrieve. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-a-comment) | [Check return types](../types/v2/comments_details.ts) */ details: (comment_id: string, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/comments_details").CommentsDetailsResponse & import("../types").IError>; /** * ### `POST` [/v2/comments](https://osu.ppy.sh/docs/index.html#post-a-new-comment) * ### `PUT` [/v2/comments/{comment}](https://osu.ppy.sh/docs/index.html#edit-comment) * ### `PATCH` [/v2/comments/{comment}](https://osu.ppy.sh/docs/index.html#edit-comment) * ### `DELETE` [/v2/comments/{comment}](https://osu.ppy.sh/docs/index.html#delete-comment) * ### `POST` [/v2/comments/{comment}/vote](https://osu.ppy.sh/docs/index.html#add-comment-vote) * ### `DELETE` [/v2/comments/{comment}/vote](https://osu.ppy.sh/docs/index.html#remove-comment-vote) * `async` Perform comment actions via endpoint. * * &nbsp; * * ### Global Parameters * - `params.id?` - ID of the comment to perform the action on. * - `params.type` - Type of the action to perform. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Parameters for `params.type:'new'` * - `params.message?` - The message of the comment. * - `params.parent_id?` - The id of the comment to reply to. * - `params.commentable_type?` - Resource type the comment thread is attached to. * * &nbsp; * * ### Parameters for `params.type:'edit'` * - `params.message?` - The message of the comment. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#post-a-new-comment) | [Check return types](../types/v2/comments_actions.ts) */ actions: <T extends { type: "new"; commentable_type?: "news_post" | "beatmapset"; id?: number; parent_id?: string; /** * ##### Description * Object containing methods for retrieving beatmaps data. */ message?: string; } | { type: "edit"; id?: number; message?: string; } | { type: "delete"; id?: number; } | { type: "vote"; id?: number; } | { type: "unvote"; id?: number; }>(params: T, addons?: import("../types").IDefaultParams) => Promise<(T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "new" ? import("../types/v2/comments_actions_new").CommentsActionsNewResponse & import("../types").IError : T_1 extends "edit" ? import("../types/v2/comments_actions_edit").CommentsActionsEditResponse & import("../types").IError : T_1 extends "delete" ? import("../types/v2/comments_actions_delete").CommentsActionsDeleteResponse & import("../types").IError : T_1 extends "vote" ? import("../types/v2/comments_actions_vote").CommentsActionsVoteResponse & import("../types").IError : T_1 extends "unvote" ? import("../types/v2/comments_actions_unvote").CommentsActionsUnvoteResponse & import("../types").IError : import("../types").IError : never : never) | { error: string; }>; }; /** * ##### Description * Covers API Endpoints regarding users. */ export declare const users: { /** * ### `GET` [/v2/users](https://osu.ppy.sh/docs/index.html#get-users) * `async` Retrieves a list of users by given parameters. * * &nbsp; * * ### Parameters * - `params.ids` - List of user ids to retrieve. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-users) | [Check return types](../types/v2/users_list.ts) */ list: (params: { ids: number[]; include_variants?: boolean; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_list").UsersLisResponse[] & import("../types").IError>; /** * ### `GET` [/v2/users/{user}/kudosu](https://osu.ppy.sh/docs/index.html#get-user-kudosu) * `async` Retrieves the kudosu history of a given user. * * &nbsp; * * ### Parameters * - `params.id` - ID of the user to retrieve. * - `params.limit?` - Maximum number of results to return. * - `params.offset?` - Result offset for pagination. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-user-kudosu) | [Check return types](../types/v2/users_kudosu.ts) */ kudosu: (params: { id: number; limit?: number; offset?: number; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_kudosu").UsersKudosuResponse[] & import("../types").IError>; /** * ### `GET` [/v2/events](https://osu.ppy.sh/docs/index.html#get-events) * `async` Retrieves a list of user events by given parameters. * * &nbsp; * * ### Parameters * - `params.type?` - Filter by type of event. * - `params.sort?` - Sort order of the events by id. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-events) | [Check return types](../types/v2/users_events.ts) */ events: ({ sort, cursor_string, type }?: { type?: ("rank" | "achievement" | "beatmapPlaycount" | "beatmapsetApprove" | "beatmapsetDelete" | "beatmapsetRevive" | "beatmapsetUpdate" | "beatmapsetUpload" | "userSupportAgain" | "userSupportFirst" | "userSupportGift" | "usernameChange")[]; sort?: "id_desc" | "id_asc"; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_events").UsersEventsResponse & import("../types").IError>; /** * ### `GET` [/v2/users/{user}/{mode?}](https://osu.ppy.sh/docs/index.html#get-user) * `async` Retrieves a user by given parameters. * * &nbsp; * * ### Parameters * - `params.id` - ID or username of the user to retrieve. * - `params.mode?` - Retrieve data for a specific gamemode. * - `params.key?` - Type of the `params.id` parameter. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-user) | [Check return types](../types/v2/users_details.ts) */ details: (params: { user?: string | number; mode?: import("../types").Modes_names; key?: "id" | "username"; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_details").UsersDetailsResponse & import("../types").IError>; /** * ### `GET` [/v2/users/{user}/beatmapsets/{type}](https://osu.ppy.sh/docs/index.html#get-user-beatmaps) * `async` Retrieves a list of user's beatmaps sets by given parameters. * * &nbsp; * * ### Parameters * - `params.type` - Filter by type of beatmap set. * - `params.id` - ID of the user to retrieve. * - `params.limit?` - Maximum number of beatmap sets to return. * - `params.offset?` - Result offset for pagination. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-user-beatmaps) | [Check return types](../types/v2/users_beatmaps.ts) */ beatmaps: (params: { type: "ranked" | "loved" | "pending" | "graveyard" | "favourite" | "guest" | "most_played" | "nominated"; id: number; limit?: number; offset?: number; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_beatmaps").UsersBeatmapsResponse[] & import("../types").IError>; /** * ### `GET` [/v2/users/{user}/recent_activity](https://osu.ppy.sh/docs/index.html#get-user-recent-activity) * `async` Retrieves a list of user's recent activities by given parameters. * * &nbsp; * * ### Parameters * - `params.id` - ID of the user to retrieve. * - `params.limit?` - Maximum number of activities to return. * - `params.offset?` - Result offset for pagination. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-user-recent-activity) | [Check return types](../types/v2/users_activity.ts) */ activity: (params: { id: number; limit?: number; offset?: number; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/users_activity").UsersActivityResponse[] & import("../types").IError>; }; /** * ##### Description * Covers API Endpoints regarding scores. */ export declare const scores: { /** * ### `GET` [/v2/beatmaps/{beatmap}/scores](https://osu.ppy.sh/docs/index.html#get-beatmap-scores) * ### `GET` [/v2/beatmaps/{beatmap}/scores/users/{user}](https://osu.ppy.sh/docs/index.html#get-a-user-beatmap-score) * ### `GET` [/v2/beatmaps/{beatmap}/scores/users/{user}/all](https://osu.ppy.sh/docs/index.html#get-a-user-beatmap-scores) * ### `GET` [/v2/beatmaps/{beatmap}/solo-scores](https://osu.ppy.sh/docs/index.html#get-beatmap-scores-non-legacy) * `async` Retrieves a list of scores by given parameters. * * &nbsp; * * ### Global Parameters * - `params.mode?` - Retrieve data for a specific gamemode. * - `params.type` - Type of scores to retrieve. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Parameters for `params.type: 'leaderboard' | 'solo_scores'` * - `params.leaderboard_type?: Type of leaderboard to retrieve.` * - `params.beatmap_id` - ID of the beatmap to retrieve data from. * - `params.mods?` - Retrieve scores for specific mods. * * &nbsp; * * ### Parameters for `params.type: 'beatmap_best'` * - `params.beatmap_id` - ID of the beatmap. * - `params.user_id` - ID of the user. * - `params.mods?` - Retrieve scores for specific mods. * * &nbsp; * * ### Parameters for `params.type: 'beatmap_all'` * - `params.beatmap_id` - ID of the beatmap. * - `params.user_id` - ID of the user. * * &nbsp; * * ### Parameters for `params.type:'user_best' | 'user_firsts' | 'user_recent' | 'user_pinned'` * - `params.user_id` - ID of the user to retrieve data from. * - `params.include_fails?` - Include failed scores. * - `params.limit?` - Maximum number of scores to return. * - `params.offset?` - Result offset for pagination. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap-scores) | [Check return types](../types/v2/scores_list.ts) * */ list: <T extends { mode?: import("../types").Modes_names; } & ({ type: "leaderboard" | "solo_scores"; leaderboard_type?: "country" | "global" | "friend"; beatmap_id: number; mods?: string[]; } | { type: "beatmap_best"; beatmap_id: number; user_id: number; mods?: string[]; } | { type: "beatmap_all"; beatmap_id: number; user_id: number; } | { type: "user_best" | "user_firsts" | "user_recent" | "user_pinned"; user_id: number; include_fails?: boolean; offset?: number; limit?: number; })>(params: T, addons?: import("../types").IDefaultParams) => Promise<T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "leaderboard" ? import("../types/v2/scores_list_leaderboard").ScoresListLeaderboardResponse[] & import("../types").IError : T_1 extends "solo_scores" ? import("../types/v2/scores_list_solo_scores").ScoresListSoloScoresResponse[] & import("../types").IError : T_1 extends "beatmap_best" ? import("../types/v2/scores_list_beatmap_best").ScoresListBeatmapBestResponse[] & import("../types").IError : T_1 extends "beatmap_all" ? import("../types/v2/scores_list_beatmap_all").ScoresListBeatmapAllResponse[] & import("../types").IError : T_1 extends "user_best" ? import("../types/v2/scores_list_user_best").ScoresListUserBestResponse[] & import("../types").IError : T_1 extends "user_firsts" ? import("../types/v2/scores_list_user_firsts").ScoresListUserFirstsResponse[] & import("../types").IError : T_1 extends "user_recent" ? import("../types/v2/scores_list_user_recent").ScoresListUserRecentResponse[] & import("../types").IError : T_1 extends "user_pinned" ? import("../types/v2/scores_list_user_pinned").ScoresListUserPinnedResponse[] & import("../types").IError : import("../types").IError : never : never>; /** * ### `GET` [/v2/scores/{rulesetOrScore}/{score?}](https://osu.ppy.sh/docs/index.html#get-apiv2scoresrulesetorscorescore) * `async` Retrieves a score by given parameters. * * &nbsp; * * ### Parameters * - `params.id` - ID of the score to retrieve. * - `params.mode?` - Gamemode of the score. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2scoresrulesetorscorescore) | [Check return types](../types/v2/scores_details.ts) * */ details: (params: { id: number; mode?: import("../types").Modes_names; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/scores_details").ScoresDetailsResponse & import("../types").IError>; /** * ### `GET` [/v2/scores/{rulesetOrScore}/{score}/download](https://osu.ppy.sh/docs/index.html#get-apiv2scoresrulesetorscorescoredownload) * `async` Downloads a score by given parameters. * * &nbsp; * * ### Parameters * - `params.id` - ID of the score to download. * - `params.mode?` - Gamemode of the score. * - `params.file_path?` - Where to save the file. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2scoresrulesetorscorescoredownload) | [Check return types](../types/v2/scores_download.ts) */ download: (params: { id: number; mode?: import("../types").Modes_names; file_path?: string; }) => Promise<import("../types/v2/scores_download").ScoresDownloadResponse & import("../types").IError>; }; /** * ##### Description * Covers API Endpoints regarding forums. */ export declare const forums: { /** * ##### Description * Covers API Endpoints regarding forum topics. */ topics: { /** * ### `GET` [/v2/forums/topics](https://osu.ppy.sh/docs/index.html#get-topic-and-posts) * `async` Retrieves a list of forum topics by given parameters. * * &nbsp; * * ### Parameters * - `params.id` - ID of the topic to retrieve. * - `params.start_id?` - ID of the topic after which the topics will be returned. * - `params.end_id?` - ID of the topic before which the topics will be returned. * - `params.limit?` - Maximum number of topics to return. * - `params.sort?` - Sort order of the topics. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap-packs) | [Check return types](../types/v2/forums_topics_details.ts) */ details: (params: { id: number; start_id?: string; end_id?: string; limit?: number; sort?: "id_desc" | "id_asc"; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/forums_topics_details").ForumsTopicsDetailsResponse & import("../types").IError>; /** * ### `POST` [/v2/forums/topics](https://osu.ppy.sh/docs/index.html#create-topic) * ### `POST` [/v2/forums/topics/{topic}/reply](https://osu.ppy.sh/docs/index.html#reply-topic) * ### `PUT/PATCH` [/v2/forums/posts/{post}](https://osu.ppy.sh/docs/index.html#edit-post) * ### `PUT/PATCH` [/v2/forums/topics/{topic}](https://osu.ppy.sh/docs/index.html#edit-topic) * `async` Perform actions on forum topics via API. * * &nbsp; * * ### Global Parameters * - `params.type` - Type of action to perform. * - `addons?` - Additional parameters to include in the request. * * ### Parameters for `params.type:'create'` * - `params.forum_id` - ID of the forum to create the topic in. * - `params.title` - Title of the topic. * - `params.message` - Message of the topic. * - `params.enable_poll` - Whether to enable the poll. * - `params.poll.allow_vote_change?` - Whether to allow users to change their vote. * - `params.poll.hide_results?` - Whether to hide the results of the poll. * - `params.poll.title` - Title of the poll. * - `params.poll.options` - Options of the poll. * - `params.poll.max_votes_per_user?` - Maximum number of votes per user. * - `params.poll.duration_days?` - Duration of the poll. * * &nbsp; * * ### Parameters for `params.type:'reply'` * - `params.post_id` - ID of the post to reply to. * - `params.message` - Message of the reply. * * &nbsp; * * ### Parameters for `params.type:'edit_post'` * - `params.post_id` - ID of the post to edit. * - `params.message` - Message of the edit. * * &nbsp; * * ### Parameters for `params.type:'edit_topic'` * - `params.topic_id?` - ID of the topic to edit. * - `params.post_id?` - ID of the post to edit. * - `params.title?` - New title of the topic. * - `params.message` - New message of the topic. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * * [See documentation](https://osu.ppy.sh/docs/index.html#forum) | [Check return types](../) */ actions: <T extends { type: "create"; forum_id: number; title: string; message: string; enable_poll: boolean; poll?: { allow_vote_change?: boolean; hide_results?: boolean; title: string; options: string[]; max_votes_per_user?: number; duration_days?: number; }; } | { type: "reply"; post_id: number; message: string; /** * ### `GET` [/v2/beatmaps/packs](https://osu.ppy.sh/docs/index.html#get-beatmap-packs) * `async` Retrieves a list of all available beatmap packs. * * &nbsp; * * ## Parameters * - `params.type` - Type of the beatmap pack. * - `params.cusor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-beatmap-packs) | [Check return types](../types/v2/beatmaps_packs_list.ts) */ } | { type: "edit_post"; post_id: number; message: string; } | { type: "edit_topic"; topic_id?: number; post_id?: number; title?: string; message?: string; }>(params: T, addons?: import("../types").IDefaultParams) => Promise<T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "create" ? import("../types/v2/forums_topics_actions_create").ForumsTopicsActionsCreateResponse & import("../types").IError : T_1 extends "reply" ? import("../types/v2/forums_topics_actions_reply").ForumsTopicsActionsReplyResponse & import("../types").IError : T_1 extends "edit_post" ? import("../types/v2/forums_topics_actions_edit_post").ForumsTopicsActionsEditPostResponse & import("../types").IError : T_1 extends "edit_topic" ? import("../types/v2/forums_topics_actions_edit_topic").ForumsTopicsActionsEditTopicResponse & import("../types").IError : import("../types").IError : never : never>; }; }; /** * ### `GET` [/v2/search](https://osu.ppy.sh/docs/index.html#search) * `async` Search for users and wiki pages. * * &nbsp; * * ### Global Parameters * - `params.type` - Type of search. * - `params.query?` - Query to search for. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Parameters for `params.type:'site'` * - `params.location?` - Page to search on. * - `params.page?` - Page number of the search results. * * &nbsp; * * ### Parameters for `params.type:'beatmaps'` * - `params.mode?` - Gamemode to search for. * - `params._played?` - Unknown parameter description. * - `params._nsfw?` - Whether to include NSFW beatmaps. * - `params.status?` - Filter by status. * - `params.category?` - Filter by category. * - `params.genre?` - Filter by genre. * - `params.language?` - Filter by language. * - `params.achieved_rank?` - Filter by achieved rank. * - `params.extra?` - Filter by extra features. * - `params.sort?` - Sort the results. * - `params.cursor_string?` - Cursor string. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#search) | [Check return types](../types/v2/search.ts) * */ export declare const search: <T extends { type: "site"; location?: "all" | "user" | "wiki_page"; query?: string; page?: number; } | { _played?: boolean; _nsfw?: boolean; type: "beatmaps"; query?: string; mode?: number | import("../types").Modes_names; status?: import("../types").beatmap_statuses; /** * ##### Description * Object containing methods for retrieving beatmaps data. */ category?: import("../types").beatmap_category[]; genre?: number | import("../types").beatmap_genres; language?: number | import("../types").beatmap_languages; achieved_rank?: import("../types").beatmap_ranks[]; extra?: import("../types").beatmap_extra[]; sort?: import("../types").beatmap_sorting; cursor_string?: string; }>(params: T, addons?: import("../types").IDefaultParams) => Promise<T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "site" ? import("../types/v2/search_all").SearchWiki & import("../types").IError : T_1 extends "beatmaps" ? import("../types/v2/search_all").SearchBeatmaps & import("../types").IError : import("../types").IError : never : never>; /** * ##### Description * Retrieve data from the assets API. */ export declare const assets: { /** * ### `GET` [/v2/seasonal-backgrounds](https://osu.ppy.sh/docs/index.html#get-apiv2seasonal-backgrounds) * `async` Retrieves seasonal or beatmap backgrounds. * * &nbsp; * * ### Global Parameters * - `params.type` - Source of the background. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Parameters for `params.type:'beatmapset'` * - `params.set_id` - ID of the beatmapset. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2seasonal-backgrounds) | [Check return types](../types/v2/assets_backgrounds.ts) */ backgrounds: <T extends { type: "seasonal"; } | { type: "beatmapset"; set_id: number; }>(params: T, addons?: import("../types").IDefaultParams) => T["type"] extends infer T_1 ? T_1 extends T["type"] ? T_1 extends "seasonal" ? Promise<import("../types/v2/assets_backgrounds").SeasonalBackgrounds & import("../types").IError> : T_1 extends "beatmapset" ? import("../types/v2/assets_backgrounds").BeatmapsetBackground & import("../types").IError : import("../types").IError : never : never; /** * ### `GET` `https://data.ppy.sh/` * `async` Retrieves all urls from the data API. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-apiv2seasonal-backgrounds) | [Check return types](../types/v2/assets_backgrounds.ts) */ dataFiles: () => Promise<import("../types/v2/assets_datafiles").AssetsDatafilesResponse & import("../types").IError>; }; /** * ##### Description * Retrieve data from the news API. */ export declare const news: { /** * ### `GET` [/v2/news](https://osu.ppy.sh/docs/index.html#get-news-listing) * `async` Get a list of all the news based on certain criteria. * * &nbsp; * * ### Parameters * - `params.from_year?` - Year to return posts from. * - `params.limit?` - Maximum number of posts to return. * - `params.cursor_string?` - [Cursor string for pagination.](https://osu.ppy.sh/docs/index.html#cursorstring) * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ```js * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-news-listing) | [Check return types](../types/v2/news_list.ts) */ list: (params?: { from_year?: string; limit?: string; cursor_string?: string; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/news_list").NewsListResponse & import("../types").IError>; /** * ### `GET` [/v2/news/{news}](https://osu.ppy.sh/docs/index.html#get-news-post) * `async` Retrieves a single news post based on given parameters. * * &nbsp; * * ### Parameters * - `params.query` - ID or slug of the news post. * - `params.key` - Type of the query. * - `addons?` - Additional parameters to include in the request. * * &nbsp; * * ### Usage Example * ``` * // TBA * ``` * * &nbsp; * * [See documentation](https://osu.ppy.sh/docs/index.html#get-news-post) | [Check return types](../types/v2/news_details.ts) */ details: (params: { news_id: string; key: "id" | "slug"; }, addons?: import("../types").IDefaultParams) => Promise<import("../types/v2/news_details").NewsDetailsResponse & import("../types").IError>; }; /** * ##### Description * Retrieve data from the notifications API. */ export declare const notifications: { /** * ### `GET` [/v2/notifications](https://