Skip to content

Latest commit

 

History

History
137 lines (88 loc) · 3.44 KB

File metadata and controls

137 lines (88 loc) · 3.44 KB

\TimezoneAPI

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.

TimezoneGetAllTimezones

[]Timezone TimezoneGetAllTimezones(ctx).Execute()

Gets all timezones available.

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiTimezoneGetAllTimezonesRequest struct via the builder pattern

Return type

[]Timezone

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TimezoneGetTimezoneById

Timezone TimezoneGetTimezoneById(ctx, timezoneId).Execute()

Gets the timezone with the specified Id.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
timezoneId int32

Other Parameters

Other parameters are passed through a pointer to a apiTimezoneGetTimezoneByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

Timezone

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]