Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 month ago
JSON representation

Retrofit has been Handled !! || Consumable code for request Public API (TheSportDBApi) || :soccer: :basketball:

Awesome Lists containing this project

README

        

![ScreenShoot Apps](https://raw.githubusercontent.com/amirisback/amirisback/master/docs/image/deprecated.png?raw=true)

## consumable-code-the-sport-db-api
[![](https://jitpack.io/v/amirisback/consumable-code-the-sport-db-api.svg?style=flat-square)](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 [email protected]
- 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