Compare commits

...

3 Commits
8.4.0 ... 8.4.1

Author SHA1 Message Date
0256ff4a6a v8.4.1 2019-05-01 10:57:50 -07:00
9d170b3276 changes for v8.4.1 2019-05-01 10:57:38 -07:00
c54e575210 use api subdomain for fetching summaries 2019-05-01 10:57:11 -07:00
2 changed files with 9 additions and 2 deletions

View File

@ -3,6 +3,12 @@ History
-------
8.4.1 (2019-05-01)
++++++++++++++++++
- Use api subdomain for fetching today's coding activity.
8.4.0 (2019-05-01)
++++++++++++++++++

View File

@ -8,7 +8,7 @@ Website: https://wakatime.com/
==========================================================="""
__version__ = '8.4.0'
__version__ = '8.4.1'
import sublime
@ -138,6 +138,7 @@ PYTHON_LOCATION = None
HEARTBEATS = queue.Queue()
HEARTBEAT_FREQUENCY = 2 # minutes between logging heartbeat when editing same file
SEND_BUFFER_SECONDS = 30 # seconds between sending buffered heartbeats to API
API_SUMMARIES_URL = 'https://api.wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={}'
# Log Levels
@ -238,7 +239,7 @@ class FetchStatusBarCodingTime(threading.Thread):
log(DEBUG, 'Missing WakaTime API key.')
return
url = 'https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={}'.format(self.api_key)
url = API_SUMMARIES_URL.format(self.api_key)
try:
with closing(urllib2.urlopen(url)) as response:
grand_total_text = json.loads(u(response.read()))['data'][0]['grand_total']['text']