| 38 | } |
| 39 | |
| 40 | async function fetchLeetCodeStats() { |
| 41 | const leetcodelink = config.social.find((c) => c.title === "LeetCode").link; |
| 42 | const leetcodeusername = |
| 43 | leetcodelink.split("/")[leetcodelink.split("/").length - 1]; |
| 44 | const responseRaw = await fetch( |
| 45 | `https://leetcode-stats-api.herokuapp.com/${leetcodeusername}` |
| 46 | ); |
| 47 | const response = await responseRaw.json(); |
| 48 | totalSolved = response.totalSolved; |
| 49 | easySolved = response.easySolved; |
| 50 | mediumSolved = response.mediumSolved; |
| 51 | hardSolved = response.hardSolved; |
| 52 | ranking = response.ranking; |
| 53 | } |
| 54 | |
| 55 | async function fetchGithubStats() { |
| 56 | try { |