| GET | /api/GetSchedulingCalendar | ||
|---|---|---|---|
| GET | /api/GetSchedulingCalender |
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 BaseRequest:
# @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="Header")
api_key: Optional[str] = None
"""
This is your AIM API Key provided by Tri-Tech
"""
# @ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
o_auth_token: Optional[str] = None
"""
The OAuthToken token return by AeServices30
"""
# @ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")
device_id: Optional[str] = None
"""
The Device ID of the Mobile Device. Not used for non-mobile devices.
"""
# @ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
app_id: Optional[str] = None
"""
An identifier for your integration
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponseResult:
# @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
status_code: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
login: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
error_code: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
error_display_text: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
error_message: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
domain_name: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
ip_address: Optional[str] = None
"""
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse:
# @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
status: Optional[BaseResponseResult] = None
"""
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AvailabilityInfo:
start_time: datetime.datetime = datetime.datetime(1, 1, 1)
start_time_string: Optional[str] = None
length: int = 0
instructor_id: int = 0
location_id: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DayTimeInfoObj:
week_day_int: int = 0
week_day: Optional[str] = None
start_time: datetime.datetime = datetime.datetime(1, 1, 1)
start_time_string: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GroupClassInfo:
day_time_info: Optional[List[DayTimeInfoObj]] = None
start_date: datetime.datetime = datetime.datetime(1, 1, 1)
end_date: datetime.datetime = datetime.datetime(1, 1, 1)
guid: Optional[str] = None
length: int = 0
instructor_id: int = 0
location_id: int = 0
class_name: Optional[str] = None
class_desc: Optional[str] = None
class_summary: Optional[str] = None
max_class_members: int = 0
current_class_members: int = 0
notes: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TimeIncrementByInstructor:
instructor_id: int = 0
time_increment: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetSchedulingCalendarResponse(BaseResponse):
availabilities: Optional[List[AvailabilityInfo]] = None
group_classes: Optional[List[GroupClassInfo]] = None
time_increment: int = 0
time_increments_by_instructor: Optional[List[TimeIncrementByInstructor]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetSchedulingCalendarRequest(BaseRequest):
"""
GetSchedulingCalendarRequires active-e Lesson Scheduling Service. This API call was accidentally named GetSchedulingCalender in the past.
"""
# @ApiMember(DataType="integer", Description="The type of lessons to get a schedule for.", Format="int64", IsRequired=true, Name="TypeId", ParameterType="query")
type_id: int = 0
"""
The type of lessons to get a schedule for.
"""
# @ApiMember(DataType="string", Description="If sent, lessons from this date/time onward will be returned. Otherwise the current date/time is used.", Format="date", Name="DateFrom", ParameterType="query")
date_from: Optional[str] = None
"""
If sent, lessons from this date/time onward will be returned. Otherwise the current date/time is used.
"""
# @ApiMember(DataType="string", Description="If sent, lessons from before this date/time will be returned. Otherwise the DateFrom plus one week is used.", Format="date", Name="DateTo", ParameterType="query")
date_to: Optional[str] = None
"""
If sent, lessons from before this date/time will be returned. Otherwise the DateFrom plus one week is used.
"""
# @ApiMember(DataType="integer", Description="If sent, only lessons taught by the sent instructor will be returned.", Format="int32", Name="InstructorId", ParameterType="query")
instructor_id: Optional[int] = None
"""
If sent, only lessons taught by the sent instructor will be returned.
"""
# @ApiMember(DataType="integer", Description="If sent, lessons taught at the sent location will be returned.", Format="int64", Name="LocationId", ParameterType="query")
location_id: Optional[int] = None
"""
If sent, lessons taught at the sent location will be returned.
"""
Python GetSchedulingCalendarRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/GetSchedulingCalendar HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetSchedulingCalendarResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<Status>
<DomainName>String</DomainName>
<ErrorCode>String</ErrorCode>
<ErrorDisplayText>String</ErrorDisplayText>
<ErrorMessage>String</ErrorMessage>
<IpAddress>String</IpAddress>
<Login>String</Login>
<StatusCode>String</StatusCode>
</Status>
<Availabilities>
<GetSchedulingCalendarResponse.AvailabilityInfo>
<InstructorId>0</InstructorId>
<Length>0</Length>
<LocationId>0</LocationId>
<StartTime>0001-01-01T00:00:00</StartTime>
<StartTimeString>1/1/0001 12:00:00 AM</StartTimeString>
</GetSchedulingCalendarResponse.AvailabilityInfo>
</Availabilities>
<GroupClasses>
<GetSchedulingCalendarResponse.GroupClassInfo>
<ClassDesc>String</ClassDesc>
<ClassName>String</ClassName>
<ClassSummary>String</ClassSummary>
<CurrentClassMembers>0</CurrentClassMembers>
<DayTimeInfo>
<GetSchedulingCalendarResponse.DayTimeInfoObj>
<StartTime>0001-01-01T00:00:00</StartTime>
<StartTimeString>1/1/0001 12:00:00 AM</StartTimeString>
<WeekDay>String</WeekDay>
<WeekDayInt>0</WeekDayInt>
</GetSchedulingCalendarResponse.DayTimeInfoObj>
</DayTimeInfo>
<EndDate>0001-01-01T00:00:00</EndDate>
<Guid>00000000-0000-0000-0000-000000000000</Guid>
<InstructorId>0</InstructorId>
<Length>0</Length>
<LocationId>0</LocationId>
<MaxClassMembers>0</MaxClassMembers>
<Notes>String</Notes>
<StartDate>0001-01-01T00:00:00</StartDate>
</GetSchedulingCalendarResponse.GroupClassInfo>
</GroupClasses>
<TimeIncrement>0</TimeIncrement>
<TimeIncrementsByInstructor>
<GetSchedulingCalendarResponse.TimeIncrementByInstructor>
<InstructorId>0</InstructorId>
<TimeIncrement>0</TimeIncrement>
</GetSchedulingCalendarResponse.TimeIncrementByInstructor>
</TimeIncrementsByInstructor>
</GetSchedulingCalendarResponse>