leetcodecount
v1.0.1
Published
Retrieve and display LeetCode user's problem-solving statistics using the 'leetcodecount' package in JavaScript.
Downloads
6
Readme
Leetcode-API
Retrieve and display LeetCode user's problem-solving statistics using the 'leetcodecount' package in JavaScript.
Installation
Install my-project with npm
npm install leetcodecount
Usage/Examples
const leetcode = require('leetcodecount');
// Replace 'url' with the actual LeetCode user profile URL
const url = 'https://leetcode.com/your_username/';
// Get the count of Medium problems solved
leetcode.getMediumCount(url)
.then((mediumCount) => {
console.log(`Medium Count: ${mediumCount}`);
})
.catch((error) => {
console.error(`Error fetching Medium Count: ${error.message}`);
});
/*Available methods
1)leetcode.getEaseyCount()
2)leetcode.getMediumCount()
3)leetcode.getHardCount()
4)leetcode.getTotalCount()
*/