UNPKG

@re621/zestyapi

Version:

Comprehensive JS wrapper for e621.net API

35 lines (34 loc) 1.14 kB
import Endpoint, { QueryParams, SearchParams } from "../components/Endpoint"; import { FormattedResponse } from "../components/RequestQueue"; import APIComment from "../responses/APIComment"; export default class CommentsEndpoint extends Endpoint<APIComment> { protected endpoint: string; protected searchParams: string[]; protected searchParamAliases: { body: string; post_tags: string; }; find(search?: CommentSearchParams): Promise<FormattedResponse<APIComment>>; protected validateQueryParams(params?: CommentQueryParams): CommentQueryParams; } interface CommentSearchParams extends SearchParams { creator_name?: string; is_hidden?: boolean; is_sticky?: boolean; order?: CommentSearchOrder; id?: number | number[]; post_id?: number | number[]; creator_id?: number; body?: string; post_tags?: string; } interface CommentQueryParams extends QueryParams { group_by?: "comment" | "post" | string; } declare enum CommentSearchOrder { Created = "id_desc", Updated = "updated_at_desc", Score = "score_desc", Post = "post_id_desc" } export {};