Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use /__api__/v1/timezones rather than /__api__/timezones (2024.09.0) #300

Open
aronatkins opened this issue Sep 4, 2024 · 0 comments · May be fixed by #315
Open

use /__api__/v1/timezones rather than /__api__/timezones (2024.09.0) #300

aronatkins opened this issue Sep 4, 2024 · 0 comments · May be fixed by #315
Assignees

Comments

@aronatkins
Copy link
Contributor

The Connect 2024.09.0 release publicizes the time zone enumeration API.

connectapi::get_timezones() needs to call this new endpoint when available and call the unversioned endpoint otherwise.

connectapi/R/schedule.R

Lines 339 to 345 in bfefb00

get_timezones <- function(connect) {
raw_tz <- connect$GET(unversioned_url("timezones"))
tz_values <- purrr::map_chr(raw_tz, ~ .x[["timezone"]])
tz_display <- purrr::map_chr(raw_tz, ~ glue::glue("{.x[['timezone']]} ({.x[['offset']]})"))
return(as.list(rlang::set_names(tz_values, tz_display)))
}

The payload is unchanged; only the request path is different.

@toph-allen toph-allen self-assigned this Sep 6, 2024
@toph-allen toph-allen linked a pull request Oct 11, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants