All URIs are relative to https://api.uptrends.com/v4
| Method | HTTP request | Description |
|---|---|---|
| TimezoneGetAllTimezones | Get /Timezone | Gets all timezones available. |
| TimezoneGetTimezoneById | Get /Timezone/{timezoneId} | Gets the timezone with the specified Id. |
[]Timezone TimezoneGetAllTimezones(ctx).Execute()
Gets all timezones available.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TimezoneAPI.TimezoneGetAllTimezones(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TimezoneAPI.TimezoneGetAllTimezones``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TimezoneGetAllTimezones`: []Timezone
fmt.Fprintf(os.Stdout, "Response from `TimezoneAPI.TimezoneGetAllTimezones`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiTimezoneGetAllTimezonesRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Timezone TimezoneGetTimezoneById(ctx, timezoneId).Execute()
Gets the timezone with the specified Id.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
timezoneId := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TimezoneAPI.TimezoneGetTimezoneById(context.Background(), timezoneId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TimezoneAPI.TimezoneGetTimezoneById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TimezoneGetTimezoneById`: Timezone
fmt.Fprintf(os.Stdout, "Response from `TimezoneAPI.TimezoneGetTimezoneById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| timezoneId | int32 |
Other parameters are passed through a pointer to a apiTimezoneGetTimezoneByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]