AIM Web Services

<back to all web services

ICSCalendarRequest

ICSCalendar
Requires active-e Lesson Scheduling Service

The following routes are available for this service:
GET/api/ICSCalendar
import Foundation
import ServiceStack

/**
* ICSCalendarRequires active-e Lesson Scheduling Service
*/
// @DataContract
public class ICSCalendarRequest : BaseRequest
{
    // @DataMember
    public var instructorId:Int

    // @DataMember
    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(){}
}


Swift ICSCalendarRequest 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/ICSCalendar HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json