AIM Web Services

<back to all web services

GetSchedulingCalendarRequest

GetSchedulingCalendar
Requires active-e Lesson Scheduling Service. This API call was accidentally named GetSchedulingCalender in the past.

The following routes are available for this service:
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", Name="OAuthToken", ParameterType="header")
    o_auth_token: Optional[str] = None


@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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Availabilities":[{"StartTimeString":"1/1/0001 12:00:00 AM","Length":0,"InstructorId":0,"LocationId":0}],"GroupClasses":[{"DayTimeInfo":[{"WeekDayInt":0,"WeekDay":"String","StartTimeString":"1/1/0001 12:00:00 AM"}],"Guid":"00000000000000000000000000000000","Length":0,"InstructorId":0,"LocationId":0,"ClassName":"String","ClassDesc":"String","ClassSummary":"String","MaxClassMembers":0,"CurrentClassMembers":0,"Notes":"String"}],"TimeIncrement":0,"TimeIncrementsByInstructor":[{"InstructorId":0,"TimeIncrement":0}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}