trender-client
Version:
Official Trender client API
25 lines (24 loc) • 1.46 kB
TypeScript
import RequestEmitter, { requestParams } from '../utils/RequestEmitter';
import type { emptyResponse, paginationParams, successResponse, uploadFiles } from './Interfaces/Global';
import type { createPostParameters, createPostReponse, pinedPostResponse, postResponse, postResponseSchema } from './Interfaces/Post';
import type { searchUsers } from './Interfaces/Search';
import PostUserManager from './PostUserManager';
declare class PostManager extends RequestEmitter {
user: PostUserManager;
constructor(params: requestParams);
file(user_id: string, post_id: string, file_name: string): string;
uploadFile(files: Blob): Promise<uploadFiles>;
create(options: createPostParameters): Promise<createPostReponse>;
delete(target_id: string): Promise<emptyResponse>;
unPin(target_id: string): Promise<emptyResponse>;
pin(target_id: string): Promise<successResponse>;
getPinPost(target_id: string): Promise<pinedPostResponse>;
like(target_id: string): Promise<successResponse>;
unlike(target_id: string): Promise<emptyResponse>;
getLikesPost(target_id: string): Promise<searchUsers>;
report(target_id: string, reason: number, description?: string): Promise<successResponse>;
fetchOne(post_id: string): Promise<postResponseSchema>;
comments(post_id: string, options?: paginationParams): Promise<postResponseSchema>;
fetch(options?: paginationParams): Promise<postResponse>;
}
export default PostManager;