| All Verbs | /DefineAreas/{Areas} |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports GoToLightAPI
Namespace Global
Namespace GoToLightAPI
Public Partial Class Area
Public Overridable Property AreaID As Integer
Public Overridable Property Label As String
Public Overridable Property StockroomID As Long?
Public Overridable Property Content As List(Of AreaContent) = New List(Of AreaContent)
Public Overridable Property NumberOfPixels As Integer
End Class
Public Partial Class AreaContent
Public Overridable Property ID As Integer
Public Overridable Property LCAddress As String
Public Overridable Property PixelStart As Integer
Public Overridable Property PixelStop As Integer
Public Overridable Property AreaID As Integer
Public Overridable Property Pos As Integer
Public Overridable Property Reverse As Boolean
End Class
Public Partial Class DefineAreas
'''<Summary>
'''Areas
'''</Summary>
<ApiMember(Description:="Areas", IsRequired:=true)>
Public Overridable Property Areas As Area() = New Area(){}
End Class
End Namespace
End Namespace
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 /DefineAreas/{Areas} HTTP/1.1
Host: clouddemo.pickeos.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Areas:
[
{
AreaID: 0,
Label: String,
StockroomID: 0,
Content:
[
{
ID: 0,
LCAddress: String,
PixelStart: 0,
PixelStop: 0,
AreaID: 0,
Pos: 0,
Reverse: False
}
],
NumberOfPixels: 1
}
]
}