UNPKG

@persian-caesar/hycom-api

Version:

A package for easy using hycom.ir api service.

57 lines (56 loc) 2.29 kB
import { ExploreSortParametr, SiteInformation, SortParametr } from "./types"; /** * Returns top authors sorted by total views. * * @param limit Number of authors to return. (1-50) */ declare function topAuthors(limit?: number): Promise<import("./types").Author[] | null>; /** * Returns published posts by a specific author. * * @param tag Author display name and profile ID. (format: name-code) * @param limit Number of authors to return. (1-50) * @param sort Sort order. (newest, most_viewed) */ declare function authorPosts(tag: string, limit?: number, sort?: SortParametr): Promise<import("./types").AuthorPost[] | null>; /** * Returns tags with their post counts. * * @param limit Number of tags to return. (1-100) */ declare function getTags(limit?: number): Promise<import("./types").Tag[] | null>; /** * Returns a paginated list of published articles with filtering and sorting. * * @param page Page number for pagination. * @param limit Number of posts per page. (1-50) * @param search Search query for title, tags, or author. * @param sort Sort order. (recommended, newest, most_viewed) * @param tag Filter by tag slug. */ declare function explore(search?: string, page?: number, limit?: number, sort?: ExploreSortParametr, tag?: string): Promise<import("./types").Post[] | null>; /** * Returns site statistics including last post, total views, total posts, and total authors. */ declare function websiteInformation(): Promise<SiteInformation | null>; /** * Returns the most recent published posts. * * @param limit Number of posts to return. (1-50) */ declare function lastPosts(limit?: number): Promise<import("./types").Post[] | null>; /** * Generates a QR code for the provided URL. * * @param url URL to encode in QR code. */ declare function qrCode(url: string): Promise<Buffer<ArrayBuffer> | null>; export { topAuthors, authorPosts, getTags, explore, websiteInformation, lastPosts, qrCode }; /** * @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. */