| GET | /api/ICSCalendar | ||
|---|---|---|---|
| GET | /api/ICSCalendar/{Instructorid} | 
import Foundation
import ServiceStack
/**
* ICSCalendarRequires active-e Lesson Scheduling Service
*/
// @DataContract
public class ICSCalendarRequest : BaseRequest
{
    /**
    * Instructor ID. Required unless the Instructor path parameter is sent.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="Instructor ID. Required unless the Instructor path parameter is sent.", Name="InstructorId", ParameterType="query")
    public var instructorId:Int
    /**
    * Location ID. Optional.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="Location ID. Optional.", Name="InstructorId", ParameterType="query")
    public var locationId:Int?
    required public init(){ super.init() }
    private enum CodingKeys : String, CodingKey {
        case instructorId
        case locationId
    }
    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        instructorId = try container.decodeIfPresent(Int.self, forKey: .instructorId)
        locationId = try container.decodeIfPresent(Int.self, forKey: .locationId)
    }
    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if instructorId != nil { try container.encode(instructorId, forKey: .instructorId) }
        if locationId != nil { try container.encode(locationId, forKey: .locationId) }
    }
}
// @DataContract
public class BaseRequest : Codable
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="Header")
    public var apiKey:String
    /**
    * The OAuthToken token return by AeServices30
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
    public var oAuthToken:String
    /**
    * The Device ID of the Mobile Device. Not used for non-mobile devices.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")
    public var deviceId:String
    /**
    * An identifier for your integration
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
    public var appId:String
    required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/ICSCalendar HTTP/1.1 Host: active-ewebservice.biz Accept: text/jsonl