swagger

package module
v0.0.0-...-60dfd94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 21 Imported by: 0

README

GO client for WeatherAPI.com

Introduction

WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy.

We provide following data through our API:

  • Real-time weather
  • 14 day weather forecast
  • Historical Weather
  • Marine Weather and Tide Data
  • Future Weather (Upto 365 days ahead)
  • Daily and hourly intervals
  • 15 min interval (Enterprise only)
  • Astronomy
  • Time zone
  • Location data
  • Sports
  • Search or Autocomplete API
  • Weather Alerts
  • Air Quality Data
  • Bulk Request

Getting Started

You need to signup and then you can find your API key under your account, and start using API right away!

Try our weather API by using interactive API Explorer.

We also have SDK for popular framework/languages available on Github for quick integrations.

If you find any features missing or have any suggestions, please contact us.

Authentication

API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key.

Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API .

key parameter

key=YOUR API KEY

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://api.weatherapi.com/v1

Class Method HTTP request Description
APIsApi Astronomy Get /astronomy.json Astronomy API
APIsApi ForecastWeather Get /forecast.json Forecast API
APIsApi FutureWeather Get /future.json Future API
APIsApi HistoryWeather Get /history.json History API
APIsApi IpLookup Get /ip.json IP Lookup API
APIsApi MarineWeather Get /marine.json Marine Weather API
APIsApi RealtimeWeather Get /current.json Realtime API
APIsApi SearchAutocompleteWeather Get /search.json Search/Autocomplete API
APIsApi TimeZone Get /timezone.json Time Zone API

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

Documentation

Overview

* Weather API * * # Introduction WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: - Real-time weather - 14 day weather forecast - Astronomy - Time zone - Location data - Search or Autocomplete API - NEW: Historical weather - NEW: Future Weather (Upto 300 days ahead) - Weather Alerts - Air Quality Data # Getting Started You need to [signup](https://www.weatherapi.com/signup.aspx) and then you can find your API key under [your account](https://www.weatherapi.com/login.aspx), and start using API right away! We have [code libraries](https://www.weatherapi.com/docs/code-libraries.aspx) for different programming languages like PHP, .net, JAVA, etc. If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). # Authentication API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key. Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . ## key parameter key=<YOUR API KEY> * * API version: 1.0.0-oas3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Weather API * * # Introduction WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: - Real-time weather - 14 day weather forecast - Astronomy - Time zone - Location data - Search or Autocomplete API - NEW: Historical weather - NEW: Future Weather (Upto 300 days ahead) - Weather Alerts - Air Quality Data # Getting Started You need to [signup](https://www.weatherapi.com/signup.aspx) and then you can find your API key under [your account](https://www.weatherapi.com/login.aspx), and start using API right away! We have [code libraries](https://www.weatherapi.com/docs/code-libraries.aspx) for different programming languages like PHP, .net, JAVA, etc. If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). # Authentication API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key. Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . ## key parameter key=<YOUR API KEY> * * API version: 1.0.0-oas3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Weather API * * # Introduction WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: - Real-time weather - 14 day weather forecast - Astronomy - Time zone - Location data - Search or Autocomplete API - NEW: Historical weather - NEW: Future Weather (Upto 300 days ahead) - Weather Alerts - Air Quality Data # Getting Started You need to [signup](https://www.weatherapi.com/signup.aspx) and then you can find your API key under [your account](https://www.weatherapi.com/login.aspx), and start using API right away! We have [code libraries](https://www.weatherapi.com/docs/code-libraries.aspx) for different programming languages like PHP, .net, JAVA, etc. If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). # Authentication API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key. Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . ## key parameter key=<YOUR API KEY> * * API version: 1.0.0-oas3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Weather API * * # Introduction WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: - Real-time weather - 14 day weather forecast - Astronomy - Time zone - Location data - Search or Autocomplete API - NEW: Historical weather - NEW: Future Weather (Upto 300 days ahead) - Weather Alerts - Air Quality Data # Getting Started You need to [signup](https://www.weatherapi.com/signup.aspx) and then you can find your API key under [your account](https://www.weatherapi.com/login.aspx), and start using API right away! We have [code libraries](https://www.weatherapi.com/docs/code-libraries.aspx) for different programming languages like PHP, .net, JAVA, etc. If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). # Authentication API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key. Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . ## key parameter key=<YOUR API KEY> * * API version: 1.0.0-oas3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Weather API * * # Introduction WeatherAPI.com provides access to weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: - Real-time weather - 14 day weather forecast - Astronomy - Time zone - Location data - Search or Autocomplete API - NEW: Historical weather - NEW: Future Weather (Upto 300 days ahead) - Weather Alerts - Air Quality Data # Getting Started You need to [signup](https://www.weatherapi.com/signup.aspx) and then you can find your API key under [your account](https://www.weatherapi.com/login.aspx), and start using API right away! We have [code libraries](https://www.weatherapi.com/docs/code-libraries.aspx) for different programming languages like PHP, .net, JAVA, etc. If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). # Authentication API access to the data is protected by an API key. If at anytime, you find the API key has become vulnerable, please regenerate the key using Regenerate button next to the API key. Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . ## key parameter key=<YOUR API KEY> * * API version: 1.0.0-oas3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	APIsApi *APIsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Weather API API v1.0.2 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type APIsApiForecastWeatherOpts

