trender-client
Version:
Official Trender client API
29 lines (28 loc) • 1.95 kB
TypeScript
import RequestEmitter, { requestParams } from '../utils/RequestEmitter';
import type { GlobalInterface, PostInterface, SearchInterface } from './Interfaces';
import PostUserManager from './PostUserManager';
declare class PostManager extends RequestEmitter {
user: PostUserManager;
private cdnurl;
constructor(params: requestParams);
file(user_id: string, post_id: string, file_name: string): string;
uploadFile(files: Blob): Promise<GlobalInterface.uploadFiles>;
create(options: PostInterface.createPostParameters): Promise<PostInterface.createPostReponse>;
delete(target_id: string): Promise<GlobalInterface.emptyResponse>;
unPin(target_id: string): Promise<GlobalInterface.emptyResponse>;
pin(target_id: string): Promise<GlobalInterface.successResponse>;
getPinPost(target_id: string): Promise<PostInterface.pinedPostResponse>;
like(target_id: string): Promise<GlobalInterface.successResponse>;
unlike(target_id: string): Promise<GlobalInterface.emptyResponse>;
getLikesPost(target_id: string): Promise<SearchInterface.searchUsers>;
save(target_id: string): Promise<GlobalInterface.successResponse>;
unSave(target_id: string): Promise<GlobalInterface.emptyResponse>;
getSavedPost(target_id: string, params?: GlobalInterface.paginationParams): Promise<PostInterface.postResponse>;
report(target_id: string, reason: number, description?: string): Promise<GlobalInterface.successResponse>;
fetchOne(post_id: string): Promise<PostInterface.fetchOnePost>;
comments(post_id: string, params?: GlobalInterface.paginationParams): Promise<PostInterface.postResponse>;
shares(post_id: string, params?: GlobalInterface.paginationParams): Promise<PostInterface.postResponse>;
fetch(params?: GlobalInterface.paginationParams): Promise<PostInterface.postResponse>;
search(params?: PostInterface.searchParams): Promise<PostInterface.postResponse>;
}
export default PostManager;