Skip to content

Commit c98f027

Browse files
committed
Added Code for leetcode api
1 parent 0288e1e commit c98f027

File tree

131 files changed

+59577
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+59577
-7
lines changed

leetcode.js

+28-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ const query = `
2727
}
2828
}
2929
}
30+
recentSubmissionList(username: $username) {
31+
title
32+
titleSlug
33+
timestamp
34+
statusDisplay
35+
lang
36+
__typename
37+
}
38+
matchedUserStats: matchedUser(username: $username) {
39+
submitStats: submitStatsGlobal {
40+
acSubmissionNum {
41+
difficulty
42+
count
43+
submissions
44+
__typename
45+
}
46+
totalSubmissionNum {
47+
difficulty
48+
count
49+
submissions
50+
__typename
51+
}
52+
__typename
53+
}
54+
}
3055
}
3156
`;
3257

@@ -46,7 +71,9 @@ const formatData = (data) => {
4671
ranking: data.matchedUser.profile.ranking,
4772
contributionPoint: data.matchedUser.contributions.points,
4873
reputation: data.matchedUser.profile.reputation,
49-
submissionCalendar: JSON.parse(data.matchedUser.submissionCalendar)
74+
submissionCalendar: JSON.parse(data.matchedUser.submissionCalendar),
75+
recentSubmissions: data.recentSubmissionList,
76+
matchedUserStats: data.matchedUser.submitStats
5077
}
5178
return sendData;
5279
}

node_modules/.bin/mime

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/mime.cmd

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/mime.ps1

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.package-lock.json

+84
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/data-uri-to-buffer/README.md

+88
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/data-uri-to-buffer/dist/index.d.ts

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/data-uri-to-buffer/dist/index.js

+53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/data-uri-to-buffer/dist/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)