Skip to content

fetchWakatimeStats

The fetcher behind the WakaTime card, and the only one here that never touches GitHub.

WakaTime data fetcher.

WakaTime needs no GitHub token; the config is here for the transport it carries.

fetchWakatimeStats(options, config: CardConfig): Promise<WakaTimeData>
OptionTypeRequiredWhat it is
usernamestring | undefinedyes
api_domainstring | undefinedno

Returns Promise<WakaTimeData> — WakaTime data response.

It needs no GitHub token, and it still takes a CardConfig, because that is what carries the fetch every request goes through. A host that proxies, caches or mocks its traffic gets the same treatment here as everywhere else.

api_domain points at a self-hosted WakaTime — Wakapi or Hakatime — and defaults to wakatime.com. A trailing slash is trimmed for you.

The profile has to be public: WakaTime hides these numbers until “Display coding activity publicly” is switched on.