Skip to content

Example of data collection using the library retrofit2 (weather forecast from https://openweathermap.org)

License

Notifications You must be signed in to change notification settings

avbase/WeatherData

Repository files navigation

WeatherData - example of data collection using the library retrofit2 (weather forecast from https://openweathermap.org):

platform Kotlin version License

Used resources weatherData:

- Сlean architecture
- MVVM (ViewModel, ViewModelFactory)
- viewBinding
- Coroutines
- Retrofit2
- OkHttp
- Picasso
- JSON

How to use

To use it you need to get a token by registering on the resource https:/openweathermap.org.

private const val CITY_ID = 496638L//city for example - Sergiev Posad
private const val UNITS = "metric" //unit of measurement
private const val TOKEN = "" //https:/openweathermap.org. !!!

All required models generated by Data Classes Generated from JSON powered by http://www.json2kotlin.com

License

Copyright (C) 2021 The avicorp Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.