UNPKG

@persian-caesar/hycom-api

Version:

A package for easy using hycom.ir api service.

95 lines (94 loc) 2.18 kB
export type SortParametr = "newest" | "most_viewed"; export type ExploreSortParametr = "recommended" | SortParametr; export interface Author { tag: string; display_name: string; profile_id: string; url: string; article_count: number; total_views: number; profile_image: string; } export interface TopAuthorResponse { success: boolean; data: Author[]; } export interface AuthorPost { url: string; title: string; summary: string; image: string; view_count: number; like_count: number; created_at: string; tags: string[]; reading_time: number; } export interface AuthorPostsResponse { success: boolean; data: AuthorPost[]; } export interface PostTag { name: string; slug: string; } export interface Tag { name: string; slug: string; post_count: number; } export interface TagsResponse { success: boolean; data: Tag[]; } export interface Post { url: string; title: string; summary: string; image: string; view_count: number; like_count: number; created_at: string; tags: string[]; reading_time: number; author_name: string; author_name_id: string; author_image: string; author_tag: string; time_ago: string; } export interface ExploreResponse { success: boolean; data: Post[]; } export interface SiteInformation { last_post: Post; ping: number; total_tags: number; total_views: number; total_posts: number; total_authors: number; } export interface WebSiteInformationResponse { success: boolean; data: { total_tags: number; total_views: number; total_posts: number; total_authors: number; }; } export interface QrCodeResponse { success: boolean; data: { qr_code: string; }; } /** * @copyright * Code by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA * Developed for Persian Caesar | https://github.com/Persian-Caesar | https://dsc.gg/persian-caesar * * If you encounter any issues or need assistance with this code, * please make sure to credit "Persian Caesar" in your documentation or communications. */