GET | /v2/{Apikey}/club/{StoreID}/classschedule | Get Class Schedule | Specify ToDate/FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today. |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiDtoBase:
api_key: Optional[str] = None
store_id: Optional[int] = None
chain_id: Optional[int] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetClassScheduleRequestDto(ApiDtoBase):
from_date: Optional[datetime.datetime] = None
to_date: Optional[datetime.datetime] = None
filter_by_category_id: Optional[int] = None
class RestrictedResourceType(str, Enum):
STORE = 'Store'
CHAIN = 'Chain'
USER = 'User'
UNDEFINED = 'Undefined'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetClassScheduleRequestV2(GetClassScheduleRequestDto, IRestrictedApiRequest):
api_key: Optional[str] = None
store_id: Optional[int] = None
from_date: Optional[datetime.datetime] = None
to_date: Optional[datetime.datetime] = None
# @ApiMember(DataType="integer", Description=" Id of CategoryNames to filter results by", Name="FilterByCategoryId", ParameterType="query")
filter_by_category_id: Optional[int] = None
"""
Id of CategoryNames to filter results by
"""
restricted_id: Optional[int] = None
restricted_resource_type: Optional[RestrictedResourceType] = None
Python GetClassScheduleRequestV2 DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v2/{Apikey}/club/{StoreID}/classschedule HTTP/1.1 Host: clubready.com Accept: application/json