Change API endpoint
This commit is contained in:
parent
5c6a76c96f
commit
b90ae26781
@ -31,20 +31,20 @@ else:
|
|||||||
# Class containing the endpoint URLs for Toggl
|
# Class containing the endpoint URLs for Toggl
|
||||||
# --------------------------------------------
|
# --------------------------------------------
|
||||||
class Endpoints:
|
class Endpoints:
|
||||||
WORKSPACES = "https://www.toggl.com/api/v8/workspaces"
|
WORKSPACES = "https://api.track.toggl.com/api/v8/workspaces"
|
||||||
CLIENTS = "https://www.toggl.com/api/v8/clients"
|
CLIENTS = "https://api.track.toggl.com/api/v8/clients"
|
||||||
PROJECTS = "https://www.toggl.com/api/v8/projects"
|
PROJECTS = "https://api.track.toggl.com/api/v8/projects"
|
||||||
TASKS = "https://www.toggl.com/api/v8/tasks"
|
TASKS = "https://api.track.toggl.com/api/v8/tasks"
|
||||||
REPORT_WEEKLY = "https://toggl.com/reports/api/v2/weekly"
|
REPORT_WEEKLY = "https://toggl.com/reports/api/v2/weekly"
|
||||||
REPORT_DETAILED = "https://toggl.com/reports/api/v2/details"
|
REPORT_DETAILED = "https://toggl.com/reports/api/v2/details"
|
||||||
REPORT_SUMMARY = "https://toggl.com/reports/api/v2/summary"
|
REPORT_SUMMARY = "https://toggl.com/reports/api/v2/summary"
|
||||||
START_TIME = "https://www.toggl.com/api/v8/time_entries/start"
|
START_TIME = "https://api.track.toggl.com/api/v8/time_entries/start"
|
||||||
TIME_ENTRIES = "https://www.toggl.com/api/v8/time_entries"
|
TIME_ENTRIES = "https://api.track.toggl.com/api/v8/time_entries"
|
||||||
CURRENT_RUNNING_TIME = "https://www.toggl.com/api/v8/time_entries/current"
|
CURRENT_RUNNING_TIME = "https://api.track.toggl.com/api/v8/time_entries/current"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def STOP_TIME(pid):
|
def STOP_TIME(pid):
|
||||||
return "https://www.toggl.com/api/v8/time_entries/" + str(pid) + "/stop"
|
return "https://api.track.toggl.com/api/v8/time_entries/" + str(pid) + "/stop"
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
|
@ -34,7 +34,8 @@ class TogglPyTests(unittest.TestCase):
|
|||||||
self.toggl.setAPIKey(self.api_key)
|
self.toggl.setAPIKey(self.api_key)
|
||||||
|
|
||||||
def test_connect(self):
|
def test_connect(self):
|
||||||
response = self.toggl.request("https://www.toggl.com/api/v8/clients")
|
response = self.toggl.request("https://api.track.toggl.com/api/v8/clients")
|
||||||
|
pi.track.toggl.com/
|
||||||
self.assertTrue(response is not None)
|
self.assertTrue(response is not None)
|
||||||
|
|
||||||
def test_putTimeEntry(self):
|
def test_putTimeEntry(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user