Trendsic Platform Service

<back to all web services

BranchWeatherRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/weather/branch
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class BranchWeatherRequest
    {
        public UUID BranchId = null;
        public String Start = null;
        public Integer Days = null;
        
        public UUID getBranchId() { return BranchId; }
        public BranchWeatherRequest setBranchId(UUID value) { this.BranchId = value; return this; }
        public String getStart() { return Start; }
        public BranchWeatherRequest setStart(String value) { this.Start = value; return this; }
        public Integer getDays() { return Days; }
        public BranchWeatherRequest setDays(Integer value) { this.Days = value; return this; }
    }

    public static class WeatherForecastResponse
    {
        public String BranchName = null;
        public Boolean Resolved = null;
        public String AlertHeadline = null;
        public ArrayList<WeatherDay> Days = new ArrayList<WeatherDay>();
        public ResponseStatus ResponseStatus = null;
        
        public String getBranchName() { return BranchName; }
        public WeatherForecastResponse setBranchName(String value) { this.BranchName = value; return this; }
        public Boolean isResolved() { return Resolved; }
        public WeatherForecastResponse setResolved(Boolean value) { this.Resolved = value; return this; }
        public String getAlertHeadline() { return AlertHeadline; }
        public WeatherForecastResponse setAlertHeadline(String value) { this.AlertHeadline = value; return this; }
        public ArrayList<WeatherDay> getDays() { return Days; }
        public WeatherForecastResponse setDays(ArrayList<WeatherDay> value) { this.Days = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public WeatherForecastResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class WeatherDay
    {
        public String Date = null;
        public String DayLabel = null;
        public String ShortForecast = null;
        public Integer TempHi = null;
        public Integer TempLo = null;
        public String TempUnit = null;
        public Integer Pop = null;
        public String Severity = null;
        public Boolean HasAlert = null;
        
        public String getDate() { return Date; }
        public WeatherDay setDate(String value) { this.Date = value; return this; }
        public String getDayLabel() { return DayLabel; }
        public WeatherDay setDayLabel(String value) { this.DayLabel = value; return this; }
        public String getShortForecast() { return ShortForecast; }
        public WeatherDay setShortForecast(String value) { this.ShortForecast = value; return this; }
        public Integer getTempHi() { return TempHi; }
        public WeatherDay setTempHi(Integer value) { this.TempHi = value; return this; }
        public Integer getTempLo() { return TempLo; }
        public WeatherDay setTempLo(Integer value) { this.TempLo = value; return this; }
        public String getTempUnit() { return TempUnit; }
        public WeatherDay setTempUnit(String value) { this.TempUnit = value; return this; }
        public Integer getPop() { return Pop; }
        public WeatherDay setPop(Integer value) { this.Pop = value; return this; }
        public String getSeverity() { return Severity; }
        public WeatherDay setSeverity(String value) { this.Severity = value; return this; }
        public Boolean isHasAlert() { return HasAlert; }
        public WeatherDay setHasAlert(Boolean value) { this.HasAlert = value; return this; }
    }

}

Java BranchWeatherRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>