https://github.com/caravancodes/consumable-code-covid-19-api
Retrofit has been Handled !! || Consumable code for request Public API (Covid-19 Api) For Coronavirus Tracker || :books: :bat:
https://github.com/caravancodes/consumable-code-covid-19-api
android-api android-library api consumable corona coronavirus coronavirus-api coronavirus-info coronavirus-tracker coronavirus-tracking covid-19 covid-19-app covid-api covid-app covid-data covid-virus covid19 covid19-data library retrofit2
Last synced: 3 months ago
JSON representation
Retrofit has been Handled !! || Consumable code for request Public API (Covid-19 Api) For Coronavirus Tracker || :books: :bat:
- Host: GitHub
- URL: https://github.com/caravancodes/consumable-code-covid-19-api
- Owner: caravancodes
- License: apache-2.0
- Archived: true
- Created: 2020-03-17T10:54:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-28T07:38:32.000Z (almost 4 years ago)
- Last Synced: 2024-10-20T12:51:35.507Z (8 months ago)
- Topics: android-api, android-library, api, consumable, corona, coronavirus, coronavirus-api, coronavirus-info, coronavirus-tracker, coronavirus-tracking, covid-19, covid-19-app, covid-api, covid-app, covid-data, covid-virus, covid19, covid19-data, library, retrofit2
- Language: Kotlin
- Homepage: https://covid19api.com/
- Size: 175 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-project-catalogue - Click Here
README

## consumable-code-covid-19-api
[](https://jitpack.io/#amirisback/consumable-code-covid-19-api)
Eliminates the method of retrieving json data using retrofit repeatedly. so this project has a set of functions to retrieve data without the need for fetching data using the retrofit of the API## Documentation Covid 19 Api
https://covid19api.com/## Version Release
This Is Latest Release$version_release = 1.0.1
What's New??
* Adding Get Routes *
## How To Use This Project
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
// library consumable code covid 19 api
implementation 'com.github.amirisback:consumable-code-covid-19-api:1.0.1'
}
Step 3. Declaration ConsumeCovid19Api
val consumeCovid19Api = ConsumeCovid19Api()
consumeCovid19Api.usingChuckInterceptor(this) // This is Code Chuck Interceptor
consumeCovid19Api.getSummaryData(object : Covid19ResultCallback {
override fun getResultData(data: ReponseSummary) {
// * PLACE YOUR CODE HERE FOR UI / ARRAYLIST *
}override fun failedResult(statusCode: Int, errorMessage: String?) {
// failed result
}override fun onShowProgress() {
// showing your progress view
}override fun onHideProgress() {
// hiding your progress view
}
})
## Function Main From This Project// Switch For Using Chuck Interceptor
fun usingChuckInterceptor(context: Context)// List Routes
// List all routes with parameters and descriptions.
fun getRoutes(callback: Covid19ResultCallback>)// Get Summary Data
// Return new cases and total cases per country.
fun getSummaryData(callback: Covid19ResultCallback)// Get All Data
// This call returns ~8MB of data and currently takes around 5 seconds.
fun getAllData(callback: Covid19ResultCallback>)// Get All Countries
// List all countries and their provinces.
fun getAllCountries(callback: Covid19ResultCallback>)// Get Status By Country
// {country} must be the country_slug the API call above
// {status} must be one of: confirmed, deaths, recovered
fun getStatusByCountry(
country: String,
status: String,
callback: Covid19ResultCallback>
)// Get Status By Country And Province
// {country} must be the country_slug the API call above
// {status} must be one of: confirmed, deaths, recovered
fun getStatusByCountryProvince(
country: String,
status: String,
callback: Covid19ResultCallback>
)// Get Status By Country From First Recorded Case
// {country} must be the country_slug the API call above
// {status} must be one of: confirmed, deaths, recovered
fun getFirstRecordedByCountry(
country: String,
status: String,
callback: Covid19ResultCallback>
)// Get Status By Country And Province From First Recorded Case
// {country} must be the country_slug the API call above
// {status} must be one of: confirmed, deaths, recovered
fun getFirstRecordedByCountryProvince(
country: String,
status: String,
callback: Covid19ResultCallback>
)## Colaborator
Very open to anyone, I'll write your name under this, please contribute by sending an email to me- Mail To [email protected]
- Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
- Example : Github_amirisback_kotlin_admob-helper-implementationName Of Contribute
- Muhammad Faisal Amir
- Waiting List
- Waiting ListWaiting for your contribute
## Attention !!!
Please enjoy and don't forget fork and give a star
- Don't Forget Follow My Github Account
- If you like this library, please help me / you can donate to buy patreon services