├── LICENSE ├── README.md ├── build.gradle ├── build.sbt ├── docs ├── Alerts.md ├── AlertsAlert.md ├── ApIsApi.md ├── ApisApi.md ├── ArrayOfSearch.md ├── Astronomy.md ├── AstronomyAstro.md ├── Current.md ├── CurrentAirQuality.md ├── CurrentCondition.md ├── Error400.md ├── Error401.md ├── Error403.md ├── Forecast.md ├── ForecastAstro.md ├── ForecastCondition.md ├── ForecastDay.md ├── ForecastDayCondition.md ├── ForecastForecastday.md ├── ForecastHour.md ├── InlineResponse200.md ├── InlineResponse2001.md ├── InlineResponse2002.md ├── InlineResponse2003.md ├── Ip.md ├── Location.md ├── Marine.md ├── MarineForecastday.md ├── MarineHour.md └── Search.md ├── git_push.sh ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pom.xml ├── settings.gradle └── src ├── main ├── AndroidManifest.xml └── java │ └── io │ └── swagger │ └── client │ ├── ApiCallback.java │ ├── ApiClient.java │ ├── ApiException.java │ ├── ApiResponse.java │ ├── Configuration.java │ ├── GzipRequestInterceptor.java │ ├── JSON.java │ ├── Pair.java │ ├── ProgressRequestBody.java │ ├── ProgressResponseBody.java │ ├── StringUtil.java │ ├── api │ ├── ApIsApi.java │ └── ApisApi.java │ ├── auth │ ├── ApiKeyAuth.java │ ├── Authentication.java │ ├── HttpBasicAuth.java │ ├── OAuth.java │ └── OAuthFlow.java │ └── model │ ├── Alerts.java │ ├── AlertsAlert.java │ ├── ArrayOfSearch.java │ ├── Astronomy.java │ ├── AstronomyAstro.java │ ├── Current.java │ ├── CurrentAirQuality.java │ ├── CurrentCondition.java │ ├── Error400.java │ ├── Error401.java │ ├── Error403.java │ ├── Forecast.java │ ├── ForecastAstro.java │ ├── ForecastCondition.java │ ├── ForecastDay.java │ ├── ForecastDayCondition.java │ ├── ForecastForecastday.java │ ├── ForecastHour.java │ ├── InlineResponse200.java │ ├── InlineResponse2001.java │ ├── InlineResponse2002.java │ ├── InlineResponse2003.java │ ├── Ip.java │ ├── Location.java │ ├── Marine.java │ ├── MarineForecastday.java │ ├── MarineHour.java │ └── Search.java └── test └── java └── io └── swagger └── client └── api ├── ApIsApiTest.java └── ApisApiTest.java /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 weatherapi.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Ceasefire Now](https://badge.techforpalestine.org/default)](https://techforpalestine.org/learn-more) 2 | 3 | # JAVA client for WeatherAPI.com 4 | 5 | # Introduction 6 | 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. 7 | 8 | We provide following data through our API: 9 | - Real-time weather 10 | - 14 day weather forecast 11 | - Historical Weather 12 | - Marine Weather and Tide Data 13 | - Future Weather (Upto 365 days ahead) 14 | - Daily and hourly intervals 15 | - 15 min interval (Enterprise only) 16 | - Astronomy 17 | - Time zone 18 | - Location data 19 | - Sports 20 | - Search or Autocomplete API 21 | - Weather Alerts 22 | - Air Quality Data 23 | - Bulk Request 24 | 25 | # Getting Started 26 | 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! 27 | 28 | Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). 29 | 30 | We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 31 | 32 | If you find any features missing or have any suggestions, please [contact us](https://www.weatherapi.com/contact.aspx). 33 | 34 | # Authentication 35 | 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. 36 | 37 | Authentication to the WeatherAPI.com API is provided by passing your API key as request parameter through an API . 38 | 39 | ## key parameter 40 | key=YOUR API KEY 41 | 42 | ## Requirements 43 | 44 | Building the API client library requires: 45 | 1. Java 1.7+ 46 | 2. Maven/Gradle 47 | 48 | ## Installation 49 | 50 | To install the API client library to your local Maven repository, simply execute: 51 | 52 | ```shell 53 | mvn clean install 54 | ``` 55 | 56 | To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: 57 | 58 | ```shell 59 | mvn clean deploy 60 | ``` 61 | 62 | Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. 63 | 64 | ### Maven users 65 | 66 | Add this dependency to your project's POM: 67 | 68 | ```xml 69 | 70 | io.swagger 71 | swagger-java-client 72 | 1.0.0 73 | compile 74 | 75 | ``` 76 | 77 | ### Gradle users 78 | 79 | Add this dependency to your project's build file: 80 | 81 | ```groovy 82 | compile "io.swagger:swagger-java-client:1.0.0" 83 | ``` 84 | 85 | ### Others 86 | 87 | At first generate the JAR by executing: 88 | 89 | ```shell 90 | mvn clean package 91 | ``` 92 | 93 | Then manually install the following JARs: 94 | 95 | * `target/swagger-java-client-1.0.0.jar` 96 | * `target/lib/*.jar` 97 | 98 | ## Getting Started 99 | 100 | Please follow the [installation](#installation) instruction and execute the following Java code: 101 | 102 | ```java 103 | 104 | import io.swagger.client.*; 105 | import io.swagger.client.auth.*; 106 | import io.swagger.client.model.*; 107 | import io.swagger.client.api.ApisApi; 108 | 109 | import java.io.File; 110 | import java.util.*; 111 | 112 | public class ApisApiExample { 113 | 114 | public static void main(String[] args) { 115 | ApiClient defaultClient = Configuration.getDefaultApiClient(); 116 | 117 | // Configure API key authorization: ApiKeyAuth 118 | ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); 119 | ApiKeyAuth.setApiKey("YOUR API KEY"); 120 | // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) 121 | //ApiKeyAuth.setApiKeyPrefix("Token"); 122 | 123 | ApisApi apiInstance = new ApisApi(); 124 | String q = "q_example"; // String | 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. 125 | LocalDate dt = LocalDate.now(); // LocalDate | Date on or after 1st Jan, 2015 in yyyy-MM-dd format 126 | try { 127 | Object result = apiInstance.astronomy(q, dt); 128 | System.out.println(result); 129 | } catch (ApiException e) { 130 | System.err.println("Exception when calling ApisApi#astronomy"); 131 | e.printStackTrace(); 132 | } 133 | } 134 | } 135 | 136 | ``` 137 | 138 | ## Documentation for API Endpoints 139 | 140 | All URIs are relative to *https://api.weatherapi.com/v1* 141 | 142 | Class | Method | HTTP request | Description 143 | ------------ | ------------- | ------------- | ------------- 144 | *ApisApi* | [**astronomy**](docs/ApisApi.md#astronomy) | **GET** /astronomy.json | Astronomy API 145 | *ApisApi* | [**forecastWeather**](docs/ApisApi.md#forecastWeather) | **GET** /forecast.json | Forecast API 146 | *ApisApi* | [**futureWeather**](docs/ApisApi.md#futureWeather) | **GET** /future.json | Future API 147 | *ApisApi* | [**historyWeather**](docs/ApisApi.md#historyWeather) | **GET** /history.json | History API 148 | *ApisApi* | [**ipLookup**](docs/ApisApi.md#ipLookup) | **GET** /ip.json | IP Lookup API 149 | *ApisApi* | [**marineWeather**](docs/ApisApi.md#marineWeather) | **GET** /marine.json | Marine Weather API 150 | *ApisApi* | [**realtimeWeather**](docs/ApisApi.md#realtimeWeather) | **GET** /current.json | Realtime API 151 | *ApisApi* | [**searchAutocompleteWeather**](docs/ApisApi.md#searchAutocompleteWeather) | **GET** /search.json | Search/Autocomplete API 152 | *ApisApi* | [**timeZone**](docs/ApisApi.md#timeZone) | **GET** /timezone.json | Time Zone API 153 | 154 | 155 | ## Documentation for Models 156 | 157 | - [Alerts](docs/Alerts.md) 158 | - [AlertsAlert](docs/AlertsAlert.md) 159 | - [ArrayOfSearch](docs/ArrayOfSearch.md) 160 | - [Astronomy](docs/Astronomy.md) 161 | - [AstronomyAstro](docs/AstronomyAstro.md) 162 | - [Current](docs/Current.md) 163 | - [CurrentAirQuality](docs/CurrentAirQuality.md) 164 | - [CurrentCondition](docs/CurrentCondition.md) 165 | - [Error400](docs/Error400.md) 166 | - [Error401](docs/Error401.md) 167 | - [Error403](docs/Error403.md) 168 | - [Forecast](docs/Forecast.md) 169 | - [ForecastAstro](docs/ForecastAstro.md) 170 | - [ForecastCondition](docs/ForecastCondition.md) 171 | - [ForecastDay](docs/ForecastDay.md) 172 | - [ForecastDayCondition](docs/ForecastDayCondition.md) 173 | - [ForecastForecastday](docs/ForecastForecastday.md) 174 | - [ForecastHour](docs/ForecastHour.md) 175 | - [Ip](docs/Ip.md) 176 | - [Location](docs/Location.md) 177 | - [Marine](docs/Marine.md) 178 | - [MarineForecastday](docs/MarineForecastday.md) 179 | - [MarineHour](docs/MarineHour.md) 180 | - [Search](docs/Search.md) 181 | 182 | 183 | ## Documentation for Authorization 184 | 185 | Authentication schemes defined for the API: 186 | ### ApiKeyAuth 187 | 188 | - **Type**: API key 189 | - **API key parameter name**: key 190 | - **Location**: URL query string 191 | 192 | 193 | ## Recommendation 194 | 195 | It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. 196 | 197 | ## Author 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'idea' 2 | apply plugin: 'eclipse' 3 | 4 | group = 'io.swagger' 5 | version = '1.0.0' 6 | 7 | buildscript { 8 | repositories { 9 | jcenter() 10 | } 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:2.3.+' 13 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' 14 | } 15 | } 16 | 17 | repositories { 18 | jcenter() 19 | } 20 | 21 | 22 | if(hasProperty('target') && target == 'android') { 23 | 24 | apply plugin: 'com.android.library' 25 | apply plugin: 'com.github.dcendents.android-maven' 26 | 27 | android { 28 | compileSdkVersion 25 29 | buildToolsVersion '25.0.2' 30 | defaultConfig { 31 | minSdkVersion 14 32 | targetSdkVersion 25 33 | } 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_7 36 | targetCompatibility JavaVersion.VERSION_1_7 37 | } 38 | 39 | // Rename the aar correctly 40 | libraryVariants.all { variant -> 41 | variant.outputs.each { output -> 42 | def outputFile = output.outputFile 43 | if (outputFile != null && outputFile.name.endsWith('.aar')) { 44 | def fileName = "${project.name}-${variant.baseName}-${version}.aar" 45 | output.outputFile = new File(outputFile.parent, fileName) 46 | } 47 | } 48 | } 49 | 50 | dependencies { 51 | provided 'jakarta.annotation:jakarta.annotation-api:1.3.5' 52 | } 53 | } 54 | 55 | afterEvaluate { 56 | android.libraryVariants.all { variant -> 57 | def task = project.tasks.create "jar${variant.name.capitalize()}", Jar 58 | task.description = "Create jar artifact for ${variant.name}" 59 | task.dependsOn variant.javaCompile 60 | task.from variant.javaCompile.destinationDir 61 | task.destinationDir = project.file("${project.buildDir}/outputs/jar") 62 | task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" 63 | artifacts.add('archives', task); 64 | } 65 | } 66 | 67 | task sourcesJar(type: Jar) { 68 | from android.sourceSets.main.java.srcDirs 69 | classifier = 'sources' 70 | } 71 | 72 | artifacts { 73 | archives sourcesJar 74 | } 75 | 76 | } else { 77 | 78 | apply plugin: 'java' 79 | apply plugin: 'maven' 80 | 81 | sourceCompatibility = JavaVersion.VERSION_1_7 82 | targetCompatibility = JavaVersion.VERSION_1_7 83 | 84 | install { 85 | repositories.mavenInstaller { 86 | pom.artifactId = 'swagger-java-client' 87 | } 88 | } 89 | 90 | task execute(type:JavaExec) { 91 | main = System.getProperty('mainClass') 92 | classpath = sourceSets.main.runtimeClasspath 93 | } 94 | } 95 | 96 | dependencies { 97 | compile 'io.swagger:swagger-annotations:1.5.17' 98 | compile 'com.squareup.okhttp:okhttp:2.7.5' 99 | compile 'com.squareup.okhttp:logging-interceptor:2.7.5' 100 | compile 'com.google.code.gson:gson:2.8.1' 101 | compile 'io.gsonfire:gson-fire:1.8.0' 102 | compile 'org.threeten:threetenbp:1.3.5' 103 | testCompile 'junit:junit:4.12' 104 | } 105 | -------------------------------------------------------------------------------- /build.sbt: -------------------------------------------------------------------------------- 1 | lazy val root = (project in file(".")). 2 | settings( 3 | organization := "io.swagger", 4 | name := "swagger-java-client", 5 | version := "1.0.0", 6 | scalaVersion := "2.11.4", 7 | scalacOptions ++= Seq("-feature"), 8 | javacOptions in compile ++= Seq("-Xlint:deprecation"), 9 | publishArtifact in (Compile, packageDoc) := false, 10 | resolvers += Resolver.mavenLocal, 11 | libraryDependencies ++= Seq( 12 | "io.swagger" % "swagger-annotations" % "1.5.17", 13 | "com.squareup.okhttp" % "okhttp" % "2.7.5", 14 | "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", 15 | "com.google.code.gson" % "gson" % "2.8.1", 16 | "org.threeten" % "threetenbp" % "1.4.1" % "compile", 17 | "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", 18 | "junit" % "junit" % "4.12" % "test", 19 | "com.novocode" % "junit-interface" % "0.10" % "test" 20 | ) 21 | ) 22 | -------------------------------------------------------------------------------- /docs/Alerts.md: -------------------------------------------------------------------------------- 1 | 2 | # Alerts 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **alert** | [**List<AlertsAlert>**](AlertsAlert.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AlertsAlert.md: -------------------------------------------------------------------------------- 1 | 2 | # AlertsAlert 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **headline** | **String** | | [optional] 8 | **msgtype** | **String** | | [optional] 9 | **severity** | **String** | | [optional] 10 | **urgency** | **String** | | [optional] 11 | **areas** | **String** | | [optional] 12 | **category** | **String** | | [optional] 13 | **certainty** | **String** | | [optional] 14 | **event** | **String** | | [optional] 15 | **note** | **String** | | [optional] 16 | **effective** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] 17 | **expires** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] 18 | **desc** | **String** | | [optional] 19 | **instruction** | **String** | | [optional] 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/ArrayOfSearch.md: -------------------------------------------------------------------------------- 1 | 2 | # ArrayOfSearch 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Astronomy.md: -------------------------------------------------------------------------------- 1 | 2 | # Astronomy 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **astro** | [**AstronomyAstro**](AstronomyAstro.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AstronomyAstro.md: -------------------------------------------------------------------------------- 1 | 2 | # AstronomyAstro 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **sunrise** | **String** | | [optional] 8 | **sunset** | **String** | | [optional] 9 | **moonrise** | **String** | | [optional] 10 | **moonset** | **String** | | [optional] 11 | **moonPhase** | **String** | | [optional] 12 | **moonIllumination** | **String** | | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/Current.md: -------------------------------------------------------------------------------- 1 | 2 | # Current 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **lastUpdatedEpoch** | **Integer** | | [optional] 8 | **lastUpdated** | **String** | | [optional] 9 | **tempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 10 | **tempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **isDay** | **Integer** | | [optional] 12 | **condition** | [**CurrentCondition**](CurrentCondition.md) | | [optional] 13 | **windMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 14 | **windKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 15 | **windDegree** | [**BigDecimal**](BigDecimal.md) | | [optional] 16 | **windDir** | **String** | | [optional] 17 | **pressureMb** | [**BigDecimal**](BigDecimal.md) | | [optional] 18 | **pressureIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 19 | **precipMm** | [**BigDecimal**](BigDecimal.md) | | [optional] 20 | **precipIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 21 | **humidity** | [**BigDecimal**](BigDecimal.md) | | [optional] 22 | **cloud** | [**BigDecimal**](BigDecimal.md) | | [optional] 23 | **feelslikeC** | [**BigDecimal**](BigDecimal.md) | | [optional] 24 | **feelslikeF** | [**BigDecimal**](BigDecimal.md) | | [optional] 25 | **visKm** | [**BigDecimal**](BigDecimal.md) | | [optional] 26 | **visMiles** | [**BigDecimal**](BigDecimal.md) | | [optional] 27 | **uv** | **Integer** | | [optional] 28 | **gustMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 29 | **gustKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 30 | **airQuality** | [**CurrentAirQuality**](CurrentAirQuality.md) | | [optional] 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/CurrentAirQuality.md: -------------------------------------------------------------------------------- 1 | 2 | # CurrentAirQuality 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **co** | [**BigDecimal**](BigDecimal.md) | | [optional] 8 | **no2** | [**BigDecimal**](BigDecimal.md) | | [optional] 9 | **o3** | [**BigDecimal**](BigDecimal.md) | | [optional] 10 | **so2** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **pm25** | [**BigDecimal**](BigDecimal.md) | | [optional] 12 | **pm10** | [**BigDecimal**](BigDecimal.md) | | [optional] 13 | **usEpaIndex** | **Integer** | | [optional] 14 | **gbDefraIndex** | **Integer** | | [optional] 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/CurrentCondition.md: -------------------------------------------------------------------------------- 1 | 2 | # CurrentCondition 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **text** | **String** | | [optional] 8 | **icon** | **String** | | [optional] 9 | **code** | **Integer** | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Error400.md: -------------------------------------------------------------------------------- 1 | 2 | # Error400 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **Integer** | | [optional] 8 | **message** | **String** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Error401.md: -------------------------------------------------------------------------------- 1 | 2 | # Error401 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **Integer** | | [optional] 8 | **message** | **String** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Error403.md: -------------------------------------------------------------------------------- 1 | 2 | # Error403 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **Integer** | | [optional] 8 | **message** | **String** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Forecast.md: -------------------------------------------------------------------------------- 1 | 2 | # Forecast 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **forecastday** | [**List<ForecastForecastday>**](ForecastForecastday.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ForecastAstro.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastAstro 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **sunrise** | **String** | | [optional] 8 | **sunset** | **String** | | [optional] 9 | **moonrise** | **String** | | [optional] 10 | **moonset** | **String** | | [optional] 11 | **moonPhase** | **String** | | [optional] 12 | **moonIllumination** | **String** | | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/ForecastCondition.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastCondition 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **text** | **String** | | [optional] 8 | **icon** | **String** | | [optional] 9 | **code** | **Integer** | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ForecastDay.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastDay 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **maxtempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 8 | **maxtempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 9 | **mintempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 10 | **mintempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **avgtempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 12 | **avgtempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 13 | **maxwindMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 14 | **maxwindKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 15 | **totalprecipMm** | [**BigDecimal**](BigDecimal.md) | | [optional] 16 | **totalprecipIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 17 | **avgvisKm** | [**BigDecimal**](BigDecimal.md) | | [optional] 18 | **avgvisMiles** | [**BigDecimal**](BigDecimal.md) | | [optional] 19 | **avghumidity** | [**BigDecimal**](BigDecimal.md) | | [optional] 20 | **dailyWillItRain** | **Integer** | | [optional] 21 | **dailyChanceOfRain** | [**BigDecimal**](BigDecimal.md) | | [optional] 22 | **dailyWillItSnow** | **Integer** | | [optional] 23 | **dailyChanceOfSnow** | [**BigDecimal**](BigDecimal.md) | | [optional] 24 | **condition** | [**ForecastDayCondition**](ForecastDayCondition.md) | | [optional] 25 | **uv** | **Integer** | | [optional] 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/ForecastDayCondition.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastDayCondition 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **text** | **String** | | [optional] 8 | **icon** | **String** | | [optional] 9 | **code** | **Integer** | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ForecastForecastday.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastForecastday 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **date** | [**LocalDate**](LocalDate.md) | | [optional] 8 | **dateEpoch** | **Integer** | | [optional] 9 | **day** | [**ForecastDay**](ForecastDay.md) | | [optional] 10 | **astro** | [**ForecastAstro**](ForecastAstro.md) | | [optional] 11 | **hour** | [**List<ForecastHour>**](ForecastHour.md) | | [optional] 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/ForecastHour.md: -------------------------------------------------------------------------------- 1 | 2 | # ForecastHour 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **timeEpoch** | **Integer** | | [optional] 8 | **time** | **String** | | [optional] 9 | **tempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 10 | **tempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **isDay** | **Integer** | | [optional] 12 | **condition** | [**ForecastCondition**](ForecastCondition.md) | | [optional] 13 | **windMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 14 | **windKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 15 | **windDegree** | [**BigDecimal**](BigDecimal.md) | | [optional] 16 | **windDir** | **String** | | [optional] 17 | **pressureMb** | [**BigDecimal**](BigDecimal.md) | | [optional] 18 | **pressureIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 19 | **precipMm** | [**BigDecimal**](BigDecimal.md) | | [optional] 20 | **precipIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 21 | **humidity** | [**BigDecimal**](BigDecimal.md) | | [optional] 22 | **cloud** | [**BigDecimal**](BigDecimal.md) | | [optional] 23 | **feelslikeC** | [**BigDecimal**](BigDecimal.md) | | [optional] 24 | **feelslikeF** | [**BigDecimal**](BigDecimal.md) | | [optional] 25 | **windchillC** | [**BigDecimal**](BigDecimal.md) | | [optional] 26 | **windchillF** | [**BigDecimal**](BigDecimal.md) | | [optional] 27 | **heatindexC** | [**BigDecimal**](BigDecimal.md) | | [optional] 28 | **heatindexF** | [**BigDecimal**](BigDecimal.md) | | [optional] 29 | **dewpointC** | [**BigDecimal**](BigDecimal.md) | | [optional] 30 | **dewpointF** | [**BigDecimal**](BigDecimal.md) | | [optional] 31 | **willItRain** | **Integer** | | [optional] 32 | **chanceOfRain** | [**BigDecimal**](BigDecimal.md) | | [optional] 33 | **willItSnow** | **Integer** | | [optional] 34 | **chanceOfSnow** | [**BigDecimal**](BigDecimal.md) | | [optional] 35 | **visKm** | [**BigDecimal**](BigDecimal.md) | | [optional] 36 | **visMiles** | [**BigDecimal**](BigDecimal.md) | | [optional] 37 | **gustMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 38 | **gustKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 39 | **uv** | **Integer** | | [optional] 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/InlineResponse200.md: -------------------------------------------------------------------------------- 1 | # InlineResponse200 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **location** | [**Location**](Location.md) | | [optional] 7 | **current** | [**Current**](Current.md) | | [optional] 8 | -------------------------------------------------------------------------------- /docs/InlineResponse2001.md: -------------------------------------------------------------------------------- 1 | # InlineResponse2001 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **location** | [**Location**](Location.md) | | [optional] 7 | **current** | [**Current**](Current.md) | | [optional] 8 | **forecast** | [**Forecast**](Forecast.md) | | [optional] 9 | **alerts** | [**Alerts**](Alerts.md) | | [optional] 10 | -------------------------------------------------------------------------------- /docs/InlineResponse2002.md: -------------------------------------------------------------------------------- 1 | # InlineResponse2002 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **location** | [**Location**](Location.md) | | [optional] 7 | **forecast** | [**Forecast**](Forecast.md) | | [optional] 8 | -------------------------------------------------------------------------------- /docs/InlineResponse2003.md: -------------------------------------------------------------------------------- 1 | # InlineResponse2003 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **location** | [**Location**](Location.md) | | [optional] 7 | **astronomy** | [**Astronomy**](Astronomy.md) | | [optional] 8 | -------------------------------------------------------------------------------- /docs/Ip.md: -------------------------------------------------------------------------------- 1 | 2 | # Ip 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **ip** | **String** | | [optional] 8 | **type** | **String** | | [optional] 9 | **continentCode** | **String** | | [optional] 10 | **continentName** | **String** | | [optional] 11 | **countryCode** | **String** | | [optional] 12 | **countryName** | **String** | | [optional] 13 | **isEu** | **String** | | [optional] 14 | **geonameId** | **Integer** | | [optional] 15 | **city** | **String** | | [optional] 16 | **region** | **String** | | [optional] 17 | **lat** | [**BigDecimal**](BigDecimal.md) | | [optional] 18 | **lon** | [**BigDecimal**](BigDecimal.md) | | [optional] 19 | **tzId** | **String** | | [optional] 20 | **localtimeEpoch** | **Integer** | | [optional] 21 | **localtime** | **String** | | [optional] 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/Location.md: -------------------------------------------------------------------------------- 1 | 2 | # Location 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **String** | | [optional] 8 | **region** | **String** | | [optional] 9 | **country** | **String** | | [optional] 10 | **lat** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **lon** | [**BigDecimal**](BigDecimal.md) | | [optional] 12 | **tzId** | **String** | | [optional] 13 | **localtimeEpoch** | **Integer** | | [optional] 14 | **localtime** | **String** | | [optional] 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/Marine.md: -------------------------------------------------------------------------------- 1 | 2 | # Marine 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **forecastday** | [**List<MarineForecastday>**](MarineForecastday.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/MarineForecastday.md: -------------------------------------------------------------------------------- 1 | 2 | # MarineForecastday 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **date** | [**LocalDate**](LocalDate.md) | | [optional] 8 | **dateEpoch** | **Integer** | | [optional] 9 | **day** | [**ForecastDay**](ForecastDay.md) | | [optional] 10 | **astro** | [**ForecastAstro**](ForecastAstro.md) | | [optional] 11 | **hour** | [**List<MarineHour>**](MarineHour.md) | | [optional] 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/MarineHour.md: -------------------------------------------------------------------------------- 1 | 2 | # MarineHour 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **timeEpoch** | **Integer** | | [optional] 8 | **time** | **String** | | [optional] 9 | **tempC** | [**BigDecimal**](BigDecimal.md) | | [optional] 10 | **tempF** | [**BigDecimal**](BigDecimal.md) | | [optional] 11 | **isDay** | **Integer** | | [optional] 12 | **condition** | [**ForecastCondition**](ForecastCondition.md) | | [optional] 13 | **windMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 14 | **windKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 15 | **windDegree** | [**BigDecimal**](BigDecimal.md) | | [optional] 16 | **windDir** | **String** | | [optional] 17 | **pressureMb** | [**BigDecimal**](BigDecimal.md) | | [optional] 18 | **pressureIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 19 | **precipMm** | [**BigDecimal**](BigDecimal.md) | | [optional] 20 | **precipIn** | [**BigDecimal**](BigDecimal.md) | | [optional] 21 | **humidity** | [**BigDecimal**](BigDecimal.md) | | [optional] 22 | **cloud** | [**BigDecimal**](BigDecimal.md) | | [optional] 23 | **feelslikeC** | [**BigDecimal**](BigDecimal.md) | | [optional] 24 | **feelslikeF** | [**BigDecimal**](BigDecimal.md) | | [optional] 25 | **windchillC** | [**BigDecimal**](BigDecimal.md) | | [optional] 26 | **windchillF** | [**BigDecimal**](BigDecimal.md) | | [optional] 27 | **heatindexC** | [**BigDecimal**](BigDecimal.md) | | [optional] 28 | **heatindexF** | [**BigDecimal**](BigDecimal.md) | | [optional] 29 | **dewpointC** | [**BigDecimal**](BigDecimal.md) | | [optional] 30 | **dewpointF** | [**BigDecimal**](BigDecimal.md) | | [optional] 31 | **willItRain** | **Integer** | | [optional] 32 | **chanceOfRain** | [**BigDecimal**](BigDecimal.md) | | [optional] 33 | **willItSnow** | **Integer** | | [optional] 34 | **chanceOfSnow** | [**BigDecimal**](BigDecimal.md) | | [optional] 35 | **visKm** | [**BigDecimal**](BigDecimal.md) | | [optional] 36 | **visMiles** | [**BigDecimal**](BigDecimal.md) | | [optional] 37 | **gustMph** | [**BigDecimal**](BigDecimal.md) | | [optional] 38 | **gustKph** | [**BigDecimal**](BigDecimal.md) | | [optional] 39 | **sigHtMt** | [**BigDecimal**](BigDecimal.md) | | [optional] 40 | **swellHtMt** | [**BigDecimal**](BigDecimal.md) | | [optional] 41 | **swellHtFt** | [**BigDecimal**](BigDecimal.md) | | [optional] 42 | **swellDir** | [**BigDecimal**](BigDecimal.md) | | [optional] 43 | **swellDir16Point** | [**BigDecimal**](BigDecimal.md) | | [optional] 44 | **swellPeriodSecs** | [**BigDecimal**](BigDecimal.md) | | [optional] 45 | **uv** | **Integer** | | [optional] 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/Search.md: -------------------------------------------------------------------------------- 1 | 2 | # Search 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **Integer** | | [optional] 8 | **name** | **String** | | [optional] 9 | **region** | **String** | | [optional] 10 | **country** | **String** | | [optional] 11 | **lat** | [**BigDecimal**](BigDecimal.md) | | [optional] 12 | **lon** | [**BigDecimal**](BigDecimal.md) | | [optional] 13 | **url** | **String** | | [optional] 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Uncomment to build for Android 2 | #target = android -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weatherapicom/java/bbb912a0eb6cc3c38640f082db6ad0b65b57fd34/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 17 23:08:05 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "swagger-java-client" -------------------------------------------------------------------------------- /src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/ApiCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import java.io.IOException; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | /** 22 | * Callback for asynchronous API call. 23 | * 24 | * @param The return type 25 | */ 26 | public interface ApiCallback { 27 | /** 28 | * This is called when the API call fails. 29 | * 30 | * @param e The exception causing the failure 31 | * @param statusCode Status code of the response if available, otherwise it would be 0 32 | * @param responseHeaders Headers of the response if available, otherwise it would be null 33 | */ 34 | void onFailure(ApiException e, int statusCode, Map> responseHeaders); 35 | 36 | /** 37 | * This is called when the API call succeeded. 38 | * 39 | * @param result The result deserialized from response 40 | * @param statusCode Status code of the response 41 | * @param responseHeaders Headers of the response 42 | */ 43 | void onSuccess(T result, int statusCode, Map> responseHeaders); 44 | 45 | /** 46 | * This is called when the API upload processing. 47 | * 48 | * @param bytesWritten bytes Written 49 | * @param contentLength content length of request body 50 | * @param done write end 51 | */ 52 | void onUploadProgress(long bytesWritten, long contentLength, boolean done); 53 | 54 | /** 55 | * This is called when the API downlond processing. 56 | * 57 | * @param bytesRead bytes Read 58 | * @param contentLength content lenngth of the response 59 | * @param done Read end 60 | */ 61 | void onDownloadProgress(long bytesRead, long contentLength, boolean done); 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/ApiException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import java.util.Map; 17 | import java.util.List; 18 | 19 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 20 | public class ApiException extends Exception { 21 | private int code = 0; 22 | private Map> responseHeaders = null; 23 | private String responseBody = null; 24 | 25 | public ApiException() {} 26 | 27 | public ApiException(Throwable throwable) { 28 | super(throwable); 29 | } 30 | 31 | public ApiException(String message) { 32 | super(message); 33 | } 34 | 35 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { 36 | super(message, throwable); 37 | this.code = code; 38 | this.responseHeaders = responseHeaders; 39 | this.responseBody = responseBody; 40 | } 41 | 42 | public ApiException(String message, int code, Map> responseHeaders, String responseBody) { 43 | this(message, (Throwable) null, code, responseHeaders, responseBody); 44 | } 45 | 46 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { 47 | this(message, throwable, code, responseHeaders, null); 48 | } 49 | 50 | public ApiException(int code, Map> responseHeaders, String responseBody) { 51 | this((String) null, (Throwable) null, code, responseHeaders, responseBody); 52 | } 53 | 54 | public ApiException(int code, String message) { 55 | super(message); 56 | this.code = code; 57 | } 58 | 59 | public ApiException(int code, String message, Map> responseHeaders, String responseBody) { 60 | this(code, message); 61 | this.responseHeaders = responseHeaders; 62 | this.responseBody = responseBody; 63 | } 64 | 65 | /** 66 | * Get the HTTP status code. 67 | * 68 | * @return HTTP status code 69 | */ 70 | public int getCode() { 71 | return code; 72 | } 73 | 74 | /** 75 | * Get the HTTP response headers. 76 | * 77 | * @return A map of list of string 78 | */ 79 | public Map> getResponseHeaders() { 80 | return responseHeaders; 81 | } 82 | 83 | /** 84 | * Get the HTTP response body. 85 | * 86 | * @return Response body in the form of string 87 | */ 88 | public String getResponseBody() { 89 | return responseBody; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | /** 20 | * API response returned by API call. 21 | * 22 | * @param The type of data that is deserialized from response body 23 | */ 24 | public class ApiResponse { 25 | final private int statusCode; 26 | final private Map> headers; 27 | final private T data; 28 | 29 | /** 30 | * @param statusCode The status code of HTTP response 31 | * @param headers The headers of HTTP response 32 | */ 33 | public ApiResponse(int statusCode, Map> headers) { 34 | this(statusCode, headers, null); 35 | } 36 | 37 | /** 38 | * @param statusCode The status code of HTTP response 39 | * @param headers The headers of HTTP response 40 | * @param data The object deserialized from response bod 41 | */ 42 | public ApiResponse(int statusCode, Map> headers, T data) { 43 | this.statusCode = statusCode; 44 | this.headers = headers; 45 | this.data = data; 46 | } 47 | 48 | public int getStatusCode() { 49 | return statusCode; 50 | } 51 | 52 | public Map> getHeaders() { 53 | return headers; 54 | } 55 | 56 | public T getData() { 57 | return data; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 17 | public class Configuration { 18 | private static ApiClient defaultApiClient = new ApiClient(); 19 | 20 | /** 21 | * Get the default API client, which would be used when creating API 22 | * instances without providing an API client. 23 | * 24 | * @return Default API client 25 | */ 26 | public static ApiClient getDefaultApiClient() { 27 | return defaultApiClient; 28 | } 29 | 30 | /** 31 | * Set the default API client, which would be used when creating API 32 | * instances without providing an API client. 33 | * 34 | * @param apiClient API client 35 | */ 36 | public static void setDefaultApiClient(ApiClient apiClient) { 37 | defaultApiClient = apiClient; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/GzipRequestInterceptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import com.squareup.okhttp.*; 17 | import okio.Buffer; 18 | import okio.BufferedSink; 19 | import okio.GzipSink; 20 | import okio.Okio; 21 | 22 | import java.io.IOException; 23 | 24 | /** 25 | * Encodes request bodies using gzip. 26 | * 27 | * Taken from https://github.com/square/okhttp/issues/350 28 | */ 29 | class GzipRequestInterceptor implements Interceptor { 30 | @Override public Response intercept(Chain chain) throws IOException { 31 | Request originalRequest = chain.request(); 32 | if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { 33 | return chain.proceed(originalRequest); 34 | } 35 | 36 | Request compressedRequest = originalRequest.newBuilder() 37 | .header("Content-Encoding", "gzip") 38 | .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) 39 | .build(); 40 | return chain.proceed(compressedRequest); 41 | } 42 | 43 | private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { 44 | final Buffer buffer = new Buffer(); 45 | requestBody.writeTo(buffer); 46 | return new RequestBody() { 47 | @Override 48 | public MediaType contentType() { 49 | return requestBody.contentType(); 50 | } 51 | 52 | @Override 53 | public long contentLength() { 54 | return buffer.size(); 55 | } 56 | 57 | @Override 58 | public void writeTo(BufferedSink sink) throws IOException { 59 | sink.write(buffer.snapshot()); 60 | } 61 | }; 62 | } 63 | 64 | private RequestBody gzip(final RequestBody body) { 65 | return new RequestBody() { 66 | @Override public MediaType contentType() { 67 | return body.contentType(); 68 | } 69 | 70 | @Override public long contentLength() { 71 | return -1; // We don't know the compressed length in advance! 72 | } 73 | 74 | @Override public void writeTo(BufferedSink sink) throws IOException { 75 | BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); 76 | body.writeTo(gzipSink); 77 | gzipSink.close(); 78 | } 79 | }; 80 | } 81 | } -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 17 | public class Pair { 18 | private String name = ""; 19 | private String value = ""; 20 | 21 | public Pair (String name, String value) { 22 | setName(name); 23 | setValue(value); 24 | } 25 | 26 | private void setName(String name) { 27 | if (!isValidString(name)) return; 28 | 29 | this.name = name; 30 | } 31 | 32 | private void setValue(String value) { 33 | if (!isValidString(value)) return; 34 | 35 | this.value = value; 36 | } 37 | 38 | public String getName() { 39 | return this.name; 40 | } 41 | 42 | public String getValue() { 43 | return this.value; 44 | } 45 | 46 | private boolean isValidString(String arg) { 47 | if (arg == null) return false; 48 | if (arg.trim().isEmpty()) return false; 49 | 50 | return true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/ProgressRequestBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import com.squareup.okhttp.MediaType; 17 | import com.squareup.okhttp.RequestBody; 18 | 19 | import java.io.IOException; 20 | 21 | import okio.Buffer; 22 | import okio.BufferedSink; 23 | import okio.ForwardingSink; 24 | import okio.Okio; 25 | import okio.Sink; 26 | 27 | public class ProgressRequestBody extends RequestBody { 28 | 29 | public interface ProgressRequestListener { 30 | void onRequestProgress(long bytesWritten, long contentLength, boolean done); 31 | } 32 | 33 | private final RequestBody requestBody; 34 | 35 | private final ProgressRequestListener progressListener; 36 | 37 | public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { 38 | this.requestBody = requestBody; 39 | this.progressListener = progressListener; 40 | } 41 | 42 | @Override 43 | public MediaType contentType() { 44 | return requestBody.contentType(); 45 | } 46 | 47 | @Override 48 | public long contentLength() throws IOException { 49 | return requestBody.contentLength(); 50 | } 51 | 52 | @Override 53 | public void writeTo(BufferedSink sink) throws IOException { 54 | BufferedSink bufferedSink = Okio.buffer(sink(sink)); 55 | requestBody.writeTo(bufferedSink); 56 | bufferedSink.flush(); 57 | } 58 | 59 | private Sink sink(Sink sink) { 60 | return new ForwardingSink(sink) { 61 | 62 | long bytesWritten = 0L; 63 | long contentLength = 0L; 64 | 65 | @Override 66 | public void write(Buffer source, long byteCount) throws IOException { 67 | super.write(source, byteCount); 68 | if (contentLength == 0) { 69 | contentLength = contentLength(); 70 | } 71 | 72 | bytesWritten += byteCount; 73 | progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); 74 | } 75 | }; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/ProgressResponseBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import com.squareup.okhttp.MediaType; 17 | import com.squareup.okhttp.ResponseBody; 18 | 19 | import java.io.IOException; 20 | 21 | import okio.Buffer; 22 | import okio.BufferedSource; 23 | import okio.ForwardingSource; 24 | import okio.Okio; 25 | import okio.Source; 26 | 27 | public class ProgressResponseBody extends ResponseBody { 28 | 29 | public interface ProgressListener { 30 | void update(long bytesRead, long contentLength, boolean done); 31 | } 32 | 33 | private final ResponseBody responseBody; 34 | private final ProgressListener progressListener; 35 | private BufferedSource bufferedSource; 36 | 37 | public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { 38 | this.responseBody = responseBody; 39 | this.progressListener = progressListener; 40 | } 41 | 42 | @Override 43 | public MediaType contentType() { 44 | return responseBody.contentType(); 45 | } 46 | 47 | @Override 48 | public long contentLength() throws IOException { 49 | return responseBody.contentLength(); 50 | } 51 | 52 | @Override 53 | public BufferedSource source() throws IOException { 54 | if (bufferedSource == null) { 55 | bufferedSource = Okio.buffer(source(responseBody.source())); 56 | } 57 | return bufferedSource; 58 | } 59 | 60 | private Source source(Source source) { 61 | return new ForwardingSource(source) { 62 | long totalBytesRead = 0L; 63 | 64 | @Override 65 | public long read(Buffer sink, long byteCount) throws IOException { 66 | long bytesRead = super.read(sink, byteCount); 67 | // read() returns the number of bytes read, or -1 if this source is exhausted. 68 | totalBytesRead += bytesRead != -1 ? bytesRead : 0; 69 | progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); 70 | return bytesRead; 71 | } 72 | }; 73 | } 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/StringUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 17 | public class StringUtil { 18 | /** 19 | * Check if the given array contains the given value (with case-insensitive comparison). 20 | * 21 | * @param array The array 22 | * @param value The value to search 23 | * @return true if the array contains the value 24 | */ 25 | public static boolean containsIgnoreCase(String[] array, String value) { 26 | for (String str : array) { 27 | if (value == null && str == null) return true; 28 | if (value != null && value.equalsIgnoreCase(str)) return true; 29 | } 30 | return false; 31 | } 32 | 33 | /** 34 | * Join an array of strings with the given separator. 35 | *

36 | * Note: This might be replaced by utility method from commons-lang or guava someday 37 | * if one of those libraries is added as dependency. 38 | *

39 | * 40 | * @param array The array of strings 41 | * @param separator The separator 42 | * @return the resulting string 43 | */ 44 | public static String join(String[] array, String separator) { 45 | int len = array.length; 46 | if (len == 0) return ""; 47 | 48 | StringBuilder out = new StringBuilder(); 49 | out.append(array[0]); 50 | for (int i = 1; i < len; i++) { 51 | out.append(separator).append(array[i]); 52 | } 53 | return out.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 22 | public class ApiKeyAuth implements Authentication { 23 | private final String location; 24 | private final String paramName; 25 | 26 | private String apiKey; 27 | private String apiKeyPrefix; 28 | 29 | public ApiKeyAuth(String location, String paramName) { 30 | this.location = location; 31 | this.paramName = paramName; 32 | } 33 | 34 | public String getLocation() { 35 | return location; 36 | } 37 | 38 | public String getParamName() { 39 | return paramName; 40 | } 41 | 42 | public String getApiKey() { 43 | return apiKey; 44 | } 45 | 46 | public void setApiKey(String apiKey) { 47 | this.apiKey = apiKey; 48 | } 49 | 50 | public String getApiKeyPrefix() { 51 | return apiKeyPrefix; 52 | } 53 | 54 | public void setApiKeyPrefix(String apiKeyPrefix) { 55 | this.apiKeyPrefix = apiKeyPrefix; 56 | } 57 | 58 | @Override 59 | public void applyToParams(List queryParams, Map headerParams) { 60 | if (apiKey == null) { 61 | return; 62 | } 63 | String value; 64 | if (apiKeyPrefix != null) { 65 | value = apiKeyPrefix + " " + apiKey; 66 | } else { 67 | value = apiKey; 68 | } 69 | if ("query".equals(location)) { 70 | queryParams.add(new Pair(paramName, value)); 71 | } else if ("header".equals(location)) { 72 | headerParams.put(paramName, value); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | public interface Authentication { 22 | /** 23 | * Apply authentication settings to header and query params. 24 | * 25 | * @param queryParams List of query parameters 26 | * @param headerParams Map of header parameters 27 | */ 28 | void applyToParams(List queryParams, Map headerParams); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import com.squareup.okhttp.Credentials; 19 | 20 | import java.util.Map; 21 | import java.util.List; 22 | 23 | import java.io.UnsupportedEncodingException; 24 | 25 | public class HttpBasicAuth implements Authentication { 26 | private String username; 27 | private String password; 28 | 29 | public String getUsername() { 30 | return username; 31 | } 32 | 33 | public void setUsername(String username) { 34 | this.username = username; 35 | } 36 | 37 | public String getPassword() { 38 | return password; 39 | } 40 | 41 | public void setPassword(String password) { 42 | this.password = password; 43 | } 44 | 45 | @Override 46 | public void applyToParams(List queryParams, Map headerParams) { 47 | if (username == null && password == null) { 48 | return; 49 | } 50 | headerParams.put("Authorization", Credentials.basic( 51 | username == null ? "" : username, 52 | password == null ? "" : password)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 22 | public class OAuth implements Authentication { 23 | private String accessToken; 24 | 25 | public String getAccessToken() { 26 | return accessToken; 27 | } 28 | 29 | public void setAccessToken(String accessToken) { 30 | this.accessToken = accessToken; 31 | } 32 | 33 | @Override 34 | public void applyToParams(List queryParams, Map headerParams) { 35 | if (accessToken != null) { 36 | headerParams.put("Authorization", "Bearer " + accessToken); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | public enum OAuthFlow { 17 | accessCode, implicit, password, application 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Alerts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.AlertsAlert; 26 | import java.io.IOException; 27 | import java.util.ArrayList; 28 | import java.util.List; 29 | 30 | /** 31 | * Alerts 32 | */ 33 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 34 | public class Alerts { 35 | @SerializedName("alert") 36 | private List alert = null; 37 | 38 | public Alerts alert(List alert) { 39 | this.alert = alert; 40 | return this; 41 | } 42 | 43 | public Alerts addAlertItem(AlertsAlert alertItem) { 44 | if (this.alert == null) { 45 | this.alert = new ArrayList(); 46 | } 47 | this.alert.add(alertItem); 48 | return this; 49 | } 50 | 51 | /** 52 | * Get alert 53 | * @return alert 54 | **/ 55 | @ApiModelProperty(value = "") 56 | public List getAlert() { 57 | return alert; 58 | } 59 | 60 | public void setAlert(List alert) { 61 | this.alert = alert; 62 | } 63 | 64 | 65 | @Override 66 | public boolean equals(java.lang.Object o) { 67 | if (this == o) { 68 | return true; 69 | } 70 | if (o == null || getClass() != o.getClass()) { 71 | return false; 72 | } 73 | Alerts alerts = (Alerts) o; 74 | return Objects.equals(this.alert, alerts.alert); 75 | } 76 | 77 | @Override 78 | public int hashCode() { 79 | return Objects.hash(alert); 80 | } 81 | 82 | 83 | @Override 84 | public String toString() { 85 | StringBuilder sb = new StringBuilder(); 86 | sb.append("class Alerts {\n"); 87 | 88 | sb.append(" alert: ").append(toIndentedString(alert)).append("\n"); 89 | sb.append("}"); 90 | return sb.toString(); 91 | } 92 | 93 | /** 94 | * Convert the given object to string with each line indented by 4 spaces 95 | * (except the first line). 96 | */ 97 | private String toIndentedString(java.lang.Object o) { 98 | if (o == null) { 99 | return "null"; 100 | } 101 | return o.toString().replace("\n", "\n "); 102 | } 103 | 104 | } 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/ArrayOfSearch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import io.swagger.client.model.Search; 19 | import java.util.ArrayList; 20 | import java.util.List; 21 | 22 | /** 23 | * ArrayOfSearch 24 | */ 25 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 26 | public class ArrayOfSearch extends ArrayList { 27 | 28 | @Override 29 | public boolean equals(java.lang.Object o) { 30 | if (this == o) { 31 | return true; 32 | } 33 | if (o == null || getClass() != o.getClass()) { 34 | return false; 35 | } 36 | return super.equals(o); 37 | } 38 | 39 | @Override 40 | public int hashCode() { 41 | return Objects.hash(super.hashCode()); 42 | } 43 | 44 | 45 | @Override 46 | public String toString() { 47 | StringBuilder sb = new StringBuilder(); 48 | sb.append("class ArrayOfSearch {\n"); 49 | sb.append(" ").append(toIndentedString(super.toString())).append("\n"); 50 | sb.append("}"); 51 | return sb.toString(); 52 | } 53 | 54 | /** 55 | * Convert the given object to string with each line indented by 4 spaces 56 | * (except the first line). 57 | */ 58 | private String toIndentedString(java.lang.Object o) { 59 | if (o == null) { 60 | return "null"; 61 | } 62 | return o.toString().replace("\n", "\n "); 63 | } 64 | 65 | } 66 | 67 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Astronomy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.AstronomyAstro; 26 | import java.io.IOException; 27 | 28 | /** 29 | * Astronomy 30 | */ 31 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 32 | public class Astronomy { 33 | @SerializedName("astro") 34 | private AstronomyAstro astro = null; 35 | 36 | public Astronomy astro(AstronomyAstro astro) { 37 | this.astro = astro; 38 | return this; 39 | } 40 | 41 | /** 42 | * Get astro 43 | * @return astro 44 | **/ 45 | @ApiModelProperty(value = "") 46 | public AstronomyAstro getAstro() { 47 | return astro; 48 | } 49 | 50 | public void setAstro(AstronomyAstro astro) { 51 | this.astro = astro; 52 | } 53 | 54 | 55 | @Override 56 | public boolean equals(java.lang.Object o) { 57 | if (this == o) { 58 | return true; 59 | } 60 | if (o == null || getClass() != o.getClass()) { 61 | return false; 62 | } 63 | Astronomy astronomy = (Astronomy) o; 64 | return Objects.equals(this.astro, astronomy.astro); 65 | } 66 | 67 | @Override 68 | public int hashCode() { 69 | return Objects.hash(astro); 70 | } 71 | 72 | 73 | @Override 74 | public String toString() { 75 | StringBuilder sb = new StringBuilder(); 76 | sb.append("class Astronomy {\n"); 77 | 78 | sb.append(" astro: ").append(toIndentedString(astro)).append("\n"); 79 | sb.append("}"); 80 | return sb.toString(); 81 | } 82 | 83 | /** 84 | * Convert the given object to string with each line indented by 4 spaces 85 | * (except the first line). 86 | */ 87 | private String toIndentedString(java.lang.Object o) { 88 | if (o == null) { 89 | return "null"; 90 | } 91 | return o.toString().replace("\n", "\n "); 92 | } 93 | 94 | } 95 | 96 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/AstronomyAstro.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * AstronomyAstro 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class AstronomyAstro { 32 | @SerializedName("sunrise") 33 | private String sunrise = null; 34 | 35 | @SerializedName("sunset") 36 | private String sunset = null; 37 | 38 | @SerializedName("moonrise") 39 | private String moonrise = null; 40 | 41 | @SerializedName("moonset") 42 | private String moonset = null; 43 | 44 | @SerializedName("moon_phase") 45 | private String moonPhase = null; 46 | 47 | @SerializedName("moon_illumination") 48 | private String moonIllumination = null; 49 | 50 | public AstronomyAstro sunrise(String sunrise) { 51 | this.sunrise = sunrise; 52 | return this; 53 | } 54 | 55 | /** 56 | * Get sunrise 57 | * @return sunrise 58 | **/ 59 | @ApiModelProperty(example = "05:10 AM", value = "") 60 | public String getSunrise() { 61 | return sunrise; 62 | } 63 | 64 | public void setSunrise(String sunrise) { 65 | this.sunrise = sunrise; 66 | } 67 | 68 | public AstronomyAstro sunset(String sunset) { 69 | this.sunset = sunset; 70 | return this; 71 | } 72 | 73 | /** 74 | * Get sunset 75 | * @return sunset 76 | **/ 77 | @ApiModelProperty(example = "09:03 PM", value = "") 78 | public String getSunset() { 79 | return sunset; 80 | } 81 | 82 | public void setSunset(String sunset) { 83 | this.sunset = sunset; 84 | } 85 | 86 | public AstronomyAstro moonrise(String moonrise) { 87 | this.moonrise = moonrise; 88 | return this; 89 | } 90 | 91 | /** 92 | * Get moonrise 93 | * @return moonrise 94 | **/ 95 | @ApiModelProperty(example = "12:29 AM", value = "") 96 | public String getMoonrise() { 97 | return moonrise; 98 | } 99 | 100 | public void setMoonrise(String moonrise) { 101 | this.moonrise = moonrise; 102 | } 103 | 104 | public AstronomyAstro moonset(String moonset) { 105 | this.moonset = moonset; 106 | return this; 107 | } 108 | 109 | /** 110 | * Get moonset 111 | * @return moonset 112 | **/ 113 | @ApiModelProperty(example = "04:01 PM", value = "") 114 | public String getMoonset() { 115 | return moonset; 116 | } 117 | 118 | public void setMoonset(String moonset) { 119 | this.moonset = moonset; 120 | } 121 | 122 | public AstronomyAstro moonPhase(String moonPhase) { 123 | this.moonPhase = moonPhase; 124 | return this; 125 | } 126 | 127 | /** 128 | * Get moonPhase 129 | * @return moonPhase 130 | **/ 131 | @ApiModelProperty(example = "Third Quarter", value = "") 132 | public String getMoonPhase() { 133 | return moonPhase; 134 | } 135 | 136 | public void setMoonPhase(String moonPhase) { 137 | this.moonPhase = moonPhase; 138 | } 139 | 140 | public AstronomyAstro moonIllumination(String moonIllumination) { 141 | this.moonIllumination = moonIllumination; 142 | return this; 143 | } 144 | 145 | /** 146 | * Get moonIllumination 147 | * @return moonIllumination 148 | **/ 149 | @ApiModelProperty(example = "42", value = "") 150 | public String getMoonIllumination() { 151 | return moonIllumination; 152 | } 153 | 154 | public void setMoonIllumination(String moonIllumination) { 155 | this.moonIllumination = moonIllumination; 156 | } 157 | 158 | 159 | @Override 160 | public boolean equals(java.lang.Object o) { 161 | if (this == o) { 162 | return true; 163 | } 164 | if (o == null || getClass() != o.getClass()) { 165 | return false; 166 | } 167 | AstronomyAstro astronomyAstro = (AstronomyAstro) o; 168 | return Objects.equals(this.sunrise, astronomyAstro.sunrise) && 169 | Objects.equals(this.sunset, astronomyAstro.sunset) && 170 | Objects.equals(this.moonrise, astronomyAstro.moonrise) && 171 | Objects.equals(this.moonset, astronomyAstro.moonset) && 172 | Objects.equals(this.moonPhase, astronomyAstro.moonPhase) && 173 | Objects.equals(this.moonIllumination, astronomyAstro.moonIllumination); 174 | } 175 | 176 | @Override 177 | public int hashCode() { 178 | return Objects.hash(sunrise, sunset, moonrise, moonset, moonPhase, moonIllumination); 179 | } 180 | 181 | 182 | @Override 183 | public String toString() { 184 | StringBuilder sb = new StringBuilder(); 185 | sb.append("class AstronomyAstro {\n"); 186 | 187 | sb.append(" sunrise: ").append(toIndentedString(sunrise)).append("\n"); 188 | sb.append(" sunset: ").append(toIndentedString(sunset)).append("\n"); 189 | sb.append(" moonrise: ").append(toIndentedString(moonrise)).append("\n"); 190 | sb.append(" moonset: ").append(toIndentedString(moonset)).append("\n"); 191 | sb.append(" moonPhase: ").append(toIndentedString(moonPhase)).append("\n"); 192 | sb.append(" moonIllumination: ").append(toIndentedString(moonIllumination)).append("\n"); 193 | sb.append("}"); 194 | return sb.toString(); 195 | } 196 | 197 | /** 198 | * Convert the given object to string with each line indented by 4 spaces 199 | * (except the first line). 200 | */ 201 | private String toIndentedString(java.lang.Object o) { 202 | if (o == null) { 203 | return "null"; 204 | } 205 | return o.toString().replace("\n", "\n "); 206 | } 207 | 208 | } 209 | 210 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/CurrentCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * CurrentCondition 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class CurrentCondition { 32 | @SerializedName("text") 33 | private String text = null; 34 | 35 | @SerializedName("icon") 36 | private String icon = null; 37 | 38 | @SerializedName("code") 39 | private Integer code = null; 40 | 41 | public CurrentCondition text(String text) { 42 | this.text = text; 43 | return this; 44 | } 45 | 46 | /** 47 | * Get text 48 | * @return text 49 | **/ 50 | @ApiModelProperty(example = "Partly cloudy", value = "") 51 | public String getText() { 52 | return text; 53 | } 54 | 55 | public void setText(String text) { 56 | this.text = text; 57 | } 58 | 59 | public CurrentCondition icon(String icon) { 60 | this.icon = icon; 61 | return this; 62 | } 63 | 64 | /** 65 | * Get icon 66 | * @return icon 67 | **/ 68 | @ApiModelProperty(example = "//cdn.weatherapi.com/weather/64x64/day/116.png", value = "") 69 | public String getIcon() { 70 | return icon; 71 | } 72 | 73 | public void setIcon(String icon) { 74 | this.icon = icon; 75 | } 76 | 77 | public CurrentCondition code(Integer code) { 78 | this.code = code; 79 | return this; 80 | } 81 | 82 | /** 83 | * Get code 84 | * @return code 85 | **/ 86 | @ApiModelProperty(example = "1003", value = "") 87 | public Integer getCode() { 88 | return code; 89 | } 90 | 91 | public void setCode(Integer code) { 92 | this.code = code; 93 | } 94 | 95 | 96 | @Override 97 | public boolean equals(java.lang.Object o) { 98 | if (this == o) { 99 | return true; 100 | } 101 | if (o == null || getClass() != o.getClass()) { 102 | return false; 103 | } 104 | CurrentCondition currentCondition = (CurrentCondition) o; 105 | return Objects.equals(this.text, currentCondition.text) && 106 | Objects.equals(this.icon, currentCondition.icon) && 107 | Objects.equals(this.code, currentCondition.code); 108 | } 109 | 110 | @Override 111 | public int hashCode() { 112 | return Objects.hash(text, icon, code); 113 | } 114 | 115 | 116 | @Override 117 | public String toString() { 118 | StringBuilder sb = new StringBuilder(); 119 | sb.append("class CurrentCondition {\n"); 120 | 121 | sb.append(" text: ").append(toIndentedString(text)).append("\n"); 122 | sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); 123 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 124 | sb.append("}"); 125 | return sb.toString(); 126 | } 127 | 128 | /** 129 | * Convert the given object to string with each line indented by 4 spaces 130 | * (except the first line). 131 | */ 132 | private String toIndentedString(java.lang.Object o) { 133 | if (o == null) { 134 | return "null"; 135 | } 136 | return o.toString().replace("\n", "\n "); 137 | } 138 | 139 | } 140 | 141 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Error400.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * Error400 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class Error400 { 32 | @SerializedName("code") 33 | private Integer code = null; 34 | 35 | @SerializedName("message") 36 | private String message = null; 37 | 38 | public Error400 code(Integer code) { 39 | this.code = code; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get code 45 | * @return code 46 | **/ 47 | @ApiModelProperty(example = "1003", value = "") 48 | public Integer getCode() { 49 | return code; 50 | } 51 | 52 | public void setCode(Integer code) { 53 | this.code = code; 54 | } 55 | 56 | public Error400 message(String message) { 57 | this.message = message; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get message 63 | * @return message 64 | **/ 65 | @ApiModelProperty(example = "Parameter 'q' not provided.", value = "") 66 | public String getMessage() { 67 | return message; 68 | } 69 | 70 | public void setMessage(String message) { 71 | this.message = message; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | Error400 error400 = (Error400) o; 84 | return Objects.equals(this.code, error400.code) && 85 | Objects.equals(this.message, error400.message); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(code, message); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class Error400 {\n"); 98 | 99 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 100 | sb.append(" message: ").append(toIndentedString(message)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | 118 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Error401.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * Error401 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class Error401 { 32 | @SerializedName("code") 33 | private Integer code = null; 34 | 35 | @SerializedName("message") 36 | private String message = null; 37 | 38 | public Error401 code(Integer code) { 39 | this.code = code; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get code 45 | * @return code 46 | **/ 47 | @ApiModelProperty(example = "1002", value = "") 48 | public Integer getCode() { 49 | return code; 50 | } 51 | 52 | public void setCode(Integer code) { 53 | this.code = code; 54 | } 55 | 56 | public Error401 message(String message) { 57 | this.message = message; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get message 63 | * @return message 64 | **/ 65 | @ApiModelProperty(example = "API key not provided", value = "") 66 | public String getMessage() { 67 | return message; 68 | } 69 | 70 | public void setMessage(String message) { 71 | this.message = message; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | Error401 error401 = (Error401) o; 84 | return Objects.equals(this.code, error401.code) && 85 | Objects.equals(this.message, error401.message); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(code, message); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class Error401 {\n"); 98 | 99 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 100 | sb.append(" message: ").append(toIndentedString(message)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | 118 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Error403.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * Error403 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class Error403 { 32 | @SerializedName("code") 33 | private Integer code = null; 34 | 35 | @SerializedName("message") 36 | private String message = null; 37 | 38 | public Error403 code(Integer code) { 39 | this.code = code; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get code 45 | * @return code 46 | **/ 47 | @ApiModelProperty(example = "2007", value = "") 48 | public Integer getCode() { 49 | return code; 50 | } 51 | 52 | public void setCode(Integer code) { 53 | this.code = code; 54 | } 55 | 56 | public Error403 message(String message) { 57 | this.message = message; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get message 63 | * @return message 64 | **/ 65 | @ApiModelProperty(example = "API key has exceeded calls per month quota.", value = "") 66 | public String getMessage() { 67 | return message; 68 | } 69 | 70 | public void setMessage(String message) { 71 | this.message = message; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | Error403 error403 = (Error403) o; 84 | return Objects.equals(this.code, error403.code) && 85 | Objects.equals(this.message, error403.message); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(code, message); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class Error403 {\n"); 98 | 99 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 100 | sb.append(" message: ").append(toIndentedString(message)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | 118 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Forecast.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.ForecastForecastday; 26 | import java.io.IOException; 27 | import java.util.ArrayList; 28 | import java.util.List; 29 | 30 | /** 31 | * Forecast 32 | */ 33 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 34 | public class Forecast { 35 | @SerializedName("forecastday") 36 | private List forecastday = null; 37 | 38 | public Forecast forecastday(List forecastday) { 39 | this.forecastday = forecastday; 40 | return this; 41 | } 42 | 43 | public Forecast addForecastdayItem(ForecastForecastday forecastdayItem) { 44 | if (this.forecastday == null) { 45 | this.forecastday = new ArrayList(); 46 | } 47 | this.forecastday.add(forecastdayItem); 48 | return this; 49 | } 50 | 51 | /** 52 | * Get forecastday 53 | * @return forecastday 54 | **/ 55 | @ApiModelProperty(value = "") 56 | public List getForecastday() { 57 | return forecastday; 58 | } 59 | 60 | public void setForecastday(List forecastday) { 61 | this.forecastday = forecastday; 62 | } 63 | 64 | 65 | @Override 66 | public boolean equals(java.lang.Object o) { 67 | if (this == o) { 68 | return true; 69 | } 70 | if (o == null || getClass() != o.getClass()) { 71 | return false; 72 | } 73 | Forecast forecast = (Forecast) o; 74 | return Objects.equals(this.forecastday, forecast.forecastday); 75 | } 76 | 77 | @Override 78 | public int hashCode() { 79 | return Objects.hash(forecastday); 80 | } 81 | 82 | 83 | @Override 84 | public String toString() { 85 | StringBuilder sb = new StringBuilder(); 86 | sb.append("class Forecast {\n"); 87 | 88 | sb.append(" forecastday: ").append(toIndentedString(forecastday)).append("\n"); 89 | sb.append("}"); 90 | return sb.toString(); 91 | } 92 | 93 | /** 94 | * Convert the given object to string with each line indented by 4 spaces 95 | * (except the first line). 96 | */ 97 | private String toIndentedString(java.lang.Object o) { 98 | if (o == null) { 99 | return "null"; 100 | } 101 | return o.toString().replace("\n", "\n "); 102 | } 103 | 104 | } 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/ForecastAstro.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * ForecastAstro 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class ForecastAstro { 32 | @SerializedName("sunrise") 33 | private String sunrise = null; 34 | 35 | @SerializedName("sunset") 36 | private String sunset = null; 37 | 38 | @SerializedName("moonrise") 39 | private String moonrise = null; 40 | 41 | @SerializedName("moonset") 42 | private String moonset = null; 43 | 44 | @SerializedName("moon_phase") 45 | private String moonPhase = null; 46 | 47 | @SerializedName("moon_illumination") 48 | private String moonIllumination = null; 49 | 50 | public ForecastAstro sunrise(String sunrise) { 51 | this.sunrise = sunrise; 52 | return this; 53 | } 54 | 55 | /** 56 | * Get sunrise 57 | * @return sunrise 58 | **/ 59 | @ApiModelProperty(example = "05:44 AM", value = "") 60 | public String getSunrise() { 61 | return sunrise; 62 | } 63 | 64 | public void setSunrise(String sunrise) { 65 | this.sunrise = sunrise; 66 | } 67 | 68 | public ForecastAstro sunset(String sunset) { 69 | this.sunset = sunset; 70 | return this; 71 | } 72 | 73 | /** 74 | * Get sunset 75 | * @return sunset 76 | **/ 77 | @ApiModelProperty(example = "08:20 PM", value = "") 78 | public String getSunset() { 79 | return sunset; 80 | } 81 | 82 | public void setSunset(String sunset) { 83 | this.sunset = sunset; 84 | } 85 | 86 | public ForecastAstro moonrise(String moonrise) { 87 | this.moonrise = moonrise; 88 | return this; 89 | } 90 | 91 | /** 92 | * Get moonrise 93 | * @return moonrise 94 | **/ 95 | @ApiModelProperty(example = "12:58 AM", value = "") 96 | public String getMoonrise() { 97 | return moonrise; 98 | } 99 | 100 | public void setMoonrise(String moonrise) { 101 | this.moonrise = moonrise; 102 | } 103 | 104 | public ForecastAstro moonset(String moonset) { 105 | this.moonset = moonset; 106 | return this; 107 | } 108 | 109 | /** 110 | * Get moonset 111 | * @return moonset 112 | **/ 113 | @ApiModelProperty(example = "03:35 PM", value = "") 114 | public String getMoonset() { 115 | return moonset; 116 | } 117 | 118 | public void setMoonset(String moonset) { 119 | this.moonset = moonset; 120 | } 121 | 122 | public ForecastAstro moonPhase(String moonPhase) { 123 | this.moonPhase = moonPhase; 124 | return this; 125 | } 126 | 127 | /** 128 | * Get moonPhase 129 | * @return moonPhase 130 | **/ 131 | @ApiModelProperty(example = "Last Quarter", value = "") 132 | public String getMoonPhase() { 133 | return moonPhase; 134 | } 135 | 136 | public void setMoonPhase(String moonPhase) { 137 | this.moonPhase = moonPhase; 138 | } 139 | 140 | public ForecastAstro moonIllumination(String moonIllumination) { 141 | this.moonIllumination = moonIllumination; 142 | return this; 143 | } 144 | 145 | /** 146 | * Get moonIllumination 147 | * @return moonIllumination 148 | **/ 149 | @ApiModelProperty(example = "36", value = "") 150 | public String getMoonIllumination() { 151 | return moonIllumination; 152 | } 153 | 154 | public void setMoonIllumination(String moonIllumination) { 155 | this.moonIllumination = moonIllumination; 156 | } 157 | 158 | 159 | @Override 160 | public boolean equals(java.lang.Object o) { 161 | if (this == o) { 162 | return true; 163 | } 164 | if (o == null || getClass() != o.getClass()) { 165 | return false; 166 | } 167 | ForecastAstro forecastAstro = (ForecastAstro) o; 168 | return Objects.equals(this.sunrise, forecastAstro.sunrise) && 169 | Objects.equals(this.sunset, forecastAstro.sunset) && 170 | Objects.equals(this.moonrise, forecastAstro.moonrise) && 171 | Objects.equals(this.moonset, forecastAstro.moonset) && 172 | Objects.equals(this.moonPhase, forecastAstro.moonPhase) && 173 | Objects.equals(this.moonIllumination, forecastAstro.moonIllumination); 174 | } 175 | 176 | @Override 177 | public int hashCode() { 178 | return Objects.hash(sunrise, sunset, moonrise, moonset, moonPhase, moonIllumination); 179 | } 180 | 181 | 182 | @Override 183 | public String toString() { 184 | StringBuilder sb = new StringBuilder(); 185 | sb.append("class ForecastAstro {\n"); 186 | 187 | sb.append(" sunrise: ").append(toIndentedString(sunrise)).append("\n"); 188 | sb.append(" sunset: ").append(toIndentedString(sunset)).append("\n"); 189 | sb.append(" moonrise: ").append(toIndentedString(moonrise)).append("\n"); 190 | sb.append(" moonset: ").append(toIndentedString(moonset)).append("\n"); 191 | sb.append(" moonPhase: ").append(toIndentedString(moonPhase)).append("\n"); 192 | sb.append(" moonIllumination: ").append(toIndentedString(moonIllumination)).append("\n"); 193 | sb.append("}"); 194 | return sb.toString(); 195 | } 196 | 197 | /** 198 | * Convert the given object to string with each line indented by 4 spaces 199 | * (except the first line). 200 | */ 201 | private String toIndentedString(java.lang.Object o) { 202 | if (o == null) { 203 | return "null"; 204 | } 205 | return o.toString().replace("\n", "\n "); 206 | } 207 | 208 | } 209 | 210 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/ForecastCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * ForecastCondition 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class ForecastCondition { 32 | @SerializedName("text") 33 | private String text = null; 34 | 35 | @SerializedName("icon") 36 | private String icon = null; 37 | 38 | @SerializedName("code") 39 | private Integer code = null; 40 | 41 | public ForecastCondition text(String text) { 42 | this.text = text; 43 | return this; 44 | } 45 | 46 | /** 47 | * Get text 48 | * @return text 49 | **/ 50 | @ApiModelProperty(example = "Clear", value = "") 51 | public String getText() { 52 | return text; 53 | } 54 | 55 | public void setText(String text) { 56 | this.text = text; 57 | } 58 | 59 | public ForecastCondition icon(String icon) { 60 | this.icon = icon; 61 | return this; 62 | } 63 | 64 | /** 65 | * Get icon 66 | * @return icon 67 | **/ 68 | @ApiModelProperty(example = "//cdn.weatherapi.com/weather/64x64/night/113.png", value = "") 69 | public String getIcon() { 70 | return icon; 71 | } 72 | 73 | public void setIcon(String icon) { 74 | this.icon = icon; 75 | } 76 | 77 | public ForecastCondition code(Integer code) { 78 | this.code = code; 79 | return this; 80 | } 81 | 82 | /** 83 | * Get code 84 | * @return code 85 | **/ 86 | @ApiModelProperty(example = "1000", value = "") 87 | public Integer getCode() { 88 | return code; 89 | } 90 | 91 | public void setCode(Integer code) { 92 | this.code = code; 93 | } 94 | 95 | 96 | @Override 97 | public boolean equals(java.lang.Object o) { 98 | if (this == o) { 99 | return true; 100 | } 101 | if (o == null || getClass() != o.getClass()) { 102 | return false; 103 | } 104 | ForecastCondition forecastCondition = (ForecastCondition) o; 105 | return Objects.equals(this.text, forecastCondition.text) && 106 | Objects.equals(this.icon, forecastCondition.icon) && 107 | Objects.equals(this.code, forecastCondition.code); 108 | } 109 | 110 | @Override 111 | public int hashCode() { 112 | return Objects.hash(text, icon, code); 113 | } 114 | 115 | 116 | @Override 117 | public String toString() { 118 | StringBuilder sb = new StringBuilder(); 119 | sb.append("class ForecastCondition {\n"); 120 | 121 | sb.append(" text: ").append(toIndentedString(text)).append("\n"); 122 | sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); 123 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 124 | sb.append("}"); 125 | return sb.toString(); 126 | } 127 | 128 | /** 129 | * Convert the given object to string with each line indented by 4 spaces 130 | * (except the first line). 131 | */ 132 | private String toIndentedString(java.lang.Object o) { 133 | if (o == null) { 134 | return "null"; 135 | } 136 | return o.toString().replace("\n", "\n "); 137 | } 138 | 139 | } 140 | 141 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/ForecastDayCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | 27 | /** 28 | * ForecastDayCondition 29 | */ 30 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 31 | public class ForecastDayCondition { 32 | @SerializedName("text") 33 | private String text = null; 34 | 35 | @SerializedName("icon") 36 | private String icon = null; 37 | 38 | @SerializedName("code") 39 | private Integer code = null; 40 | 41 | public ForecastDayCondition text(String text) { 42 | this.text = text; 43 | return this; 44 | } 45 | 46 | /** 47 | * Get text 48 | * @return text 49 | **/ 50 | @ApiModelProperty(example = "Sunny", value = "") 51 | public String getText() { 52 | return text; 53 | } 54 | 55 | public void setText(String text) { 56 | this.text = text; 57 | } 58 | 59 | public ForecastDayCondition icon(String icon) { 60 | this.icon = icon; 61 | return this; 62 | } 63 | 64 | /** 65 | * Get icon 66 | * @return icon 67 | **/ 68 | @ApiModelProperty(example = "//cdn.weatherapi.com/weather/64x64/day/113.png", value = "") 69 | public String getIcon() { 70 | return icon; 71 | } 72 | 73 | public void setIcon(String icon) { 74 | this.icon = icon; 75 | } 76 | 77 | public ForecastDayCondition code(Integer code) { 78 | this.code = code; 79 | return this; 80 | } 81 | 82 | /** 83 | * Get code 84 | * @return code 85 | **/ 86 | @ApiModelProperty(example = "1000", value = "") 87 | public Integer getCode() { 88 | return code; 89 | } 90 | 91 | public void setCode(Integer code) { 92 | this.code = code; 93 | } 94 | 95 | 96 | @Override 97 | public boolean equals(java.lang.Object o) { 98 | if (this == o) { 99 | return true; 100 | } 101 | if (o == null || getClass() != o.getClass()) { 102 | return false; 103 | } 104 | ForecastDayCondition forecastDayCondition = (ForecastDayCondition) o; 105 | return Objects.equals(this.text, forecastDayCondition.text) && 106 | Objects.equals(this.icon, forecastDayCondition.icon) && 107 | Objects.equals(this.code, forecastDayCondition.code); 108 | } 109 | 110 | @Override 111 | public int hashCode() { 112 | return Objects.hash(text, icon, code); 113 | } 114 | 115 | 116 | @Override 117 | public String toString() { 118 | StringBuilder sb = new StringBuilder(); 119 | sb.append("class ForecastDayCondition {\n"); 120 | 121 | sb.append(" text: ").append(toIndentedString(text)).append("\n"); 122 | sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); 123 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 124 | sb.append("}"); 125 | return sb.toString(); 126 | } 127 | 128 | /** 129 | * Convert the given object to string with each line indented by 4 spaces 130 | * (except the first line). 131 | */ 132 | private String toIndentedString(java.lang.Object o) { 133 | if (o == null) { 134 | return "null"; 135 | } 136 | return o.toString().replace("\n", "\n "); 137 | } 138 | 139 | } 140 | 141 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/ForecastForecastday.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.ForecastAstro; 26 | import io.swagger.client.model.ForecastDay; 27 | import io.swagger.client.model.ForecastHour; 28 | import java.io.IOException; 29 | import java.util.ArrayList; 30 | import java.util.List; 31 | import org.threeten.bp.LocalDate; 32 | 33 | /** 34 | * ForecastForecastday 35 | */ 36 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 37 | public class ForecastForecastday { 38 | @SerializedName("date") 39 | private LocalDate date = null; 40 | 41 | @SerializedName("date_epoch") 42 | private Integer dateEpoch = null; 43 | 44 | @SerializedName("day") 45 | private ForecastDay day = null; 46 | 47 | @SerializedName("astro") 48 | private ForecastAstro astro = null; 49 | 50 | @SerializedName("hour") 51 | private List hour = null; 52 | 53 | public ForecastForecastday date(LocalDate date) { 54 | this.date = date; 55 | return this; 56 | } 57 | 58 | /** 59 | * Get date 60 | * @return date 61 | **/ 62 | @ApiModelProperty(example = "2022-07-22T00:00:00.000Z", value = "") 63 | public LocalDate getDate() { 64 | return date; 65 | } 66 | 67 | public void setDate(LocalDate date) { 68 | this.date = date; 69 | } 70 | 71 | public ForecastForecastday dateEpoch(Integer dateEpoch) { 72 | this.dateEpoch = dateEpoch; 73 | return this; 74 | } 75 | 76 | /** 77 | * Get dateEpoch 78 | * @return dateEpoch 79 | **/ 80 | @ApiModelProperty(example = "1658448000", value = "") 81 | public Integer getDateEpoch() { 82 | return dateEpoch; 83 | } 84 | 85 | public void setDateEpoch(Integer dateEpoch) { 86 | this.dateEpoch = dateEpoch; 87 | } 88 | 89 | public ForecastForecastday day(ForecastDay day) { 90 | this.day = day; 91 | return this; 92 | } 93 | 94 | /** 95 | * Get day 96 | * @return day 97 | **/ 98 | @ApiModelProperty(value = "") 99 | public ForecastDay getDay() { 100 | return day; 101 | } 102 | 103 | public void setDay(ForecastDay day) { 104 | this.day = day; 105 | } 106 | 107 | public ForecastForecastday astro(ForecastAstro astro) { 108 | this.astro = astro; 109 | return this; 110 | } 111 | 112 | /** 113 | * Get astro 114 | * @return astro 115 | **/ 116 | @ApiModelProperty(value = "") 117 | public ForecastAstro getAstro() { 118 | return astro; 119 | } 120 | 121 | public void setAstro(ForecastAstro astro) { 122 | this.astro = astro; 123 | } 124 | 125 | public ForecastForecastday hour(List hour) { 126 | this.hour = hour; 127 | return this; 128 | } 129 | 130 | public ForecastForecastday addHourItem(ForecastHour hourItem) { 131 | if (this.hour == null) { 132 | this.hour = new ArrayList(); 133 | } 134 | this.hour.add(hourItem); 135 | return this; 136 | } 137 | 138 | /** 139 | * Get hour 140 | * @return hour 141 | **/ 142 | @ApiModelProperty(value = "") 143 | public List getHour() { 144 | return hour; 145 | } 146 | 147 | public void setHour(List hour) { 148 | this.hour = hour; 149 | } 150 | 151 | 152 | @Override 153 | public boolean equals(java.lang.Object o) { 154 | if (this == o) { 155 | return true; 156 | } 157 | if (o == null || getClass() != o.getClass()) { 158 | return false; 159 | } 160 | ForecastForecastday forecastForecastday = (ForecastForecastday) o; 161 | return Objects.equals(this.date, forecastForecastday.date) && 162 | Objects.equals(this.dateEpoch, forecastForecastday.dateEpoch) && 163 | Objects.equals(this.day, forecastForecastday.day) && 164 | Objects.equals(this.astro, forecastForecastday.astro) && 165 | Objects.equals(this.hour, forecastForecastday.hour); 166 | } 167 | 168 | @Override 169 | public int hashCode() { 170 | return Objects.hash(date, dateEpoch, day, astro, hour); 171 | } 172 | 173 | 174 | @Override 175 | public String toString() { 176 | StringBuilder sb = new StringBuilder(); 177 | sb.append("class ForecastForecastday {\n"); 178 | 179 | sb.append(" date: ").append(toIndentedString(date)).append("\n"); 180 | sb.append(" dateEpoch: ").append(toIndentedString(dateEpoch)).append("\n"); 181 | sb.append(" day: ").append(toIndentedString(day)).append("\n"); 182 | sb.append(" astro: ").append(toIndentedString(astro)).append("\n"); 183 | sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); 184 | sb.append("}"); 185 | return sb.toString(); 186 | } 187 | 188 | /** 189 | * Convert the given object to string with each line indented by 4 spaces 190 | * (except the first line). 191 | */ 192 | private String toIndentedString(java.lang.Object o) { 193 | if (o == null) { 194 | return "null"; 195 | } 196 | return o.toString().replace("\n", "\n "); 197 | } 198 | 199 | } 200 | 201 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/InlineResponse200.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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 4 | * 5 | * OpenAPI spec version: 1.0.0-oas3 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package io.swagger.client.model; 14 | 15 | import java.util.Objects; 16 | import java.util.Arrays; 17 | import com.google.gson.TypeAdapter; 18 | import com.google.gson.annotations.JsonAdapter; 19 | import com.google.gson.annotations.SerializedName; 20 | import com.google.gson.stream.JsonReader; 21 | import com.google.gson.stream.JsonWriter; 22 | import io.swagger.client.model.Current; 23 | import io.swagger.client.model.Location; 24 | import io.swagger.v3.oas.annotations.media.Schema; 25 | import java.io.IOException; 26 | /** 27 | * InlineResponse200 28 | */ 29 | 30 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-22T21:39:34.951Z[GMT]") 31 | public class InlineResponse200 { 32 | @SerializedName("location") 33 | private Location location = null; 34 | 35 | @SerializedName("current") 36 | private Current current = null; 37 | 38 | public InlineResponse200 location(Location location) { 39 | this.location = location; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get location 45 | * @return location 46 | **/ 47 | @Schema(description = "") 48 | public Location getLocation() { 49 | return location; 50 | } 51 | 52 | public void setLocation(Location location) { 53 | this.location = location; 54 | } 55 | 56 | public InlineResponse200 current(Current current) { 57 | this.current = current; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get current 63 | * @return current 64 | **/ 65 | @Schema(description = "") 66 | public Current getCurrent() { 67 | return current; 68 | } 69 | 70 | public void setCurrent(Current current) { 71 | this.current = current; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | InlineResponse200 inlineResponse200 = (InlineResponse200) o; 84 | return Objects.equals(this.location, inlineResponse200.location) && 85 | Objects.equals(this.current, inlineResponse200.current); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(location, current); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class InlineResponse200 {\n"); 98 | 99 | sb.append(" location: ").append(toIndentedString(location)).append("\n"); 100 | sb.append(" current: ").append(toIndentedString(current)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/InlineResponse2001.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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 4 | * 5 | * OpenAPI spec version: 1.0.0-oas3 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package io.swagger.client.model; 14 | 15 | import java.util.Objects; 16 | import java.util.Arrays; 17 | import com.google.gson.TypeAdapter; 18 | import com.google.gson.annotations.JsonAdapter; 19 | import com.google.gson.annotations.SerializedName; 20 | import com.google.gson.stream.JsonReader; 21 | import com.google.gson.stream.JsonWriter; 22 | import io.swagger.client.model.Alerts; 23 | import io.swagger.client.model.Current; 24 | import io.swagger.client.model.Forecast; 25 | import io.swagger.client.model.Location; 26 | import io.swagger.v3.oas.annotations.media.Schema; 27 | import java.io.IOException; 28 | /** 29 | * InlineResponse2001 30 | */ 31 | 32 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-22T21:39:34.951Z[GMT]") 33 | public class InlineResponse2001 { 34 | @SerializedName("location") 35 | private Location location = null; 36 | 37 | @SerializedName("current") 38 | private Current current = null; 39 | 40 | @SerializedName("forecast") 41 | private Forecast forecast = null; 42 | 43 | @SerializedName("alerts") 44 | private Alerts alerts = null; 45 | 46 | public InlineResponse2001 location(Location location) { 47 | this.location = location; 48 | return this; 49 | } 50 | 51 | /** 52 | * Get location 53 | * @return location 54 | **/ 55 | @Schema(description = "") 56 | public Location getLocation() { 57 | return location; 58 | } 59 | 60 | public void setLocation(Location location) { 61 | this.location = location; 62 | } 63 | 64 | public InlineResponse2001 current(Current current) { 65 | this.current = current; 66 | return this; 67 | } 68 | 69 | /** 70 | * Get current 71 | * @return current 72 | **/ 73 | @Schema(description = "") 74 | public Current getCurrent() { 75 | return current; 76 | } 77 | 78 | public void setCurrent(Current current) { 79 | this.current = current; 80 | } 81 | 82 | public InlineResponse2001 forecast(Forecast forecast) { 83 | this.forecast = forecast; 84 | return this; 85 | } 86 | 87 | /** 88 | * Get forecast 89 | * @return forecast 90 | **/ 91 | @Schema(description = "") 92 | public Forecast getForecast() { 93 | return forecast; 94 | } 95 | 96 | public void setForecast(Forecast forecast) { 97 | this.forecast = forecast; 98 | } 99 | 100 | public InlineResponse2001 alerts(Alerts alerts) { 101 | this.alerts = alerts; 102 | return this; 103 | } 104 | 105 | /** 106 | * Get alerts 107 | * @return alerts 108 | **/ 109 | @Schema(description = "") 110 | public Alerts getAlerts() { 111 | return alerts; 112 | } 113 | 114 | public void setAlerts(Alerts alerts) { 115 | this.alerts = alerts; 116 | } 117 | 118 | 119 | @Override 120 | public boolean equals(java.lang.Object o) { 121 | if (this == o) { 122 | return true; 123 | } 124 | if (o == null || getClass() != o.getClass()) { 125 | return false; 126 | } 127 | InlineResponse2001 inlineResponse2001 = (InlineResponse2001) o; 128 | return Objects.equals(this.location, inlineResponse2001.location) && 129 | Objects.equals(this.current, inlineResponse2001.current) && 130 | Objects.equals(this.forecast, inlineResponse2001.forecast) && 131 | Objects.equals(this.alerts, inlineResponse2001.alerts); 132 | } 133 | 134 | @Override 135 | public int hashCode() { 136 | return Objects.hash(location, current, forecast, alerts); 137 | } 138 | 139 | 140 | @Override 141 | public String toString() { 142 | StringBuilder sb = new StringBuilder(); 143 | sb.append("class InlineResponse2001 {\n"); 144 | 145 | sb.append(" location: ").append(toIndentedString(location)).append("\n"); 146 | sb.append(" current: ").append(toIndentedString(current)).append("\n"); 147 | sb.append(" forecast: ").append(toIndentedString(forecast)).append("\n"); 148 | sb.append(" alerts: ").append(toIndentedString(alerts)).append("\n"); 149 | sb.append("}"); 150 | return sb.toString(); 151 | } 152 | 153 | /** 154 | * Convert the given object to string with each line indented by 4 spaces 155 | * (except the first line). 156 | */ 157 | private String toIndentedString(java.lang.Object o) { 158 | if (o == null) { 159 | return "null"; 160 | } 161 | return o.toString().replace("\n", "\n "); 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/InlineResponse2002.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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 4 | * 5 | * OpenAPI spec version: 1.0.0-oas3 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package io.swagger.client.model; 14 | 15 | import java.util.Objects; 16 | import java.util.Arrays; 17 | import com.google.gson.TypeAdapter; 18 | import com.google.gson.annotations.JsonAdapter; 19 | import com.google.gson.annotations.SerializedName; 20 | import com.google.gson.stream.JsonReader; 21 | import com.google.gson.stream.JsonWriter; 22 | import io.swagger.client.model.Forecast; 23 | import io.swagger.client.model.Location; 24 | import io.swagger.v3.oas.annotations.media.Schema; 25 | import java.io.IOException; 26 | /** 27 | * InlineResponse2002 28 | */ 29 | 30 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-22T21:39:34.951Z[GMT]") 31 | public class InlineResponse2002 { 32 | @SerializedName("location") 33 | private Location location = null; 34 | 35 | @SerializedName("forecast") 36 | private Forecast forecast = null; 37 | 38 | public InlineResponse2002 location(Location location) { 39 | this.location = location; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get location 45 | * @return location 46 | **/ 47 | @Schema(description = "") 48 | public Location getLocation() { 49 | return location; 50 | } 51 | 52 | public void setLocation(Location location) { 53 | this.location = location; 54 | } 55 | 56 | public InlineResponse2002 forecast(Forecast forecast) { 57 | this.forecast = forecast; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get forecast 63 | * @return forecast 64 | **/ 65 | @Schema(description = "") 66 | public Forecast getForecast() { 67 | return forecast; 68 | } 69 | 70 | public void setForecast(Forecast forecast) { 71 | this.forecast = forecast; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | InlineResponse2002 inlineResponse2002 = (InlineResponse2002) o; 84 | return Objects.equals(this.location, inlineResponse2002.location) && 85 | Objects.equals(this.forecast, inlineResponse2002.forecast); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(location, forecast); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class InlineResponse2002 {\n"); 98 | 99 | sb.append(" location: ").append(toIndentedString(location)).append("\n"); 100 | sb.append(" forecast: ").append(toIndentedString(forecast)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/InlineResponse2003.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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 4 | * 5 | * OpenAPI spec version: 1.0.0-oas3 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package io.swagger.client.model; 14 | 15 | import java.util.Objects; 16 | import java.util.Arrays; 17 | import com.google.gson.TypeAdapter; 18 | import com.google.gson.annotations.JsonAdapter; 19 | import com.google.gson.annotations.SerializedName; 20 | import com.google.gson.stream.JsonReader; 21 | import com.google.gson.stream.JsonWriter; 22 | import io.swagger.client.model.Astronomy; 23 | import io.swagger.client.model.Location; 24 | import io.swagger.v3.oas.annotations.media.Schema; 25 | import java.io.IOException; 26 | /** 27 | * InlineResponse2003 28 | */ 29 | 30 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-22T21:39:34.951Z[GMT]") 31 | public class InlineResponse2003 { 32 | @SerializedName("location") 33 | private Location location = null; 34 | 35 | @SerializedName("astronomy") 36 | private Astronomy astronomy = null; 37 | 38 | public InlineResponse2003 location(Location location) { 39 | this.location = location; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get location 45 | * @return location 46 | **/ 47 | @Schema(description = "") 48 | public Location getLocation() { 49 | return location; 50 | } 51 | 52 | public void setLocation(Location location) { 53 | this.location = location; 54 | } 55 | 56 | public InlineResponse2003 astronomy(Astronomy astronomy) { 57 | this.astronomy = astronomy; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get astronomy 63 | * @return astronomy 64 | **/ 65 | @Schema(description = "") 66 | public Astronomy getAstronomy() { 67 | return astronomy; 68 | } 69 | 70 | public void setAstronomy(Astronomy astronomy) { 71 | this.astronomy = astronomy; 72 | } 73 | 74 | 75 | @Override 76 | public boolean equals(java.lang.Object o) { 77 | if (this == o) { 78 | return true; 79 | } 80 | if (o == null || getClass() != o.getClass()) { 81 | return false; 82 | } 83 | InlineResponse2003 inlineResponse2003 = (InlineResponse2003) o; 84 | return Objects.equals(this.location, inlineResponse2003.location) && 85 | Objects.equals(this.astronomy, inlineResponse2003.astronomy); 86 | } 87 | 88 | @Override 89 | public int hashCode() { 90 | return Objects.hash(location, astronomy); 91 | } 92 | 93 | 94 | @Override 95 | public String toString() { 96 | StringBuilder sb = new StringBuilder(); 97 | sb.append("class InlineResponse2003 {\n"); 98 | 99 | sb.append(" location: ").append(toIndentedString(location)).append("\n"); 100 | sb.append(" astronomy: ").append(toIndentedString(astronomy)).append("\n"); 101 | sb.append("}"); 102 | return sb.toString(); 103 | } 104 | 105 | /** 106 | * Convert the given object to string with each line indented by 4 spaces 107 | * (except the first line). 108 | */ 109 | private String toIndentedString(java.lang.Object o) { 110 | if (o == null) { 111 | return "null"; 112 | } 113 | return o.toString().replace("\n", "\n "); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Location.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | import java.math.BigDecimal; 27 | 28 | /** 29 | * Location 30 | */ 31 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 32 | public class Location { 33 | @SerializedName("name") 34 | private String name = null; 35 | 36 | @SerializedName("region") 37 | private String region = null; 38 | 39 | @SerializedName("country") 40 | private String country = null; 41 | 42 | @SerializedName("lat") 43 | private BigDecimal lat = null; 44 | 45 | @SerializedName("lon") 46 | private BigDecimal lon = null; 47 | 48 | @SerializedName("tz_id") 49 | private String tzId = null; 50 | 51 | @SerializedName("localtime_epoch") 52 | private Integer localtimeEpoch = null; 53 | 54 | @SerializedName("localtime") 55 | private String localtime = null; 56 | 57 | public Location name(String name) { 58 | this.name = name; 59 | return this; 60 | } 61 | 62 | /** 63 | * Get name 64 | * @return name 65 | **/ 66 | @ApiModelProperty(example = "New York", value = "") 67 | public String getName() { 68 | return name; 69 | } 70 | 71 | public void setName(String name) { 72 | this.name = name; 73 | } 74 | 75 | public Location region(String region) { 76 | this.region = region; 77 | return this; 78 | } 79 | 80 | /** 81 | * Get region 82 | * @return region 83 | **/ 84 | @ApiModelProperty(example = "New York", value = "") 85 | public String getRegion() { 86 | return region; 87 | } 88 | 89 | public void setRegion(String region) { 90 | this.region = region; 91 | } 92 | 93 | public Location country(String country) { 94 | this.country = country; 95 | return this; 96 | } 97 | 98 | /** 99 | * Get country 100 | * @return country 101 | **/ 102 | @ApiModelProperty(example = "United States of America", value = "") 103 | public String getCountry() { 104 | return country; 105 | } 106 | 107 | public void setCountry(String country) { 108 | this.country = country; 109 | } 110 | 111 | public Location lat(BigDecimal lat) { 112 | this.lat = lat; 113 | return this; 114 | } 115 | 116 | /** 117 | * Get lat 118 | * @return lat 119 | **/ 120 | @ApiModelProperty(example = "40.71", value = "") 121 | public BigDecimal getLat() { 122 | return lat; 123 | } 124 | 125 | public void setLat(BigDecimal lat) { 126 | this.lat = lat; 127 | } 128 | 129 | public Location lon(BigDecimal lon) { 130 | this.lon = lon; 131 | return this; 132 | } 133 | 134 | /** 135 | * Get lon 136 | * @return lon 137 | **/ 138 | @ApiModelProperty(example = "-74.01", value = "") 139 | public BigDecimal getLon() { 140 | return lon; 141 | } 142 | 143 | public void setLon(BigDecimal lon) { 144 | this.lon = lon; 145 | } 146 | 147 | public Location tzId(String tzId) { 148 | this.tzId = tzId; 149 | return this; 150 | } 151 | 152 | /** 153 | * Get tzId 154 | * @return tzId 155 | **/ 156 | @ApiModelProperty(example = "America/New_York", value = "") 157 | public String getTzId() { 158 | return tzId; 159 | } 160 | 161 | public void setTzId(String tzId) { 162 | this.tzId = tzId; 163 | } 164 | 165 | public Location localtimeEpoch(Integer localtimeEpoch) { 166 | this.localtimeEpoch = localtimeEpoch; 167 | return this; 168 | } 169 | 170 | /** 171 | * Get localtimeEpoch 172 | * @return localtimeEpoch 173 | **/ 174 | @ApiModelProperty(example = "1658522976", value = "") 175 | public Integer getLocaltimeEpoch() { 176 | return localtimeEpoch; 177 | } 178 | 179 | public void setLocaltimeEpoch(Integer localtimeEpoch) { 180 | this.localtimeEpoch = localtimeEpoch; 181 | } 182 | 183 | public Location localtime(String localtime) { 184 | this.localtime = localtime; 185 | return this; 186 | } 187 | 188 | /** 189 | * Get localtime 190 | * @return localtime 191 | **/ 192 | @ApiModelProperty(example = "2022-07-22 16:49", value = "") 193 | public String getLocaltime() { 194 | return localtime; 195 | } 196 | 197 | public void setLocaltime(String localtime) { 198 | this.localtime = localtime; 199 | } 200 | 201 | 202 | @Override 203 | public boolean equals(java.lang.Object o) { 204 | if (this == o) { 205 | return true; 206 | } 207 | if (o == null || getClass() != o.getClass()) { 208 | return false; 209 | } 210 | Location location = (Location) o; 211 | return Objects.equals(this.name, location.name) && 212 | Objects.equals(this.region, location.region) && 213 | Objects.equals(this.country, location.country) && 214 | Objects.equals(this.lat, location.lat) && 215 | Objects.equals(this.lon, location.lon) && 216 | Objects.equals(this.tzId, location.tzId) && 217 | Objects.equals(this.localtimeEpoch, location.localtimeEpoch) && 218 | Objects.equals(this.localtime, location.localtime); 219 | } 220 | 221 | @Override 222 | public int hashCode() { 223 | return Objects.hash(name, region, country, lat, lon, tzId, localtimeEpoch, localtime); 224 | } 225 | 226 | 227 | @Override 228 | public String toString() { 229 | StringBuilder sb = new StringBuilder(); 230 | sb.append("class Location {\n"); 231 | 232 | sb.append(" name: ").append(toIndentedString(name)).append("\n"); 233 | sb.append(" region: ").append(toIndentedString(region)).append("\n"); 234 | sb.append(" country: ").append(toIndentedString(country)).append("\n"); 235 | sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); 236 | sb.append(" lon: ").append(toIndentedString(lon)).append("\n"); 237 | sb.append(" tzId: ").append(toIndentedString(tzId)).append("\n"); 238 | sb.append(" localtimeEpoch: ").append(toIndentedString(localtimeEpoch)).append("\n"); 239 | sb.append(" localtime: ").append(toIndentedString(localtime)).append("\n"); 240 | sb.append("}"); 241 | return sb.toString(); 242 | } 243 | 244 | /** 245 | * Convert the given object to string with each line indented by 4 spaces 246 | * (except the first line). 247 | */ 248 | private String toIndentedString(java.lang.Object o) { 249 | if (o == null) { 250 | return "null"; 251 | } 252 | return o.toString().replace("\n", "\n "); 253 | } 254 | 255 | } 256 | 257 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Marine.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.MarineForecastday; 26 | import java.io.IOException; 27 | import java.util.ArrayList; 28 | import java.util.List; 29 | 30 | /** 31 | * Marine 32 | */ 33 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 34 | public class Marine { 35 | @SerializedName("forecastday") 36 | private List forecastday = null; 37 | 38 | public Marine forecastday(List forecastday) { 39 | this.forecastday = forecastday; 40 | return this; 41 | } 42 | 43 | public Marine addForecastdayItem(MarineForecastday forecastdayItem) { 44 | if (this.forecastday == null) { 45 | this.forecastday = new ArrayList(); 46 | } 47 | this.forecastday.add(forecastdayItem); 48 | return this; 49 | } 50 | 51 | /** 52 | * Get forecastday 53 | * @return forecastday 54 | **/ 55 | @ApiModelProperty(value = "") 56 | public List getForecastday() { 57 | return forecastday; 58 | } 59 | 60 | public void setForecastday(List forecastday) { 61 | this.forecastday = forecastday; 62 | } 63 | 64 | 65 | @Override 66 | public boolean equals(java.lang.Object o) { 67 | if (this == o) { 68 | return true; 69 | } 70 | if (o == null || getClass() != o.getClass()) { 71 | return false; 72 | } 73 | Marine marine = (Marine) o; 74 | return Objects.equals(this.forecastday, marine.forecastday); 75 | } 76 | 77 | @Override 78 | public int hashCode() { 79 | return Objects.hash(forecastday); 80 | } 81 | 82 | 83 | @Override 84 | public String toString() { 85 | StringBuilder sb = new StringBuilder(); 86 | sb.append("class Marine {\n"); 87 | 88 | sb.append(" forecastday: ").append(toIndentedString(forecastday)).append("\n"); 89 | sb.append("}"); 90 | return sb.toString(); 91 | } 92 | 93 | /** 94 | * Convert the given object to string with each line indented by 4 spaces 95 | * (except the first line). 96 | */ 97 | private String toIndentedString(java.lang.Object o) { 98 | if (o == null) { 99 | return "null"; 100 | } 101 | return o.toString().replace("\n", "\n "); 102 | } 103 | 104 | } 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/MarineForecastday.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import io.swagger.client.model.ForecastAstro; 26 | import io.swagger.client.model.ForecastDay; 27 | import io.swagger.client.model.MarineHour; 28 | import java.io.IOException; 29 | import java.util.ArrayList; 30 | import java.util.List; 31 | import org.threeten.bp.LocalDate; 32 | 33 | /** 34 | * MarineForecastday 35 | */ 36 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 37 | public class MarineForecastday { 38 | @SerializedName("date") 39 | private LocalDate date = null; 40 | 41 | @SerializedName("date_epoch") 42 | private Integer dateEpoch = null; 43 | 44 | @SerializedName("day") 45 | private ForecastDay day = null; 46 | 47 | @SerializedName("astro") 48 | private ForecastAstro astro = null; 49 | 50 | @SerializedName("hour") 51 | private List hour = null; 52 | 53 | public MarineForecastday date(LocalDate date) { 54 | this.date = date; 55 | return this; 56 | } 57 | 58 | /** 59 | * Get date 60 | * @return date 61 | **/ 62 | @ApiModelProperty(example = "2022-07-22T00:00:00.000Z", value = "") 63 | public LocalDate getDate() { 64 | return date; 65 | } 66 | 67 | public void setDate(LocalDate date) { 68 | this.date = date; 69 | } 70 | 71 | public MarineForecastday dateEpoch(Integer dateEpoch) { 72 | this.dateEpoch = dateEpoch; 73 | return this; 74 | } 75 | 76 | /** 77 | * Get dateEpoch 78 | * @return dateEpoch 79 | **/ 80 | @ApiModelProperty(example = "1658448000", value = "") 81 | public Integer getDateEpoch() { 82 | return dateEpoch; 83 | } 84 | 85 | public void setDateEpoch(Integer dateEpoch) { 86 | this.dateEpoch = dateEpoch; 87 | } 88 | 89 | public MarineForecastday day(ForecastDay day) { 90 | this.day = day; 91 | return this; 92 | } 93 | 94 | /** 95 | * Get day 96 | * @return day 97 | **/ 98 | @ApiModelProperty(value = "") 99 | public ForecastDay getDay() { 100 | return day; 101 | } 102 | 103 | public void setDay(ForecastDay day) { 104 | this.day = day; 105 | } 106 | 107 | public MarineForecastday astro(ForecastAstro astro) { 108 | this.astro = astro; 109 | return this; 110 | } 111 | 112 | /** 113 | * Get astro 114 | * @return astro 115 | **/ 116 | @ApiModelProperty(value = "") 117 | public ForecastAstro getAstro() { 118 | return astro; 119 | } 120 | 121 | public void setAstro(ForecastAstro astro) { 122 | this.astro = astro; 123 | } 124 | 125 | public MarineForecastday hour(List hour) { 126 | this.hour = hour; 127 | return this; 128 | } 129 | 130 | public MarineForecastday addHourItem(MarineHour hourItem) { 131 | if (this.hour == null) { 132 | this.hour = new ArrayList(); 133 | } 134 | this.hour.add(hourItem); 135 | return this; 136 | } 137 | 138 | /** 139 | * Get hour 140 | * @return hour 141 | **/ 142 | @ApiModelProperty(value = "") 143 | public List getHour() { 144 | return hour; 145 | } 146 | 147 | public void setHour(List hour) { 148 | this.hour = hour; 149 | } 150 | 151 | 152 | @Override 153 | public boolean equals(java.lang.Object o) { 154 | if (this == o) { 155 | return true; 156 | } 157 | if (o == null || getClass() != o.getClass()) { 158 | return false; 159 | } 160 | MarineForecastday marineForecastday = (MarineForecastday) o; 161 | return Objects.equals(this.date, marineForecastday.date) && 162 | Objects.equals(this.dateEpoch, marineForecastday.dateEpoch) && 163 | Objects.equals(this.day, marineForecastday.day) && 164 | Objects.equals(this.astro, marineForecastday.astro) && 165 | Objects.equals(this.hour, marineForecastday.hour); 166 | } 167 | 168 | @Override 169 | public int hashCode() { 170 | return Objects.hash(date, dateEpoch, day, astro, hour); 171 | } 172 | 173 | 174 | @Override 175 | public String toString() { 176 | StringBuilder sb = new StringBuilder(); 177 | sb.append("class MarineForecastday {\n"); 178 | 179 | sb.append(" date: ").append(toIndentedString(date)).append("\n"); 180 | sb.append(" dateEpoch: ").append(toIndentedString(dateEpoch)).append("\n"); 181 | sb.append(" day: ").append(toIndentedString(day)).append("\n"); 182 | sb.append(" astro: ").append(toIndentedString(astro)).append("\n"); 183 | sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); 184 | sb.append("}"); 185 | return sb.toString(); 186 | } 187 | 188 | /** 189 | * Convert the given object to string with each line indented by 4 spaces 190 | * (except the first line). 191 | */ 192 | private String toIndentedString(java.lang.Object o) { 193 | if (o == null) { 194 | return "null"; 195 | } 196 | return o.toString().replace("\n", "\n "); 197 | } 198 | 199 | } 200 | 201 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/client/model/Search.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.google.gson.TypeAdapter; 19 | import com.google.gson.annotations.JsonAdapter; 20 | import com.google.gson.annotations.SerializedName; 21 | import com.google.gson.stream.JsonReader; 22 | import com.google.gson.stream.JsonWriter; 23 | import io.swagger.annotations.ApiModel; 24 | import io.swagger.annotations.ApiModelProperty; 25 | import java.io.IOException; 26 | import java.math.BigDecimal; 27 | 28 | /** 29 | * Search 30 | */ 31 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-11-08T07:58:56.667Z") 32 | public class Search { 33 | @SerializedName("id") 34 | private Integer id = null; 35 | 36 | @SerializedName("name") 37 | private String name = null; 38 | 39 | @SerializedName("region") 40 | private String region = null; 41 | 42 | @SerializedName("country") 43 | private String country = null; 44 | 45 | @SerializedName("lat") 46 | private BigDecimal lat = null; 47 | 48 | @SerializedName("lon") 49 | private BigDecimal lon = null; 50 | 51 | @SerializedName("url") 52 | private String url = null; 53 | 54 | public Search id(Integer id) { 55 | this.id = id; 56 | return this; 57 | } 58 | 59 | /** 60 | * Get id 61 | * @return id 62 | **/ 63 | @ApiModelProperty(example = "2796590", value = "") 64 | public Integer getId() { 65 | return id; 66 | } 67 | 68 | public void setId(Integer id) { 69 | this.id = id; 70 | } 71 | 72 | public Search name(String name) { 73 | this.name = name; 74 | return this; 75 | } 76 | 77 | /** 78 | * Get name 79 | * @return name 80 | **/ 81 | @ApiModelProperty(example = "Holborn", value = "") 82 | public String getName() { 83 | return name; 84 | } 85 | 86 | public void setName(String name) { 87 | this.name = name; 88 | } 89 | 90 | public Search region(String region) { 91 | this.region = region; 92 | return this; 93 | } 94 | 95 | /** 96 | * Get region 97 | * @return region 98 | **/ 99 | @ApiModelProperty(example = "Camden Greater London", value = "") 100 | public String getRegion() { 101 | return region; 102 | } 103 | 104 | public void setRegion(String region) { 105 | this.region = region; 106 | } 107 | 108 | public Search country(String country) { 109 | this.country = country; 110 | return this; 111 | } 112 | 113 | /** 114 | * Get country 115 | * @return country 116 | **/ 117 | @ApiModelProperty(example = "United Kingdom", value = "") 118 | public String getCountry() { 119 | return country; 120 | } 121 | 122 | public void setCountry(String country) { 123 | this.country = country; 124 | } 125 | 126 | public Search lat(BigDecimal lat) { 127 | this.lat = lat; 128 | return this; 129 | } 130 | 131 | /** 132 | * Get lat 133 | * @return lat 134 | **/ 135 | @ApiModelProperty(example = "51.52", value = "") 136 | public BigDecimal getLat() { 137 | return lat; 138 | } 139 | 140 | public void setLat(BigDecimal lat) { 141 | this.lat = lat; 142 | } 143 | 144 | public Search lon(BigDecimal lon) { 145 | this.lon = lon; 146 | return this; 147 | } 148 | 149 | /** 150 | * Get lon 151 | * @return lon 152 | **/ 153 | @ApiModelProperty(example = "-0.12", value = "") 154 | public BigDecimal getLon() { 155 | return lon; 156 | } 157 | 158 | public void setLon(BigDecimal lon) { 159 | this.lon = lon; 160 | } 161 | 162 | public Search url(String url) { 163 | this.url = url; 164 | return this; 165 | } 166 | 167 | /** 168 | * Get url 169 | * @return url 170 | **/ 171 | @ApiModelProperty(example = "holborn-camden-greater-london-united-kingdom", value = "") 172 | public String getUrl() { 173 | return url; 174 | } 175 | 176 | public void setUrl(String url) { 177 | this.url = url; 178 | } 179 | 180 | 181 | @Override 182 | public boolean equals(java.lang.Object o) { 183 | if (this == o) { 184 | return true; 185 | } 186 | if (o == null || getClass() != o.getClass()) { 187 | return false; 188 | } 189 | Search search = (Search) o; 190 | return Objects.equals(this.id, search.id) && 191 | Objects.equals(this.name, search.name) && 192 | Objects.equals(this.region, search.region) && 193 | Objects.equals(this.country, search.country) && 194 | Objects.equals(this.lat, search.lat) && 195 | Objects.equals(this.lon, search.lon) && 196 | Objects.equals(this.url, search.url); 197 | } 198 | 199 | @Override 200 | public int hashCode() { 201 | return Objects.hash(id, name, region, country, lat, lon, url); 202 | } 203 | 204 | 205 | @Override 206 | public String toString() { 207 | StringBuilder sb = new StringBuilder(); 208 | sb.append("class Search {\n"); 209 | 210 | sb.append(" id: ").append(toIndentedString(id)).append("\n"); 211 | sb.append(" name: ").append(toIndentedString(name)).append("\n"); 212 | sb.append(" region: ").append(toIndentedString(region)).append("\n"); 213 | sb.append(" country: ").append(toIndentedString(country)).append("\n"); 214 | sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); 215 | sb.append(" lon: ").append(toIndentedString(lon)).append("\n"); 216 | sb.append(" url: ").append(toIndentedString(url)).append("\n"); 217 | sb.append("}"); 218 | return sb.toString(); 219 | } 220 | 221 | /** 222 | * Convert the given object to string with each line indented by 4 spaces 223 | * (except the first line). 224 | */ 225 | private String toIndentedString(java.lang.Object o) { 226 | if (o == null) { 227 | return "null"; 228 | } 229 | return o.toString().replace("\n", "\n "); 230 | } 231 | 232 | } 233 | 234 | -------------------------------------------------------------------------------- /src/test/java/io/swagger/client/api/ApIsApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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 4 | * 5 | * OpenAPI spec version: 1.0.0-oas3 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package io.swagger.client.api; 14 | 15 | import io.swagger.client.model.ArrayOfSearch; 16 | import io.swagger.client.model.Error400; 17 | import io.swagger.client.model.Error401; 18 | import io.swagger.client.model.Error403; 19 | import io.swagger.client.model.InlineResponse200; 20 | import io.swagger.client.model.InlineResponse2001; 21 | import io.swagger.client.model.InlineResponse2002; 22 | import io.swagger.client.model.InlineResponse2003; 23 | import io.swagger.client.model.Ip; 24 | import org.threeten.bp.LocalDate; 25 | import io.swagger.client.model.Location; 26 | import org.junit.Test; 27 | import org.junit.Ignore; 28 | 29 | 30 | import java.util.ArrayList; 31 | import java.util.HashMap; 32 | import java.util.List; 33 | import java.util.Map; 34 | 35 | 36 | /** 37 | * API tests for ApIsApi 38 | */ 39 | @Ignore 40 | public class ApIsApiTest { 41 | 42 | private final ApIsApi api = new ApIsApi(); 43 | 44 | /** 45 | * Astronomy API 46 | * 47 | * Return Location and Astronomy Object 48 | * 49 | * @throws Exception 50 | * if the Api call fails 51 | */ 52 | @Test 53 | public void astronomyTest() throws Exception { 54 | String q = null; 55 | LocalDate dt = null; 56 | InlineResponse2003 response = api.astronomy(q, dt); 57 | 58 | // TODO: test validations 59 | } 60 | /** 61 | * Forecast API 62 | * 63 | * Forecast weather API method returns upto next 10 day weather forecast and weather alert as json. The data is returned as a Forecast Object. Forecast object contains astronomy data, day weather forecast and hourly interval weather information for a given city. 64 | * 65 | * @throws Exception 66 | * if the Api call fails 67 | */ 68 | @Test 69 | public void forecastWeatherTest() throws Exception { 70 | String q = null; 71 | Integer days = null; 72 | LocalDate dt = null; 73 | Integer unixdt = null; 74 | Integer hour = null; 75 | String lang = null; 76 | InlineResponse2001 response = api.forecastWeather(q, days, dt, unixdt, hour, lang); 77 | 78 | // TODO: test validations 79 | } 80 | /** 81 | * Future API 82 | * 83 | * Future weather API method returns weather in a 3 hourly interval in future for a date between 14 days and 300 days from today in the future. 84 | * 85 | * @throws Exception 86 | * if the Api call fails 87 | */ 88 | @Test 89 | public void futureWeatherTest() throws Exception { 90 | String q = null; 91 | LocalDate dt = null; 92 | String lang = null; 93 | InlineResponse2002 response = api.futureWeather(q, dt, lang); 94 | 95 | // TODO: test validations 96 | } 97 | /** 98 | * History API 99 | * 100 | * History weather API method returns historical weather for a date on or after 1st Jan, 2010 as json. The data is returned as a Forecast Object. 101 | * 102 | * @throws Exception 103 | * if the Api call fails 104 | */ 105 | @Test 106 | public void historyWeatherTest() throws Exception { 107 | String q = null; 108 | LocalDate dt = null; 109 | Integer unixdt = null; 110 | LocalDate endDt = null; 111 | Integer unixendDt = null; 112 | Integer hour = null; 113 | String lang = null; 114 | InlineResponse2002 response = api.historyWeather(q, dt, unixdt, endDt, unixendDt, hour, lang); 115 | 116 | // TODO: test validations 117 | } 118 | /** 119 | * IP Lookup API 120 | * 121 | * IP Lookup API method allows a user to get up to date information for an IP address. 122 | * 123 | * @throws Exception 124 | * if the Api call fails 125 | */ 126 | @Test 127 | public void ipLookupTest() throws Exception { 128 | String q = null; 129 | Ip response = api.ipLookup(q); 130 | 131 | // TODO: test validations 132 | } 133 | /** 134 | * Realtime API 135 | * 136 | * Current weather or realtime weather API method allows a user to get up to date current weather information in json and xml. The data is returned as a Current Object.<br /><br />Current object contains current or realtime weather information for a given city. 137 | * 138 | * @throws Exception 139 | * if the Api call fails 140 | */ 141 | @Test 142 | public void realtimeWeatherTest() throws Exception { 143 | String q = null; 144 | String lang = null; 145 | InlineResponse200 response = api.realtimeWeather(q, lang); 146 | 147 | // TODO: test validations 148 | } 149 | /** 150 | * Search/Autocomplete API 151 | * 152 | * WeatherAPI.com Search or Autocomplete API returns matching cities and towns as an array of Location object. 153 | * 154 | * @throws Exception 155 | * if the Api call fails 156 | */ 157 | @Test 158 | public void searchAutocompleteWeatherTest() throws Exception { 159 | String q = null; 160 | ArrayOfSearch response = api.searchAutocompleteWeather(q); 161 | 162 | // TODO: test validations 163 | } 164 | /** 165 | * Time Zone API 166 | * 167 | * Return Location Object 168 | * 169 | * @throws Exception 170 | * if the Api call fails 171 | */ 172 | @Test 173 | public void timeZoneTest() throws Exception { 174 | String q = null; 175 | Location response = api.timeZone(q); 176 | 177 | // TODO: test validations 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /src/test/java/io/swagger/client/api/ApisApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Weather API 3 | * # 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](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! Try our weather API by using interactive [API Explorer](https://www.weatherapi.com/api-explorer.aspx). We also have SDK for popular framework/languages available on [Github](https://github.com/weatherapicom/) for quick integrations. 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 4 | * 5 | * OpenAPI spec version: 1.0.2 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.api; 15 | 16 | import io.swagger.client.model.ArrayOfSearch; 17 | import io.swagger.client.model.Error400; 18 | import io.swagger.client.model.Error401; 19 | import io.swagger.client.model.Error403; 20 | import io.swagger.client.model.Ip; 21 | import org.threeten.bp.LocalDate; 22 | import io.swagger.client.model.Location; 23 | import org.junit.Test; 24 | import org.junit.Ignore; 25 | 26 | 27 | import java.util.ArrayList; 28 | import java.util.HashMap; 29 | import java.util.List; 30 | import java.util.Map; 31 | 32 | /** 33 | * API tests for ApisApi 34 | */ 35 | @Ignore 36 | public class ApisApiTest { 37 | 38 | private final ApisApi api = new ApisApi(); 39 | 40 | 41 | /** 42 | * Astronomy API 43 | * 44 | * Return Location and Astronomy Object 45 | * 46 | * @throws Exception 47 | * if the Api call fails 48 | */ 49 | @Test 50 | public void astronomyTest() throws Exception { 51 | String q = null; 52 | LocalDate dt = null; 53 | Object response = api.astronomy(q, dt); 54 | 55 | // TODO: test validations 56 | } 57 | 58 | /** 59 | * Forecast API 60 | * 61 | * Forecast weather API method returns, depending upon your price plan level, upto next 14 day weather forecast and weather alert as json or xml. The data is returned as a Forecast Object.<br /><br />Forecast object contains astronomy data, day weather forecast and hourly interval weather information for a given city. 62 | * 63 | * @throws Exception 64 | * if the Api call fails 65 | */ 66 | @Test 67 | public void forecastWeatherTest() throws Exception { 68 | String q = null; 69 | Integer days = null; 70 | LocalDate dt = null; 71 | Integer unixdt = null; 72 | Integer hour = null; 73 | String lang = null; 74 | String alerts = null; 75 | String aqi = null; 76 | Integer tp = null; 77 | Object response = api.forecastWeather(q, days, dt, unixdt, hour, lang, alerts, aqi, tp); 78 | 79 | // TODO: test validations 80 | } 81 | 82 | /** 83 | * Future API 84 | * 85 | * Future weather API method returns weather in a 3 hourly interval in future for a date between 14 days and 365 days from today in the future. 86 | * 87 | * @throws Exception 88 | * if the Api call fails 89 | */ 90 | @Test 91 | public void futureWeatherTest() throws Exception { 92 | String q = null; 93 | LocalDate dt = null; 94 | String lang = null; 95 | Object response = api.futureWeather(q, dt, lang); 96 | 97 | // TODO: test validations 98 | } 99 | 100 | /** 101 | * History API 102 | * 103 | * History weather API method returns historical weather for a date on or after 1st Jan, 2010 as json. The data is returned as a Forecast Object. 104 | * 105 | * @throws Exception 106 | * if the Api call fails 107 | */ 108 | @Test 109 | public void historyWeatherTest() throws Exception { 110 | String q = null; 111 | LocalDate dt = null; 112 | Integer unixdt = null; 113 | LocalDate endDt = null; 114 | Integer unixendDt = null; 115 | Integer hour = null; 116 | String lang = null; 117 | Object response = api.historyWeather(q, dt, unixdt, endDt, unixendDt, hour, lang); 118 | 119 | // TODO: test validations 120 | } 121 | 122 | /** 123 | * IP Lookup API 124 | * 125 | * IP Lookup API method allows a user to get up to date information for an IP address. 126 | * 127 | * @throws Exception 128 | * if the Api call fails 129 | */ 130 | @Test 131 | public void ipLookupTest() throws Exception { 132 | String q = null; 133 | Ip response = api.ipLookup(q); 134 | 135 | // TODO: test validations 136 | } 137 | 138 | /** 139 | * Marine Weather API 140 | * 141 | * Marine weather API method returns upto next 7 day (depending upon your price plan level) marine and sailing weather forecast and tide data (depending upon your price plan level) as json or xml. The data is returned as a Marine Object.<br /><br />Marine object, depending upon your price plan level, contains astronomy data, day weather forecast and hourly interval weather information and tide data for a given sea/ocean point. 142 | * 143 | * @throws Exception 144 | * if the Api call fails 145 | */ 146 | @Test 147 | public void marineWeatherTest() throws Exception { 148 | String q = null; 149 | Integer days = null; 150 | LocalDate dt = null; 151 | Integer unixdt = null; 152 | Integer hour = null; 153 | String lang = null; 154 | Object response = api.marineWeather(q, days, dt, unixdt, hour, lang); 155 | 156 | // TODO: test validations 157 | } 158 | 159 | /** 160 | * Realtime API 161 | * 162 | * Current weather or realtime weather API method allows a user to get up to date current weather information in json and xml. The data is returned as a Current Object.<br /><br />Current object contains current or realtime weather information for a given city. 163 | * 164 | * @throws Exception 165 | * if the Api call fails 166 | */ 167 | @Test 168 | public void realtimeWeatherTest() throws Exception { 169 | String q = null; 170 | String lang = null; 171 | Object response = api.realtimeWeather(q, lang); 172 | 173 | // TODO: test validations 174 | } 175 | 176 | /** 177 | * Search/Autocomplete API 178 | * 179 | * WeatherAPI.com Search or Autocomplete API returns matching cities and towns as an array of Location object. 180 | * 181 | * @throws Exception 182 | * if the Api call fails 183 | */ 184 | @Test 185 | public void searchAutocompleteWeatherTest() throws Exception { 186 | String q = null; 187 | ArrayOfSearch response = api.searchAutocompleteWeather(q); 188 | 189 | // TODO: test validations 190 | } 191 | 192 | /** 193 | * Time Zone API 194 | * 195 | * Return Location Object 196 | * 197 | * @throws Exception 198 | * if the Api call fails 199 | */ 200 | @Test 201 | public void timeZoneTest() throws Exception { 202 | String q = null; 203 | Location response = api.timeZone(q); 204 | 205 | // TODO: test validations 206 | } 207 | 208 | } 209 | --------------------------------------------------------------------------------