mirror of
https://github.com/Prominence/openweathermap-java-api.git
synced 2026-01-10 11:56:44 +03:00
Fixed docs. Removed 'annotations' dependency.
This commit is contained in:
parent
d3ca16472b
commit
babc48bf6c
@ -258,9 +258,9 @@ Available requests:
|
||||
| `getHumidity()` | Returns *humidity* percentage information. |
|
||||
| `getWindSpeed()` | Returns wind's speed. |
|
||||
| `getWindDegrees()` | Returns wind's degree. |
|
||||
| `getWindUnit()` | Returns wind's unitSystem. |
|
||||
| `getWindUnit()` | Returns wind's unit. |
|
||||
| `getPressure()` | Returns pressure value. |
|
||||
| `getPressureUnit()` | Returns pressure's unitSystem. |
|
||||
| `getPressureUnit()` | Returns pressure's unit. |
|
||||
| `toString()` | Returns pretty string for the whole available forecast information. |
|
||||
|
||||
#### UV Index
|
||||
|
||||
@ -258,9 +258,9 @@ Available requests:
|
||||
| `getHumidity()` | Returns *humidity* percentage information. |
|
||||
| `getWindSpeed()` | Returns wind's speed. |
|
||||
| `getWindDegrees()` | Returns wind's degree. |
|
||||
| `getWindUnit()` | Returns wind's unitSystem. |
|
||||
| `getWindUnit()` | Returns wind's unit. |
|
||||
| `getPressure()` | Returns pressure value. |
|
||||
| `getPressureUnit()` | Returns pressure's unitSystem. |
|
||||
| `getPressureUnit()` | Returns pressure's unit. |
|
||||
| `toString()` | Returns pretty string for the whole available forecast information. |
|
||||
|
||||
#### UV Index
|
||||
|
||||
@ -171,5 +171,4 @@ Location: Minsk(BY), Weather: слегка облачно, 20.0 ℃, 1019.0 hPa,
|
||||
### Dependencies
|
||||
* com.fasterxml.jackson.core:jackson-databind:2.9.9
|
||||
* org.slf4j:slf4j-api:1.7.26 (*compile*)
|
||||
* org.jetbrains:annotations:17.0.0 (*compile*)
|
||||
* junit:junit:4.12 (*test*)
|
||||
6
pom.xml
6
pom.xml
@ -165,12 +165,6 @@
|
||||
<version>1.7.26</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>17.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@ -24,7 +24,6 @@ package com.github.prominence.openweathermap.api.utils;
|
||||
|
||||
import com.github.prominence.openweathermap.api.exception.DataNotFoundException;
|
||||
import com.github.prominence.openweathermap.api.exception.InvalidAuthTokenException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -56,8 +55,7 @@ public final class RequestUtils {
|
||||
* @throws DataNotFoundException in case if there is no any data for requested location(s) or request is invalid.
|
||||
* @throws IllegalStateException in case of unexpected response or error.
|
||||
*/
|
||||
@NotNull
|
||||
private static InputStream executeRequest(@NotNull URL requestUrl) {
|
||||
private static InputStream executeRequest(URL requestUrl) {
|
||||
InputStream resultStream;
|
||||
|
||||
try {
|
||||
@ -91,8 +89,7 @@ public final class RequestUtils {
|
||||
* @return response from the request in <code>String</code> representation.
|
||||
* @throws IllegalArgumentException in case if provided parameter isn't a valid url for {@link URL} instance.
|
||||
*/
|
||||
@NotNull
|
||||
public static String getResponse(@NotNull String url) {
|
||||
public static String getResponse(String url) {
|
||||
URL requestUrl;
|
||||
try {
|
||||
requestUrl = new URL(url);
|
||||
@ -112,8 +109,7 @@ public final class RequestUtils {
|
||||
* @return converted <code>InputStream</code> content.
|
||||
* @throws IllegalArgumentException in case if input stream is unable to be read.
|
||||
*/
|
||||
@NotNull
|
||||
private static String convertInputStreamToString(@NotNull InputStream inputStream) {
|
||||
private static String convertInputStreamToString(InputStream inputStream) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user