| GET,OPTIONS | /v1/Calendar/{CalendarId} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/Calendar/Project/{ProjectId} | ||
| GET,OPTIONS | /v1/Calendar/Location/{LocationId} | ||
| GET,OPTIONS | /v1/Calendar/Agent/{AgentId} | ||
| GET,OPTIONS | /v1/Calendar/Project/{ProjectId}/{StartDate}/{EndDate} | ||
| GET,OPTIONS | /v1/Calendar/Project/{ProjectId}/CalendarEventId/{CalendarEventId} | ||
| GET,OPTIONS | /v1/Calendar/{CalendarId}/{StartDate}/{EndDate} | ||
| GET,OPTIONS | /v1/Calendar/Project/{StartDate}/{EndDate} | ||
| GET,OPTIONS | /v1/Calendar/Project/ExpandRecurring/{ProjectId} | ||
| GET,OPTIONS | /v1/Calendar/CrewMember/Availability/{ContactId}/{StartDate}/{EndDate} | ||
| GET,OPTIONS | /v1/Calendar/Project/ExpandRecurring/{ProjectId}/{StartDate}/{EndDate} | ||
| GET,OPTIONS | /v1/Calendar/Project/ExpandRecurring/{ProjectId}/CalendarEventId/{CalendarEventId} | ||
| GET,OPTIONS | /v1/Calendar/Project/ExpandRecurring/ExpandAll/{ProjectId}/{StartDate}/{EndDate} |
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
class CalendarType(str, Enum):
ALL = 'All'
PERA = 'Pera'
GOOGLE = 'Google'
class CalendarFormat(str, Enum):
STANDARD = 'Standard'
ICS = 'ICS'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CalendarRequest:
calendar_id: Optional[str] = None
calendar_event_id: int = 0
calendar_type: Optional[CalendarType] = None
calendar_format: Optional[CalendarFormat] = None
contact_id: int = 0
start_date: datetime.datetime = datetime.datetime(1, 1, 1)
end_date: datetime.datetime = datetime.datetime(1, 1, 1)
project_id: int = 0
location_id: Optional[str] = None
agent_id: int = 0
expand_recurring_events: bool = False
expand_all: bool = False
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 /v1/Calendar/{CalendarId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml