Direct naar hoofdinhoud

Wakatime

Onofficiรซle Beta-vertaling

Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ†’

Watโ€‹

Toont de bijgehouden tijd op wakatime voor de huidige dag

let op

Je moet een API-sleutel aanvragen op de wakatime website. Het gratis abonnement is voldoende. Je vindt de API-sleutel op de pagina met je profielinstellingen.

Voorbeeldconfiguratieโ€‹

{
"type": "wakatime",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#ffffff",
"background": "#007acc",
"options": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY",
"http_timeout": 500
}
}

Optiesโ€‹

NameTypeDefaultDescription
urlstringThe Wakatime summaries URL, including the API key. Example above.
http_timeoutint20The time (in milliseconds, ms) it takes to consider an http request as timed-out. If no segment is shown, try increasing this timeout.

Dynamische API-sleutelโ€‹

Als je de API-sleutel niet in je configuratie wilt opnemen, kun je de volgende aanpassing doen.

{
"options": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={{ .Env.WAKATIME_API_KEY }}",
"http_timeout": 500
}
}
opmerking

WAKATIME_API_KEY is een voorbeeld, elke naam is mogelijk en acceptabel zolang de omgevingsvariabele bestaat en de API-sleutelwaarde bevat.

Raadpleeg de pagina Omgevingsvariabele voor meer informatie.

Template (informatie)โ€‹

standaard template
 {{ secondsRound .CumulativeTotal.Seconds }}

Eigenschappenโ€‹

NameTypeDescription
.CumulativeTotalwtTotalsobject holding total tracked time values

wtTotals Eigenschappenโ€‹

NameTypeDescription
.Secondsfloat64a number representing the total tracked time in seconds
.Textstringa string with human readable tracked time (eg: "2 hrs 30 mins")