| GET,OPTIONS | /v1/weather/branch |
|---|
namespace CRM.AgencyPlatform.API.Internal
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type WeatherDay() =
member val Date:String = null with get,set
member val DayLabel:String = null with get,set
member val ShortForecast:String = null with get,set
member val TempHi:Nullable<Int32> = new Nullable<Int32>() with get,set
member val TempLo:Nullable<Int32> = new Nullable<Int32>() with get,set
member val TempUnit:String = null with get,set
member val Pop:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Severity:String = null with get,set
member val HasAlert:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type WeatherForecastResponse() =
member val BranchName:String = null with get,set
member val Resolved:Boolean = new Boolean() with get,set
member val AlertHeadline:String = null with get,set
member val Days:ResizeArray<WeatherDay> = new ResizeArray<WeatherDay>() with get,set
member val ResponseStatus:ResponseStatus = null with get,set
[<AllowNullLiteral>]
type BranchWeatherRequest() =
member val BranchId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val Start:String = null with get,set
member val Days:Nullable<Int32> = new Nullable<Int32>() with get,set
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/weather/branch HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WeatherForecastResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AlertHeadline>String</AlertHeadline>
<BranchName>String</BranchName>
<Days>
<WeatherDay>
<Date>String</Date>
<DayLabel>String</DayLabel>
<HasAlert>false</HasAlert>
<Pop>0</Pop>
<Severity>String</Severity>
<ShortForecast>String</ShortForecast>
<TempHi>0</TempHi>
<TempLo>0</TempLo>
<TempUnit>String</TempUnit>
</WeatherDay>
</Days>
<Resolved>false</Resolved>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</WeatherForecastResponse>