Skip to content

Commit 9dfc86c

Browse files
committed
Updating the toggl api URL
> Please expect to migrate your knowledgebase and API documentation by > the end of January, 2021. Find the public API docs here, which are > already updated with the new domains. - https://toggl.com/blog/api-documentation-change - https://github.com/toggl/toggl_api_docs/blob/master/toggl_api.md
1 parent 09bcc91 commit 9dfc86c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

toggl.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818
m.startTimer = function(projectId, description)
1919
local key = m.key()
2020
hs.http.asyncPost(
21-
"https://www.toggl.com/api/v8/time_entries/start",
21+
"https://api.track.toggl.com/api/v8/time_entries/start",
2222
hs.json.encode(
2323
{
2424
['time_entry'] = {
@@ -42,7 +42,7 @@ end
4242
m.currentTimer = function(callback)
4343
local key = m.key()
4444
hs.http.asyncGet(
45-
"https://www.toggl.com/api/v8/time_entries/current",
45+
"https://api.track.toggl.com/api/v8/time_entries/current",
4646
{
4747
["Content-Type"] = "application/json; charset=UTF-8",
4848
["Authorization"] = "Basic " .. hs.base64.encode(key .. ":api_token")
@@ -66,7 +66,7 @@ end
6666
m.getProject = function(pid)
6767
local key = m.key()
6868
httpNumber, body, headers = hs.http.get(
69-
"https://www.toggl.com/api/v8/projects/" .. pid,
69+
"https://api.track.toggl.com/api/v8/projects/" .. pid,
7070
{
7171
["Content-Type"] = "application/json; charset=UTF-8",
7272
["Authorization"] = "Basic " .. hs.base64.encode(key .. ":api_token")
@@ -85,7 +85,7 @@ m.stopTimer = function()
8585
m.currentTimer(function(current)
8686
local key = m.key()
8787
httpNumber, body, headers = hs.http.doRequest(
88-
"https://www.toggl.com/api/v8/time_entries/" .. current['data']['id'] .. "/stop",
88+
"https://api.track.toggl.com/api/v8/time_entries/" .. current['data']['id'] .. "/stop",
8989
"PUT",
9090
nil,
9191
{

0 commit comments

Comments
 (0)