mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 22:15:15 +00:00
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 <rick.staa@outlook.com> * 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 <rick.staa@outlook.com>
This commit is contained in:
parent
2619c12638
commit
a340900e8a
3 changed files with 8 additions and 6 deletions
|
|
@ -456,13 +456,13 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
|||
|
||||
### Demo
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
- Compact layout
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
* * *
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ Choose from any of the [default themes](#themes)
|
|||
|
||||
- WakaTime card
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
* * *
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ const fetchWakatimeStats = async ({ username, api_domain, range }) => {
|
|||
const { data } = await axios.get(
|
||||
`https://${
|
||||
api_domain ? api_domain.replace(/\/$/gi, "") : "wakatime.com"
|
||||
}/api/v1/users/${username}/stats/${range || ""}?is_including_today=true`,
|
||||
}/api/v1/users/${username}/stats/${
|
||||
range || "all_time"
|
||||
}?is_including_today=true`,
|
||||
);
|
||||
|
||||
return data.data;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ describe("Wakatime fetcher", () => {
|
|||
const username = "anuraghazra";
|
||||
mock
|
||||
.onGet(
|
||||
`https://wakatime.com/api/v1/users/${username}/stats/?is_including_today=true`,
|
||||
`https://wakatime.com/api/v1/users/${username}/stats/all_time?is_including_today=true`,
|
||||
)
|
||||
.reply(200, wakaTimeData);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue