Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Karakas
SWP_SS24_Wetterdaten_sammeln
Commits
97718904
Commit
97718904
authored
Jun 12, 2024
by
Karakas
Browse files
updated api key
parent
b5da6936
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/io/swagger/api/CurrentweatherApiController.java
View file @
97718904
...
...
@@ -44,7 +44,7 @@ public class CurrentweatherApiController implements CurrentweatherApi {
ApiService
apiService
=
new
ApiService
(
restTemplate
);
String
data
=
apiService
.
getDataFromFirstApi
(
"https://api.weatherapi.com/v1/current.json?key=
1244099aeaee4b179e6111803241304
&q="
+
q
"https://api.weatherapi.com/v1/current.json?key=
afe1585243b94bec9d670336241206
&q="
+
q
+
"&aqi=yes"
);
ResponseEntity
<
Model200
>
response
=
new
ResponseEntity
<
Model200
>(
objectMapper
.
readValue
(
...
...
src/main/java/io/swagger/api/ForecastweatherApiController.java
View file @
97718904
...
...
@@ -53,7 +53,7 @@ public class ForecastweatherApiController implements ForecastweatherApi {
ApiService
apiService
=
new
ApiService
(
restTemplate
);
String
data
=
apiService
.
getDataFromFirstApi
(
"https://api.weatherapi.com/v1/forecast.json?key=
1244099aeaee4b179e6111803241304
&q="
+
q
"https://api.weatherapi.com/v1/forecast.json?key=
afe1585243b94bec9d670336241206
&q="
+
q
+
"&days="
+
days
+
"&aqi=yes&alerts="
+
alerts
);
ResponseEntity
<
Modelforecast
>
response
=
new
ResponseEntity
<
Modelforecast
>(
objectMapper
.
readValue
(
...
...
src/main/java/io/swagger/api/SearchApiController.java
View file @
97718904
...
...
@@ -44,7 +44,7 @@ public class SearchApiController implements SearchApi {
ApiService
apiService
=
new
ApiService
(
restTemplate
);
String
data
=
apiService
.
getDataFromFirstApi
(
"http://api.weatherapi.com/v1/search.json?key=
1244099aeaee4b179e6111803241304
&q="
+
city
);
"http://api.weatherapi.com/v1/search.json?key=
afe1585243b94bec9d670336241206
&q="
+
city
);
@SuppressWarnings
(
"unchecked"
)
ResponseEntity
<
List
<
Search
>>
response
=
new
ResponseEntity
<
List
<
Search
>>(
objectMapper
.
readValue
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment