@akomalabs/kemono
Version:
A production-grade TypeScript API wrapper for the Kemono/Coomer platforms
86 lines (85 loc) • 1.49 kB
TypeScript
/**
* Supported Kemono services
*/
export type KemonoService = 'fanbox' | 'patreon' | 'gumroad' | 'subscribestar' | 'dlsite' | 'fantia' | 'onlyfans' | 'fansly';
/**
* File information
*/
export interface File {
name: string;
path: string;
size?: number;
}
/**
* Creator information
*/
export interface Creator {
favorited: number;
id: string;
indexed: number;
name: string;
service: KemonoService;
updated: number;
}
/**
* Post author information
*/
export interface Author {
id: string;
name: string;
service: KemonoService;
user: string;
}
/**
* File attachment in a post
*/
export interface Attachment extends File {
}
/**
* Post content
*/
export interface Post {
id: string;
user: string;
service: KemonoService;
title: string;
content?: string;
added: number;
published: number;
edited?: number;
file?: File;
attachments: Attachment[];
author: Author;
}
/**
* Creator profile information
*/
export interface Profile {
id: string;
name: string;
service: KemonoService;
indexed: number;
updated: number;
favorited: number;
}
/**
* Search parameters for posts
*/
export interface SearchParams {
/**
* Search query
*/
q?: string;
/**
* Result offset (stepping of 50 is enforced)
*/
o?: number;
}
/**
* API Error response
*/
export interface ApiError {
error: string;
status: number;
message: string;
}