@zikeji/hypixel
Version:
With IntelliSense support & test coverage, this is an unopinionated async/await API wrapper for Hypixel's Public API. It is developed in TypeScript complete with documentation, typed interfaces for all API responses, built-in rate-limit handling, flexible
33 lines (31 loc) • 840 B
text/typescript
import { RateLimitData } from "./RateLimitData";
/**
* Possible meta options returned on the meta variable.
*/
export interface DefaultMeta {
/**
* If this request required an API key it returned rate limit information in the headers, which is included here.
*/
ratelimit?: RateLimitData;
/**
* If you included a cache get/set method in the options, this value will be set to true if that cache was hit.
*/
cached?: boolean;
/**
* Data from CloudFlare's headers in regards to caching - particularly relevant for resources endpoints.
*/
cloudflareCache?: {
/**
* Cloudflare cache status.
*/
status: "HIT" | "MISS" | "BYPASS" | "EXPIRED" | "DYNAMIC";
/**
* Cloudflare cache age.
*/
age?: number;
/**
* Cloudflare max cache age.
*/
maxAge?: number;
};
}