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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	BranchName: String,
	Resolved: False,
	AlertHeadline: String,
	Days: 
	[
		{
			Date: String,
			DayLabel: String,
			ShortForecast: String,
			TempHi: 0,
			TempLo: 0,
			TempUnit: String,
			Pop: 0,
			Severity: String,
			HasAlert: False
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}