Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Releases: caravancodes/consumable-code-covid-19-api

Adding get all route

18 Mar 06:42
Compare
Choose a tag to compare

adding get all route, function is on README.md status

Consumable-code-covid-19-api

18 Mar 06:32
Compare
Choose a tag to compare

Retrofit has been Handled !! || Consumable code for request Public API (Covid-19 Api) For Coronavirus Tracker || Link https://covid19api.com/

// Switch For Using Chuck Interceptor
fun usingChuckInterceptor(context: Context)

// Get Summary Data
// Return new cases and total cases per country.
fun getSummaryData(callback: Covid19ResultCallback<ReponseSummary>)

// Get All Data
// This call returns ~8MB of data and currently takes around 5 seconds.
fun getAllData(callback: Covid19ResultCallback<List<Status>>)

// Get All Countries
// List all countries and their provinces.
fun getAllCountries(callback: Covid19ResultCallback<List<Country>>)

// 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<List<Status>>
)

// 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<List<Status>>
)

// 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<List<Status>>
)

// 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<List<Status>>
)