guibranco/GuiStracini.HolidayAPI

[FEATURE] GuiStracini.HolidayAPI.Model.Holiday - SubDivisions

JazStringer opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
After GetHolidaysAsync() is returned I am iterating through the results looking for the SubDivisions that the holiday is associated to;

Describe the solution you'd like
for a [SubDivisions] property string array of SubDivisions the holiday is associated to;

To it work the subdivisions queryString must be set to true

Steps:

  • Allow an optional parameter to request
  • Map the subdivisions array of strings in the response

A sample request: https://holidayapi.com/v1/holidays?pretty&country=USA&year=2022&subdivisions=true&key=[API-KEY]

A sample response:

{
  "name": "Civil Rights Day",
  "date": "2022-01-17",
  "observed": "2022-01-17",
  "public": true,
  "country": "US",
  "uuid": "7068a05c-881f-4a74-9a36-829383316de7",
  "weekday": {
    "date": {
      "name": "Monday",
      "numeric": "1"
    },
    "observed": {
      "name": "Monday",
      "numeric": "1"
    }
  },
  "subdivisions": [
    "US-AZ",
    "US-NH"
  ]
}