Skip to content

Commit a340900

Browse files
fix(wakatime-fetcher): add default range to prevent user not found error (#2670)
* feat(theme): add github_dark_dimmed theme * feat(theme): change github_dark_dimmed icon color * contrast ratio adjustment contrast ratio adjustment on github_dark_dimmed theme * feat(theme): readme preview * feat(theme): github themes next to each other * github themes next to each other * feat(RankIcon): add rank icon option * feat(RankIcon): extract rankIcon to icons file * feat(RankIcon): update readme * feat(RankIcon): test coverage * Update readme.md Co-authored-by: Rick Staa <[email protected]> * add wakatime default range * update wakatime demos in readme with most active user * update wakatime demo in readme * remove &range=all_time from wakatime demos in readme --------- Co-authored-by: Rick Staa <[email protected]>
1 parent 2619c12 commit a340900

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,13 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
456456
457457
### Demo
458458

459-
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats)
459+
[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=Harlok)](https://github.com/anuraghazra/github-readme-stats)
460460

461-
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats)
461+
[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=Harlok&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats)
462462

463463
- Compact layout
464464

465-
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats)
465+
[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=Harlok&layout=compact)](https://github.com/anuraghazra/github-readme-stats)
466466

467467
* * *
468468

@@ -520,7 +520,7 @@ Choose from any of the [default themes](#themes)
520520

521521
- WakaTime card
522522

523-
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats)
523+
[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=Harlok)](https://github.com/anuraghazra/github-readme-stats)
524524

525525
* * *
526526

src/fetchers/wakatime-fetcher.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const fetchWakatimeStats = async ({ username, api_domain, range }) => {
1414
const { data } = await axios.get(
1515
`https://${
1616
api_domain ? api_domain.replace(/\/$/gi, "") : "wakatime.com"
17-
}/api/v1/users/${username}/stats/${range || ""}?is_including_today=true`,
17+
}/api/v1/users/${username}/stats/${
18+
range || "all_time"
19+
}?is_including_today=true`,
1820
);
1921

2022
return data.data;

tests/fetchWakatime.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("Wakatime fetcher", () => {
105105
const username = "anuraghazra";
106106
mock
107107
.onGet(
108-
`https://wakatime.com/api/v1/users/${username}/stats/?is_including_today=true`,
108+
`https://wakatime.com/api/v1/users/${username}/stats/all_time?is_including_today=true`,
109109
)
110110
.reply(200, wakaTimeData);
111111

0 commit comments

Comments
 (0)