https://github.com/caravancodes/consumable-code-the-sport-db-api
Retrofit has been Handled !! || Consumable code for request Public API (TheSportDBApi) || :soccer: :basketball:
https://github.com/caravancodes/consumable-code-the-sport-db-api
amirisback android-library api api-library consumable library mock mock-data public-api retrieve-data retrofit2 sportdata sportdbapi sports the-sport-db-api thesportsdb
Last synced: about 1 year ago
JSON representation
Retrofit has been Handled !! || Consumable code for request Public API (TheSportDBApi) || :soccer: :basketball:
- Host: GitHub
- URL: https://github.com/caravancodes/consumable-code-the-sport-db-api
- Owner: caravancodes
- License: apache-2.0
- Archived: true
- Created: 2020-01-26T06:12:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-28T07:34:41.000Z (almost 5 years ago)
- Last Synced: 2024-05-21T16:11:48.971Z (about 2 years ago)
- Topics: amirisback, android-library, api, api-library, consumable, library, mock, mock-data, public-api, retrieve-data, retrofit2, sportdata, sportdbapi, sports, the-sport-db-api, thesportsdb
- Language: Kotlin
- Homepage: https://www.thesportsdb.com/api.php
- Size: 1.08 MB
- Stars: 11
- Watchers: 1
- Forks: 0
- 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-the-sport-db-api
[](https://jitpack.io/#amirisback/consumable-code-the-sport-db-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
## Attention Please :bangbang:
Please use frogo-consume-api [Click Here](https://github.com/frogobox/frogo-consume-api) to get the latest updates
## Screenshoot Apps
| The Sport DB API | Chuck Data 1 | Chuck Data 2 |
|:------------------:|:----------------------------:|:---------------------:|
|
|
| 
## Version Release
This Is Latest Release
$version_release = 1.1.1
What's New??
* Update Build Gradle *
* Enhance Performance *
## 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 the sport db api
implementation 'com.github.amirisback:consumable-code-the-sport-db-api:1.1.1'
}
Step 3. Declaration ConsumeTheSportDbApi
val consumeTheSportDbApi = ConsumeTheSportDbApi("1") // "1" is API KEY
consumeTheSportDbApi.usingChuckInterceptor(this) // This is Code Chuck Interceptor
consumeTheSportDbApi.searchForPlayerByName(
"Danny Welbeck",
object : SportResultCallback {
override fun getResultData(data: Players) {
// * 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
}
})
## Documentation THE SPORT DB API
https://www.thesportsdb.com/api.php
## Function Main From This Project
// Switch For Using Chuck Interceptor
fun usingChuckInterceptor(context: Context)
// Search for team by name
fun searchForTeamByName(teamName: String?, sportResultCallback: SportResultCallback)
// Search for team short code
fun searchForTeamByShortCode(shortCode: String?, sportResultCallback: SportResultCallback)
// Search for all players from team *Patreon ONLY*
fun searchForAllPlayer(teamName: String?, sportResultCallback: SportResultCallback)
// Search for players by player name
fun searchForPlayer(playerName: String?, sportResultCallback: SportResultCallback)
// Search for players by player name and team name
fun searchForPlayer(playerName: String?, teamName: String?, sportResultCallback: SportResultCallback)
// Search for event by event name
fun searchForEvent(eventName: String?, sportResultCallback: SportResultCallback)
// Search For event by event name and season
fun searchForEvent(eventName: String?, season: String?, sportResultCallback: SportResultCallback)
// Search for event by event file name
fun searchForEventFileName(eventFileName: String?, sportResultCallback: SportResultCallback)
// List all sports
fun getAllSports(sportResultCallback: SportResultCallback)
// List all leagues
fun getAllLeagues(sportResultCallback: SportResultCallback)
// List all Leagues in a country
fun searchAllLeagues(countryName: String?, sportResultCallback: SportResultCallback)
// List all Leagues in a country specific by sport
fun searchAllLeagues(countryName: String?, sportName: String?, sportResultCallback: SportResultCallback)
// List all Seasons in a League
fun searchAllSeasons(idTeam: String?, sportResultCallback: SportResultCallback)
// List all Teams in a League
fun searchAllTeam(league: String?, sportResultCallback: SportResultCallback)
// List all Teams in Sportname & Country Name
fun searchAllTeam(sportName: String?, countryName: String?, sportResultCallback: SportResultCallback)
// List All teams details in a league by Id
fun lookupAllTeam(idLeague: String?, sportResultCallback: SportResultCallback)
// List All players in a team by Team Id *Patreon ONLY*
fun lookupAllPlayer(idTeam: String?, sportResultCallback: SportResultCallback)
// List all users loved teams and players
fun searchLoves(userName: String?, sportResultCallback: SportResultCallback)
// League Details by Id
fun lookupLeagues(idLeague: String?, sportResultCallback: SportResultCallback)
// Team Details by Id
fun lookupTeam(idTeam: String?, sportResultCallback: SportResultCallback)
// Player Details by Id
fun lookupPlayer(idPlayer: String?, sportResultCallback: SportResultCallback)
// Event Details by Id
fun lookupEvent(idEvent: String?, sportResultCallback: SportResultCallback)
// Player Honours by Player Id
fun lookupHonour(idPlayer: String?, sportResultCallback: SportResultCallback)
// Player Former Teams by Player Id
fun lookupFormerTeam(idPlayer: String?, sportResultCallback: SportResultCallback)
// Player Contracts by Player Id
fun lookupContract(idPlayer: String?, sportResultCallback: SportResultCallback)
// Lookup Table by League ID and Season
fun lookupTable(idLeague: String?, season: String?, sportResultCallback: SportResultCallback)
// Next 5 Events by Team Id
fun eventsNext(idTeam: String?, sportResultCallback: SportResultCallback)
// Next 15 Events by League Id
fun eventsNextLeague(idLeague: String?, sportResultCallback: SportResultCallback)
// Last 5 Events by Team Id
fun eventsLast(idTeam: String?, sportResultCallback: SportResultCallback)
// Last 15 Events by League Id
fun eventsPastLeague(idLeague: String?, sportResultCallback: SportResultCallback)
// Events in a specific round by league id/round/season
fun eventsRound(idLeague: String?, round: String?, season: String?, sportResultCallback: SportResultCallback)
// All events in specific league by season (Free tier limited to 200 events)
fun eventsSeason(idLeague: String?, season: String?, sportResultCallback: SportResultCallback)
## Colaborator
Very open to anyone, I'll write your name under this, please contribute by sending an email to me
- Mail To faisalamircs@gmail.com
- Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
- Example : Github_amirisback_kotlin_admob-helper-implementation
Name Of Contribute
- Muhammad Faisal Amir
- Waiting List
- Waiting List
Waiting 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