UNPKG

@akomalabs/kemono

Version:

A production-grade TypeScript API wrapper for the Kemono/Coomer platforms

40 lines (39 loc) 1.32 kB
import type { Post, SearchParams, KemonoService } from '../types/api'; import { HttpClient } from '../utils/http-client'; /** * Posts API endpoints */ export declare class PostsApi { private readonly client; constructor(client: HttpClient); /** * List recent posts with optional search parameters * @param params Search parameters * @returns Array of posts */ listRecent(params?: SearchParams): Promise<Post[]>; /** * Get posts by creator * @param service Platform service * @param creatorId Creator's ID * @param params Search parameters * @returns Array of posts */ getByCreator(service: KemonoService, creatorId: string | number, params?: SearchParams): Promise<Post[]>; /** * Get a specific post * @param service Platform service * @param creatorId Creator's ID * @param postId Post ID * @returns Post details */ getPost(service: KemonoService, creatorId: string | number, postId: string): Promise<Post>; /** * Get post attachments * @param service Platform service * @param creatorId Creator's ID * @param postId Post ID * @returns Array of attachment URLs */ getAttachments(service: KemonoService, creatorId: string | number, postId: string): Promise<string[]>; }