GET | /api/GetStations |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports AIM.WebService
Imports AIM
Namespace Global
Namespace AIM
<DataContract>
Public Partial Class LocationInfo
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property Desc As String
<DataMember>
Public Overridable Property ShortDesc As String
<DataMember>
Public Overridable Property Region As String
<DataMember>
Public Overridable Property Latitude As Decimal
<DataMember>
Public Overridable Property Longitude As Decimal
<DataMember>
Public Overridable Property InStorePickup As String
<DataMember>
Public Overridable Property Active As Boolean
<DataMember>
Public Overridable Property CashSaleAcct As Nullable(Of Integer)
End Class
End Namespace
Namespace AIM.WebService
<DataContract>
Public Partial Class BaseRequest
'''<Summary>
'''This is your AIM API Key provided by Tri-Tech
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="This is your AIM API Key provided by Tri-Tech", IsRequired:=true, Name:="ApiKey", ParameterType:="header")>
Public Overridable Property ApiKey As String
<DataMember>
<ApiMember(DataType:="string", Name:="OAuthToken", ParameterType:="header")>
Public Overridable Property OAuthToken As String
End Class
<DataContract>
Public Partial Class BaseResponse
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="BaseResponseResult", Description:="", Name:="Status", ParameterType:="body")>
Public Overridable Property Status As BaseResponseResult
<DataContract>
Public Partial Class BaseResponseResult
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="StatusCode", ParameterType:="body")>
Public Overridable Property StatusCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Login", ParameterType:="body")>
Public Overridable Property Login As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorCode", ParameterType:="body")>
Public Overridable Property ErrorCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorDisplayText", ParameterType:="body")>
Public Overridable Property ErrorDisplayText As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorMessage", ParameterType:="body")>
Public Overridable Property ErrorMessage As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="DomainName", ParameterType:="body")>
Public Overridable Property DomainName As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="IPAddress", ParameterType:="body")>
Public Overridable Property IpAddress As String
End Class
End Class
<DataContract>
Public Partial Class BaseSecureRequest
Inherits BaseRequest
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Token", ParameterType:="Header")>
Public Overridable Property Token As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="DeviceId", ParameterType:="Header")>
Public Overridable Property DeviceId As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", IsRequired:=true, Name:="AppId", ParameterType:="Header")>
Public Overridable Property AppId As String
End Class
'''<Summary>
'''GetStationsRequires active-e Station Reservations Service
'''</Summary>
<DataContract>
Public Partial Class GetStationsRequest
Inherits BaseSecureRequest
'''<Summary>
'''If sent, only stations at the passed location will be returned.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, only stations at the passed location will be returned.", Format:="int64", Name:="LocationId", ParameterType:="query")>
Public Overridable Property LocationId As Nullable(Of Long)
'''<Summary>
'''If sent, only stations in the passed Station group will be returned
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, only stations in the passed Station group will be returned", Format:="int64", Name:="GroupId", ParameterType:="query")>
Public Overridable Property GroupId As Nullable(Of Long)
<DataMember>
Public Overridable Property Acct As Nullable(Of Integer)
<DataMember>
Public Overridable Property GenerateAvailabilityCalendar As Boolean
'''<Summary>
'''If sent, the availability calendar will be for the next X days
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will be for the next X days", Format:="int64", Name:="AvailabilityCalendarDays", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarDays As Nullable(Of Integer)
'''<Summary>
'''If sent, the availability calendar will be for the sent date only
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will be for the sent date only", Format:="int64", Name:="AvailabilityCalendarDate", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarDate As Nullable(Of Date)
'''<Summary>
'''If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.", Format:="int64", Name:="AvailabilityCalendarReservationLength", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarReservationLength As Nullable(Of Integer)
End Class
<DataContract>
Public Partial Class GetStationsResponse
Inherits BaseResponse
Public Sub New()
Stations = New List(Of StationInfo)
End Sub
<DataMember>
Public Overridable Property Stations As List(Of StationInfo)
<DataContract>
Public Partial Class StationInfo
Public Sub New()
Reservations = New List(Of ReservationInfo)
AvailabilityCalendar = New List(Of Date)
End Sub
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property Name As String
<DataMember>
Public Overridable Property WebDescription As String
<DataMember>
Public Overridable Property MaxUsers As Integer
<DataMember>
Public Overridable Property Location As LocationInfo
<DataMember>
Public Overridable Property CurrentStatus As String
<DataMember>
Public Overridable Property Reservations As List(Of ReservationInfo)
<DataMember>
Public Overridable Property AvailabilityCalendar As List(Of Date)
<DataMember>
Public Overridable Property Topic As String
<DataContract>
Public Partial Class ReservationInfo
<DataMember>
Public Overridable Property Start As Date
<DataMember>
Public Overridable Property [End] As Date
<DataMember>
Public Overridable Property CustomerAcct As Nullable(Of Integer)
End Class
End Class
End Class
End Namespace
End Namespace
VB.NET GetStationsRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/GetStations HTTP/1.1 Host: active-ewebservice.biz Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Stations":[{"Id":0,"Name":"String","WebDescription":"String","MaxUsers":0,"Location":{"Id":0,"Desc":"String","ShortDesc":"String","Region":"String","Latitude":0,"Longitude":0,"InStorePickup":"String","Active":false,"CashSaleAcct":0},"CurrentStatus":"String","Reservations":[{"CustomerAcct":0}],"AvailabilityCalendar":["0001-01-01T00:00:00.0000000"],"Topic":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}