Skip to content

Commit

Permalink
feat: update API base URI
Browse files Browse the repository at this point in the history
This change is requried in order for the app to continue working past 30 June 2021
  • Loading branch information
danstis committed Jun 17, 2021
1 parent d789741 commit 647ef88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (c *Settings) getUserDetail() error {
} `json:"data"`
}
var ur UserResponse
toggl := resty.New().SetHostURL("https://www.toggl.com/api/v8").SetBasicAuth(c.Token, "api_token")
toggl := resty.New().SetHostURL("https://api.track.toggl.com/api/v8").SetBasicAuth(c.Token, "api_token")

_, err := toggl.R().
SetQueryParams(map[string]string{
Expand Down Expand Up @@ -149,7 +149,7 @@ func getClosedTimeEntries(c *Settings, w string) (time.Duration, error) {
}
var ct WeeklyResponse

toggleReports := resty.New().SetHostURL("https://toggl.com/reports/api/v2").SetBasicAuth(c.Token, "api_token")
toggleReports := resty.New().SetHostURL("https://api.track.toggl.com/reports/api/v2").SetBasicAuth(c.Token, "api_token")

_, err := toggleReports.R().
SetQueryParams(map[string]string{
Expand All @@ -176,7 +176,7 @@ func getOpenTimeEntry(c *Settings, w string) (time.Duration, error) {
}
var ot TimeEntriesResponse

toggl := resty.New().SetHostURL("https://www.toggl.com/api/v8").SetBasicAuth(c.Token, "api_token")
toggl := resty.New().SetHostURL("https://api.track.toggl.com/api/v8").SetBasicAuth(c.Token, "api_token")

_, err := toggl.R().
SetQueryParams(map[string]string{
Expand Down

0 comments on commit 647ef88

Please sign in to comment.