forked from mirrored/github-readme-stats
feat: add wakatime card (#392)
* Adds wakatime card route * Adds language progress on wakatime card * Adds wakatime card on README * Adds no coding activity node * Remove percent displayed on wakatime's card * Update readme * refactor: refactored code & added tests Co-authored-by: Anurag <hazru.anurag@gmail.com>
This commit is contained in:
co-authored by
Anurag
parent
e377770a71
commit
6e73a0035d
@@ -0,0 +1,13 @@
|
||||
const axios = require("axios");
|
||||
|
||||
const fetchLast7Days = async ({ username }) => {
|
||||
const { data } = await axios.get(
|
||||
`https://wakatime.com/api/v1/users/${username}/stats/last_7_days?is_including_today=true`
|
||||
);
|
||||
|
||||
return data.data;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
fetchLast7Days,
|
||||
};
|
||||
Reference in New Issue
Block a user