@akomalabs/kemono
Version:
A production-grade TypeScript API wrapper for the Kemono/Coomer platforms
43 lines (42 loc) • 1.45 kB
TypeScript
import { CreatorsApi } from './api/creators';
import { PostsApi } from './api/posts';
import { FavoritesApi } from './api/favorites';
import type { KemonoConfig } from './schemas';
/**
* Main Kemono API client
* @example
* ```typescript
* const client = new KemonoClient({
* sessionKey: 'your-session-key',
* cache: {
* enabled: true,
* ttl: 300,
* },
* rateLimit: {
* maxRequests: 100,
* windowMs: 60,
* },
* });
*
* // List all creators
* const creators = await client.creators.listAll();
*
* // Get recent posts
* const posts = await client.posts.listRecent();
*
* // Add a creator to favorites
* await client.favorites.addCreator('fanbox', '12345');
* ```
*/
export declare class KemonoClient {
private readonly httpClient;
/** Creators API endpoints */
readonly creators: CreatorsApi;
/** Posts API endpoints */
readonly posts: PostsApi;
/** Favorites API endpoints */
readonly favorites: FavoritesApi;
constructor(config?: KemonoConfig);
}
export { KemonoApiError, AuthenticationError, NotFoundError, ValidationError, RateLimitError, } from './errors/api-error';
export { KemonoBaseUrlSchema, KemonoServiceSchema, KemonoConfigSchema, FileSchema, AttachmentSchema, PostSchema, CreatorSchema, SearchParamsSchema, type KemonoBaseUrl, type KemonoService, type KemonoConfig, type File, type Attachment, type Post, type Creator, type SearchParams, } from './schemas';