HolidaysService
public class HolidaysService : BaseService
Service call fo Holiday API The holidays service can be used to retrieve the list of holidays for a country.
Note
Note:Some countries (e.g. China and Russia) occasionally declare working days as non-working days to form longer periods of consecutive non-working days. In exchange, weekend days become normal working days. Those days are indicated with the holiday type weekend. Please see also the discussion of the holiday types.Note
Note:At least request version 2 shall be used for the holiday service. Request version 1 contains a problem for holidays with time stamps (affects e.g. time zone events and seasons): data has no time zone information attached but is output with inconsistent time zone.See also
holidays – Retrieve List of Holidays-
Public function get Holidaya
Note
This class needs to be initialized with the accessKey and SecretKeyvar holidaysService = HolidaysService(accessKey: "[YOUR_ACCESS_KEY]", secretKey:"[YOUR_SECRET_KEY]") holidayRequest = HolidaysRequest() holidayRequest.country = "no" holidayRequest.year = 2020 dstListService.getHolidaysInfo(request:holidayRequest) { (result, error) in }
Declaration
Swift
public func getHolidays(request: HolidaysRequest, completionHandler: @escaping (_ result: HolidaysResponse?, _ error: ServiceErrors?) -> Void)
Parameters
request
HolidaysRequest object
Return Value
- HolidaysResponse
- Service Errors