UNPKG

node-hoyolab

Version:

node-hoyolab is an unofficial API Wrapper library developed to integrate with the Hoyolab, which provides a more convenient way to access the Hoyolab API.

25 lines (24 loc) 855 B
import { ICookie } from './cookie.interface'; /** * Represents a cookie object. * * @class * @category Main */ export declare class Cookie { /** * Parses a cookie string and returns a parsed ICookie object. * * @param cookieString - The cookie string to be parsed. * @returns {string} - A parsed ICookie object. * @throws {NodeHoyoError} when ltuid or ltoken keys are not found in the cookie string. */ static parseCookieString(cookieString: string): ICookie; /** * Converts an `ICookie` object into a cookie string. * @param {ICookie} cookie - The `ICookie` object to convert. * @returns {string} A string representing the cookie. * @throws {NodeHoyoError} If the `ltuidV2` or `ltokenV2` key is missing in the `ICookie` object. */ static parseCookie(cookie: ICookie): string; }