wakatimejs
JavaScript library for getting data of the WakaTime API. Currently, you can only retrieve data by using your WakaTime API Key
Install
npm install wakatime
Usage
Set API Key
const wakaTimeInstance = 'API_KEY'
or
const wakaTimeInstance = wakaTimeInstanceapiKey = 'API_KEY'
Get API Key
const apiKey = wakaTimeInstanceapiKeyconsole // API_KEY
Get current user
wakaTimeInstance })
Get stats
A user's logged time for the given time range. Range can be one of:
- last_7_days
- last_30_days
- last_6_months
- last_year
- all_time
wakaTimeInstance
Get summaries
A user's logged time for the given time range as an array of summaries segmented by day.
There are four ways to get your WakaTime summaries.
-
By defining start and end date in
YYYY-MM-DD
format.wakaTimeInstance -
By defining start and end date in a
Date
instance.wakaTimeInstance -
For single date summary, define the date in
YYYY-MM-DD
format or use a JS Date.wakaTimeInstancewakaTimeInstance
Get durations
A user's logged time for the given day as an array of duration blocks. There are two days to get durations.
-
By defining the target date in
YYYY-MM-DD
format.wakaTimeInstance -
By defining the target date in a
Date
instance.wakaTimeInstance
Authors
- Jillberth Estillore - Created the library - Github - Email
- Alexander Lichter - Updated the library to ES6 - Github - StackOverflow
License
MIT