Holiday Regions

List all possible holiday regions

SDK Method

holidayregion.GetSupported()

Return Object

[]*HolidayRegion

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    holiday_region "github.com/Files-com/files-sdk-go/v3/holidayregion"
)

holidayRegionIterator, err := holiday_region.GetSupported()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for holidayRegionIterator.Next() {
    holidayRegion := holidayRegionIterator.holidayRegion()
}
err = holidayRegionIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The HolidayRegion Object

Some of the methods above return a HolidayRegion object. The attributes of this object are listed below.

AttributeDescription
Code
string
The code representing a region
Name
string
The name of the region