mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
0256ff4a6a | |||
9d170b3276 | |||
c54e575210 |
@ -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)
|
||||
++++++++++++++++++
|
||||
|
||||
|
@ -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']
|
||||
|
Reference in New Issue
Block a user