Required permission: | ReadSections |
POST | /Sections/Timetable/{reporting_term} |
---|
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 SectionTimetableNoteResponse:
heading: Optional[str] = None
body: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SectionTimetableInstructorResponse:
instructor_name: Optional[str] = None
instructor_slug: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SectionTimetableResponse:
time: Optional[str] = None
sort_time: Optional[int] = None
course: Optional[str] = None
course_slug: Optional[str] = None
desc: Optional[str] = None
instructors: Optional[List[SectionTimetableInstructorResponse]] = None
registration_info: Optional[str] = None
room: Optional[str] = None
credit_minimum: Decimal = decimal.Decimal(0)
credit_maximum: Decimal = decimal.Decimal(0)
audit_minimum: Decimal = decimal.Decimal(0)
audit_maximum: Decimal = decimal.Decimal(0)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SectionsTimetableResponse:
response_status: Optional[ResponseStatus] = None
term: Optional[str] = None
notes: Optional[List[SectionTimetableNoteResponse]] = None
monday: Optional[List[SectionTimetableResponse]] = None
tuesday: Optional[List[SectionTimetableResponse]] = None
wednesday: Optional[List[SectionTimetableResponse]] = None
thursday: Optional[List[SectionTimetableResponse]] = None
friday: Optional[List[SectionTimetableResponse]] = None
saturday: Optional[List[SectionTimetableResponse]] = None
sunday: Optional[List[SectionTimetableResponse]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SectionsTimetableRequest:
reporting_term: Optional[str] = None
Python SectionsTimetableRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Sections/Timetable/{reporting_term} HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
reporting_term: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, term: String, notes: [ { heading: String, body: String } ], monday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], tuesday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], wednesday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], thursday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], friday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], saturday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ], sunday: [ { time: String, sortTime: 0, course: String, courseSlug: String, desc: String, instructors: [ { instructorName: String, instructorSlug: String } ], registrationInfo: String, room: String, creditMinimum: 0, creditMaximum: 0, auditMinimum: 0, auditMaximum: 0 } ] }