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 HolidayRegion from 'files.com/lib/models/HolidayRegion';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const holidayRegions = await HolidayRegion.getSupported();
  for (const holidayRegion of holidayRegions) {
    // Operate on holidayRegion
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

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