-
Notifications
You must be signed in to change notification settings - Fork 15
v2.comments.details_v3
ck edited this page Oct 6, 2024
·
2 revisions
async
Retrieves a comment by given parameters.
const { auth, v2 } = require('osu-api-extended');
async function main() {
try {
const result = await v2.comments.details(3035523);
if (result.error != null) {
console.log(result.error);
return;
};
console.log(result);
} catch (error) {
console.log(error);
};
};
main();
Parameter | Type | Description |
---|---|---|
comment_id | string | |
addons.legacy_only? | boolean | |
addons.apiVersion? | '20240130' | '99999999' |
addons.authKey? | string | |
addons.timeout_ms? | number | |
addons.ignoreSessionRefresh? | boolean |
export interface CommentsDetailsResponse {
comments: Comment[]
has_more: boolean
has_more_id: number
included_comments: IncludedComment[]
pinned_comments: any[]
user_votes: any[]
user_follow: boolean
users: User[]
sort: string
cursor: Cursor
commentable_meta: CommentableMeum[]
}
export interface Comment {
id: number
parent_id: any
user_id: number
pinned: boolean
replies_count: number
votes_count: number
commentable_type: string
commentable_id: number
legacy_name: any
created_at: string
updated_at: string
deleted_at: any
edited_at: any
edited_by_id: any
message: string
message_html: string
}
export interface IncludedComment {
id: number
parent_id: number
user_id: number
pinned: boolean
replies_count: number
votes_count: number
commentable_type: string
commentable_id: number
legacy_name: any
created_at: string
updated_at: string
deleted_at: any
edited_at: any
edited_by_id: any
message: string
message_html: string
}
export interface User {
avatar_url: string
country_code: string
default_group: string
id: number
is_active: boolean
is_bot: boolean
is_deleted: boolean
is_online: boolean
is_supporter: boolean
last_visit?: string
pm_friends_only: boolean
profile_colour?: string
username: string
}
export interface Cursor {
created_at: string
id: number
}
export interface CommentableMeum {
current_user_attributes?: CurrentUserAttributes
id?: number
type?: string
title: string
url?: string
owner_id: any
owner_title: any
}
export interface CurrentUserAttributes {
can_new_comment_reason: string
}