type APIsApiForecastWeatherOpts struct {
	Dt     optional.String
	Unixdt optional.Int32
	Hour   optional.Int32
	Lang   optional.String
	Alerts optional.String
	Aqi    optional.String
	Tp     optional.Int32
}

type APIsApiFutureWeatherOpts

type APIsApiFutureWeatherOpts struct {
	Dt   optional.String
	Lang optional.String
}

type APIsApiHistoryWeatherOpts

type APIsApiHistoryWeatherOpts struct {
	Unixdt    optional.Int32
	EndDt     optional.String
	UnixendDt optional.Int32
	Hour      optional.Int32
	Lang      optional.String
}

type APIsApiMarineWeatherOpts

type APIsApiMarineWeatherOpts struct {
	Dt     optional.String
	Unixdt optional.Int32
	Hour   optional.Int32
	Lang   optional.String
}

type APIsApiRealtimeWeatherOpts

type APIsApiRealtimeWeatherOpts struct {
	Lang optional.String
}

type APIsApiService

type APIsApiService service

func (*APIsApiService) Astronomy

func (a *APIsApiService) Astronomy(ctx context.Context, q string, dt string) (InlineResponse2003, *http.Response, error)

APIsApiService Astronomy API Return Location and Astronomy Object

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param q Pass US Zipcode, UK Postcode, Canada Postalcode, IP address, Latitude/Longitude (decimal degree) or city name. Visit [request parameter section](https://www.weatherapi.com/docs/#intro-request) to learn more.
  • @param dt Date on or after 1st Jan, 2015 in yyyy-MM-dd format

@return InlineResponse2003

func (*APIsApiService) ForecastWeather

func (a *APIsApiService) ForecastWeather(ctx context.Context, q string, days int32, localVarOptionals *APIsApiForecastWeatherOpts) (interface{}, *http.Response, error)

func (*APIsApiService) FutureWeather

func (a *APIsApiService) FutureWeather(ctx context.Context, q string, localVarOptionals *APIsApiFutureWeatherOpts) (interface{}, *http.Response, error)

func (*APIsApiService) HistoryWeather

func (a *APIsApiService) HistoryWeather(ctx context.Context, q string, dt string, localVarOptionals *APIsApiHistoryWeatherOpts) (interface{}, *http.Response, error)

func (*APIsApiService) IpLookup

func (a *APIsApiService) IpLookup(ctx context.Context, q string) (Ip, *http.Response, error)

APIsApiService IP Lookup API IP Lookup API method allows a user to get up to date information for an IP address.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param q Pass IP address.

@return Ip

func (*APIsApiService) MarineWeather

func (a *APIsApiService) MarineWeather(ctx context.Context, q string, days int32, localVarOptionals *APIsApiMarineWeatherOpts) (interface{}, *http.Response, error)

func (*APIsApiService) RealtimeWeather

func (a *APIsApiService) RealtimeWeather(ctx context.Context, q string, localVarOptionals *APIsApiRealtimeWeatherOpts) (interface{}, *http.Response, error)

func (*APIsApiService) SearchAutocompleteWeather

func (a *APIsApiService) SearchAutocompleteWeather(ctx context.Context, q string) ([]Search, *http.Response, error)

APIsApiService Search/Autocomplete API WeatherAPI.com Search or Autocomplete API returns matching cities and towns as an array of Location object.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param q Pass US Zipcode, UK Postcode, Canada Postalcode, IP address, Latitude/Longitude (decimal degree) or city name. Visit [request parameter section](https://www.weatherapi.com/docs/#intro-request) to learn more.

@return []Search

func (*APIsApiService) TimeZone

func (a *APIsApiService) TimeZone(ctx context.Context, q string) (Location, *http.Response, error)

APIsApiService Time Zone API Return Location Object

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param q Pass US Zipcode, UK Postcode, Canada Postalcode, IP address, Latitude/Longitude (decimal degree) or city name. Visit [request parameter section](https://www.weatherapi.com/docs/#intro-request) to learn more.

@return Location

type Alerts

type Alerts struct {
	Alert []AlertsAlert `json:"alert,omitempty"`
}

type AlertsAlert

type AlertsAlert struct {
	Headline    string    `json:"headline,omitempty"`
	Msgtype     string    `json:"msgtype,omitempty"`
	Severity    string    `json:"severity,omitempty"`
	Urgency     string    `json:"urgency,omitempty"`
	Areas       string    `json:"areas,omitempty"`
	Category    string    `json:"category,omitempty"`
	Certainty   string    `json:"certainty,omitempty"`
	Event       string    `json:"event,omitempty"`
	Note        string    `json:"note,omitempty"`
	Effective   time.Time `json:"effective,omitempty"`
	Expires     time.Time `json:"expires,omitempty"`
	Desc        string    `json:"desc,omitempty"`
	Instruction string    `json:"instruction,omitempty"`
}

type ArrayOfSearch

type ArrayOfSearch struct {
}

type Astronomy

type Astronomy struct {
	Astro *AstronomyAstro `json:"astro,omitempty"`
}

type AstronomyAstro

type AstronomyAstro struct {
	Sunrise          string `json:"sunrise,omitempty"`
	Sunset           string `json:"sunset,omitempty"`
	Moonrise         string `json:"moonrise,omitempty"`
	Moonset          string `json:"moonset,omitempty"`
	MoonPhase        string `json:"moon_phase,omitempty"`
	MoonIllumination string `json:"moon_illumination,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type Current

type Current struct {
	LastUpdatedEpoch int32              `json:"last_updated_epoch,omitempty"`
	LastUpdated      string             `json:"last_updated,omitempty"`
	TempC            float32            `json:"temp_c,omitempty"`
	TempF            float32            `json:"temp_f,omitempty"`
	IsDay            int32              `json:"is_day,omitempty"`
	Condition        *CurrentCondition  `json:"condition,omitempty"`
	WindMph          float32            `json:"wind_mph,omitempty"`
	WindKph          float32            `json:"wind_kph,omitempty"`
	WindDegree       float32            `json:"wind_degree,omitempty"`
	WindDir          string             `json:"wind_dir,omitempty"`
	PressureMb       float32            `json:"pressure_mb,omitempty"`
	PressureIn       float32            `json:"pressure_in,omitempty"`
	PrecipMm         float32            `json:"precip_mm,omitempty"`
	PrecipIn         float32            `json:"precip_in,omitempty"`
	Humidity         float32            `json:"humidity,omitempty"`
	Cloud            float32            `json:"cloud,omitempty"`
	FeelslikeC       float32            `json:"feelslike_c,omitempty"`
	FeelslikeF       float32            `json:"feelslike_f,omitempty"`
	VisKm            float32            `json:"vis_km,omitempty"`
	VisMiles         float32            `json:"vis_miles,omitempty"`
	Uv               int32              `json:"uv,omitempty"`
	GustMph          float32            `json:"gust_mph,omitempty"`
	GustKph          float32            `json:"gust_kph,omitempty"`
	AirQuality       *CurrentAirQuality `json:"air_quality,omitempty"`
}

type CurrentAirQuality

type CurrentAirQuality struct {
	Co           float32 `json:"co,omitempty"`
	No2          float32 `json:"no2,omitempty"`
	O3           float32 `json:"o3,omitempty"`
	So2          float32 `json:"so2,omitempty"`
	Pm25         float32 `json:"pm2_5,omitempty"`
	Pm10         float32 `json:"pm10,omitempty"`
	UsEpaIndex   int32   `json:"us-epa-index,omitempty"`
	GbDefraIndex int32   `json:"gb-defra-index,omitempty"`
}

type CurrentCondition

type CurrentCondition struct {
	Text string `json:"text,omitempty"`
	Icon string `json:"icon,omitempty"`
	Code int32  `json:"code,omitempty"`
}

type Error400

type Error400 struct {
	Code    int32  `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type Error401

type Error401 struct {
	Code    int32  `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type Error403

type Error403 struct {
	Code    int32  `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type Forecast

type Forecast struct {
	Forecastday []ForecastForecastday `json:"forecastday,omitempty"`
}

type ForecastAstro

type ForecastAstro struct {
	Sunrise          string `json:"sunrise,omitempty"`
	Sunset           string `json:"sunset,omitempty"`
	Moonrise         string `json:"moonrise,omitempty"`
	Moonset          string `json:"moonset,omitempty"`
	MoonPhase        string `json:"moon_phase,omitempty"`
	MoonIllumination string `json:"moon_illumination,omitempty"`
}

type ForecastCondition

type ForecastCondition struct {
	Text string `json:"text,omitempty"`
	Icon string `json:"icon,omitempty"`
	Code int32  `json:"code,omitempty"`
}

type ForecastDay

type ForecastDay struct {
	MaxtempC          float32               `json:"maxtemp_c,omitempty"`
	MaxtempF          float32               `json:"maxtemp_f,omitempty"`
	MintempC          float32               `json:"mintemp_c,omitempty"`
	MintempF          float32               `json:"mintemp_f,omitempty"`
	AvgtempC          float32               `json:"avgtemp_c,omitempty"`
	AvgtempF          float32               `json:"avgtemp_f,omitempty"`
	MaxwindMph        float32               `json:"maxwind_mph,omitempty"`
	MaxwindKph        float32               `json:"maxwind_kph,omitempty"`
	TotalprecipMm     float32               `json:"totalprecip_mm,omitempty"`
	TotalprecipIn     float32               `json:"totalprecip_in,omitempty"`
	AvgvisKm          float32               `json:"avgvis_km,omitempty"`
	AvgvisMiles       float32               `json:"avgvis_miles,omitempty"`
	Avghumidity       float32               `json:"avghumidity,omitempty"`
	DailyWillItRain   int32                 `json:"daily_will_it_rain,omitempty"`
	DailyChanceOfRain float32               `json:"daily_chance_of_rain,omitempty"`
	DailyWillItSnow   int32                 `json:"daily_will_it_snow,omitempty"`
	DailyChanceOfSnow float32               `json:"daily_chance_of_snow,omitempty"`
	Condition         *ForecastDayCondition `json:"condition,omitempty"`
	Uv                int32                 `json:"uv,omitempty"`
}

type ForecastDayCondition

type ForecastDayCondition struct {
	Text string `json:"text,omitempty"`
	Icon string `json:"icon,omitempty"`
	Code int32  `json:"code,omitempty"`
}

type ForecastForecastday

type ForecastForecastday struct {
	Date      string         `json:"date,omitempty"`
	DateEpoch int32          `json:"date_epoch,omitempty"`
	Day       *ForecastDay   `json:"day,omitempty"`
	Astro     *ForecastAstro `json:"astro,omitempty"`
	Hour      []ForecastHour `json:"hour,omitempty"`
}

type ForecastHour

type ForecastHour struct {
	TimeEpoch    int32              `json:"time_epoch,omitempty"`
	Time         string             `json:"time,omitempty"`
	TempC        float32            `json:"temp_c,omitempty"`
	TempF        float32            `json:"temp_f,omitempty"`
	IsDay        int32              `json:"is_day,omitempty"`
	Condition    *ForecastCondition `json:"condition,omitempty"`
	WindMph      float32            `json:"wind_mph,omitempty"`
	WindKph      float32            `json:"wind_kph,omitempty"`
	WindDegree   float32            `json:"wind_degree,omitempty"`
	WindDir      string             `json:"wind_dir,omitempty"`
	PressureMb   float32            `json:"pressure_mb,omitempty"`
	PressureIn   float32            `json:"pressure_in,omitempty"`
	PrecipMm     float32            `json:"precip_mm,omitempty"`
	PrecipIn     float32            `json:"precip_in,omitempty"`
	Humidity     float32            `json:"humidity,omitempty"`
	Cloud        float32            `json:"cloud,omitempty"`
	FeelslikeC   float32            `json:"feelslike_c,omitempty"`
	FeelslikeF   float32            `json:"feelslike_f,omitempty"`
	WindchillC   float32            `json:"windchill_c,omitempty"`
	WindchillF   float32            `json:"windchill_f,omitempty"`
	HeatindexC   float32            `json:"heatindex_c,omitempty"`
	HeatindexF   float32            `json:"heatindex_f,omitempty"`
	DewpointC    float32            `json:"dewpoint_c,omitempty"`
	DewpointF    float32            `json:"dewpoint_f,omitempty"`
	WillItRain   int32              `json:"will_it_rain,omitempty"`
	ChanceOfRain float32            `json:"chance_of_rain,omitempty"`
	WillItSnow   int32              `json:"will_it_snow,omitempty"`
	ChanceOfSnow float32            `json:"chance_of_snow,omitempty"`
	VisKm        float32            `json:"vis_km,omitempty"`
	VisMiles     float32            `json:"vis_miles,omitempty"`
	GustMph      float32            `json:"gust_mph,omitempty"`
	GustKph      float32            `json:"gust_kph,omitempty"`
	Uv           int32              `json:"uv,omitempty"`
}

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type InlineResponse200

type InlineResponse200 struct {
	Location *Location `json:"location,omitempty"`
	Current  *Current  `json:"current,omitempty"`
}

type InlineResponse2001

type InlineResponse2001 struct {
	Location *Location `json:"location,omitempty"`
	Current  *Current  `json:"current,omitempty"`
	Forecast *Forecast `json:"forecast,omitempty"`
	Alerts   *Alerts   `json:"alerts,omitempty"`
}

type InlineResponse2002

type InlineResponse2002 struct {
	Location *Location `json:"location,omitempty"`
	Forecast *Forecast `json:"forecast,omitempty"`
}

type InlineResponse2003

type InlineResponse2003 struct {
	Location  *Location  `json:"location,omitempty"`
	Astronomy *Astronomy `json:"astronomy,omitempty"`
}

type Ip

type Ip struct {
	Ip             string  `json:"ip,omitempty"`
	Type_          string  `json:"type,omitempty"`
	ContinentCode  string  `json:"continent_code,omitempty"`
	ContinentName  string  `json:"continent_name,omitempty"`
	CountryCode    string  `json:"country_code,omitempty"`
	CountryName    string  `json:"country_name,omitempty"`
	IsEu           string  `json:"is_eu,omitempty"`
	GeonameId      int32   `json:"geoname_id,omitempty"`
	City           string  `json:"city,omitempty"`
	Region         string  `json:"region,omitempty"`
	Lat            float32 `json:"lat,omitempty"`
	Lon            float32 `json:"lon,omitempty"`
	TzId           string  `json:"tz_id,omitempty"`
	LocaltimeEpoch int32   `json:"localtime_epoch,omitempty"`
	Localtime      string  `json:"localtime,omitempty"`
}

type Location

type Location struct {
	Name           string  `json:"name,omitempty"`
	Region         string  `json:"region,omitempty"`
	Country        string  `json:"country,omitempty"`
	Lat            float32 `json:"lat,omitempty"`
	Lon            float32 `json:"lon,omitempty"`
	TzId           string  `json:"tz_id,omitempty"`
	LocaltimeEpoch int32   `json:"localtime_epoch,omitempty"`
	Localtime      string  `json:"localtime,omitempty"`
}

type Marine

type Marine struct {
	Forecastday []MarineForecastday `json:"forecastday,omitempty"`
}

type MarineForecastday

type MarineForecastday struct {
	Date      string         `json:"date,omitempty"`
	DateEpoch int32          `json:"date_epoch,omitempty"`
	Day       *ForecastDay   `json:"day,omitempty"`
	Astro     *ForecastAstro `json:"astro,omitempty"`
	Hour      []MarineHour   `json:"hour,omitempty"`
}

type MarineHour

type MarineHour struct {
	TimeEpoch       int32              `json:"time_epoch,omitempty"`
	Time            string             `json:"time,omitempty"`
	TempC           float32            `json:"temp_c,omitempty"`
	TempF           float32            `json:"temp_f,omitempty"`
	IsDay           int32              `json:"is_day,omitempty"`
	Condition       *ForecastCondition `json:"condition,omitempty"`
	WindMph         float32            `json:"wind_mph,omitempty"`
	WindKph         float32            `json:"wind_kph,omitempty"`
	WindDegree      float32            `json:"wind_degree,omitempty"`
	WindDir         string             `json:"wind_dir,omitempty"`
	PressureMb      float32            `json:"pressure_mb,omitempty"`
	PressureIn      float32            `json:"pressure_in,omitempty"`
	PrecipMm        float32            `json:"precip_mm,omitempty"`
	PrecipIn        float32            `json:"precip_in,omitempty"`
	Humidity        float32            `json:"humidity,omitempty"`
	Cloud           float32            `json:"cloud,omitempty"`
	FeelslikeC      float32            `json:"feelslike_c,omitempty"`
	FeelslikeF      float32            `json:"feelslike_f,omitempty"`
	WindchillC      float32            `json:"windchill_c,omitempty"`
	WindchillF      float32            `json:"windchill_f,omitempty"`
	HeatindexC      float32            `json:"heatindex_c,omitempty"`
	HeatindexF      float32            `json:"heatindex_f,omitempty"`
	DewpointC       float32            `json:"dewpoint_c,omitempty"`
	DewpointF       float32            `json:"dewpoint_f,omitempty"`
	WillItRain      int32              `json:"will_it_rain,omitempty"`
	ChanceOfRain    float32            `json:"chance_of_rain,omitempty"`
	WillItSnow      int32              `json:"will_it_snow,omitempty"`
	ChanceOfSnow    float32            `json:"chance_of_snow,omitempty"`
	VisKm           float32            `json:"vis_km,omitempty"`
	VisMiles        float32            `json:"vis_miles,omitempty"`
	GustMph         float32            `json:"gust_mph,omitempty"`
	GustKph         float32            `json:"gust_kph,omitempty"`
	SigHtMt         float32            `json:"sig_ht_mt,omitempty"`
	SwellHtMt       float32            `json:"swell_ht_mt,omitempty"`
	SwellHtFt       float32            `json:"swell_ht_ft,omitempty"`
	SwellDir        float32            `json:"swell_dir,omitempty"`
	SwellDir16Point float32            `json:"swell_dir_16_point,omitempty"`
	SwellPeriodSecs float32            `json:"swell_period_secs,omitempty"`
	Uv              int32              `json:"uv,omitempty"`
}
type Search struct {
	Id      int32   `json:"id,omitempty"`
	Name    string  `json:"name,omitempty"`
	Region  string  `json:"region,omitempty"`
	Country string  `json:"country,omitempty"`
	Lat     float32 `json:"lat,omitempty"`
	Lon     float32 `json:"lon,omitempty"`
	Url     string  `json:"url,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL