Merge branch 'master' into advanced-permissions-phase-1
Этот коммит содержится в:
@@ -318,6 +318,10 @@ func (c *Client4) GetAnalyticsRoute() string {
|
||||
return fmt.Sprintf("/analytics")
|
||||
}
|
||||
|
||||
func (c *Client4) GetTimezonesRoute() string {
|
||||
return fmt.Sprintf(c.GetSystemRoute() + "/timezones")
|
||||
}
|
||||
|
||||
func (c *Client4) DoApiGet(url string, etag string) (*http.Response, *AppError) {
|
||||
return c.DoApiRequest(http.MethodGet, c.ApiUrl+url, "", etag)
|
||||
}
|
||||
@@ -3173,6 +3177,18 @@ func (c *Client4) DeleteReaction(reaction *Reaction) (bool, *Response) {
|
||||
}
|
||||
}
|
||||
|
||||
// Timezone Section
|
||||
|
||||
// GetSupportedTimezone returns a page of supported timezones on the system.
|
||||
func (c *Client4) GetSupportedTimezone() (SupportedTimezones, *Response) {
|
||||
if r, err := c.DoApiGet(c.GetTimezonesRoute(), ""); err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return TimezonesFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// Open Graph Metadata Section
|
||||
|
||||
// OpenGraph return the open graph metadata for a particular url if the site have the metadata
|
||||
|
||||
Ссылка в новой задаче
Block a user