refactoring
This commit is contained in:
parent
bce75e76fe
commit
6cc10768d3
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,3 +41,4 @@ testem.log
|
|||
.DS_Store
|
||||
Thumbs.db
|
||||
src/environments/environment.ts
|
||||
src/environments/environment.ts
|
||||
|
|
|
@ -8,18 +8,15 @@ import { environment } from 'src/environments/environment';
|
|||
providedIn: 'root'
|
||||
})
|
||||
export class WeatherApiService {
|
||||
url:string = environment.weatherApiBaseUrl;
|
||||
temp:any
|
||||
url: string = environment.weatherApiBaseUrl;
|
||||
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
constructor(private http:HttpClient) {}
|
||||
|
||||
|
||||
getData():Observable<WeatherData>{
|
||||
return this.http.get<WeatherData>(this.url)
|
||||
}
|
||||
getDayPart(): Observable<Daypart>{
|
||||
return this.http.get<Daypart>(this.url)
|
||||
}
|
||||
getData(): Observable<WeatherData> {
|
||||
return this.http.get<WeatherData>(this.url)
|
||||
}
|
||||
getDayPart(): Observable<Daypart> {
|
||||
return this.http.get<Daypart>(this.url)
|
||||
}
|
||||
|
||||
}
|
|
@ -3,7 +3,8 @@
|
|||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
production: false,
|
||||
weatherApiBaseUrl: "https://api.weather.com/v3/wx/forecast/daily/5day?geocode=49.9667,7.9046&format=json&units=m&language=de-DE&apiKey=bd2007c3853d41bba007c3853d21bbb1"
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user