The internal cache.
The credential this LeetCode instance is using.
Private
initializedUsed to ensure the LeetCode instance is initialized.
Rate limiter
Static
prefixedGet daily challenge.
const leetcode = new LeetCode();
const daily = await leetcode.daily();
Rest
...args: unknown[]Use GraphQL to query LeetCode API.
Rest
...args: unknown[]Rest
...args: unknown[]Get a list of problems by tags and difficulty.
Optional
category?: stringOptional
filters?: { Optional
difficulty?: "EASY" | "MEDIUM" | "HARD"Optional
tags?: string[]Optional
limit?: numberOptional
offset?: numberGet recent submissions of a user. (max: 20 submissions)
const leetcode = new LeetCode();
const submissions = await leetcode.recent_submissions("jacoblincool");
Get detail of a submission, including the code and percentiles. Need to be authenticated.
Submission ID
Get submissions of the credential user. Need to be authenticated.
Optional
limit?: numberOptional
offset?: numberOptional
slug?: stringconst credential = new Credential();
await credential.init("SESSION");
const leetcode = new LeetCode(credential);
const submissions = await leetcode.submissions({ limit: 100, offset: 0 });
Get public profile of a user.
const leetcode = new LeetCode();
const profile = await leetcode.user("jacoblincool");
Get public contest info of a user.
const leetcode = new LeetCode();
const profile = await leetcode.user_contest_info("jacoblincool");
Generated using TypeDoc
If a credential is provided, the LeetCode API will be authenticated. Otherwise, it will be anonymous.