Skip to content

Commit

Permalink
update: build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
amirisback committed Apr 30, 2022
1 parent 1dd90a0 commit 7e7d8ee
Show file tree
Hide file tree
Showing 57 changed files with 1,172 additions and 1,162 deletions.
96 changes: 48 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ https://newsapi.org/
country: String?,
pageSize: Int?,
page: Int?,
callback: ConsumeApiResponse<ArticleResponse>
callback: FrogoDataResponse<ArticleResponse>
)

// Get Everythings
Expand All @@ -179,15 +179,15 @@ https://newsapi.org/
sortBy: String?,
pageSize: Int?,
page: Int?,
callback: ConsumeApiResponse<ArticleResponse>
callback: FrogoDataResponse<ArticleResponse>
)

// Get Sources
fun getSources(
language: String,
country: String,
category: String,
callback: ConsumeApiResponse<SourceResponse>
callback: FrogoDataResponse<SourceResponse>
)
</details>

Expand Down Expand Up @@ -239,37 +239,37 @@ https://www.themealdb.com/api.php
fun usingChuckInterceptor(context: Context)

// Search meal by name
fun searchMeal(mealName: String, callback: ConsumeApiResponse<MealResponse<Meal>>)
fun searchMeal(mealName: String, callback: FrogoDataResponse<MealResponse<Meal>>)

// List all meals by first letter
fun listAllMeal(firstLetter: String, callback: ConsumeApiResponse<MealResponse<Meal>>)
fun listAllMeal(firstLetter: String, callback: FrogoDataResponse<MealResponse<Meal>>)

// Lookup full meal details by id
fun lookupFullMeal(idMeal: String, callback: ConsumeApiResponse<MealResponse<Meal>>)
fun lookupFullMeal(idMeal: String, callback: FrogoDataResponse<MealResponse<Meal>>)

// Lookup a single random meal
fun lookupRandomMeal(callback: ConsumeApiResponse<MealResponse<Meal>>)
fun lookupRandomMeal(callback: FrogoDataResponse<MealResponse<Meal>>)

// List all meal categories
fun listMealCategories(callback: ConsumeApiResponse<CategoryResponse>)
fun listMealCategories(callback: FrogoDataResponse<CategoryResponse>)

// List all Categories
fun listAllCateories(callback: ConsumeApiResponse<MealResponse<Category>>)
fun listAllCateories(callback: FrogoDataResponse<MealResponse<Category>>)

// List all Area
fun listAllArea(callback: ConsumeApiResponse<MealResponse<Area>>)
fun listAllArea(callback: FrogoDataResponse<MealResponse<Area>>)

// List all Ingredients
fun listAllIngredients(callback: ConsumeApiResponse<MealResponse<Ingredient>>)
fun listAllIngredients(callback: FrogoDataResponse<MealResponse<Ingredient>>)

// Filter by main ingredient
fun filterByIngredient(ingredient: String, callback: ConsumeApiResponse<MealResponse<MealFilter>>)
fun filterByIngredient(ingredient: String, callback: FrogoDataResponse<MealResponse<MealFilter>>)

// Filter by Category
fun filterByCategory(category: String, callback: ConsumeApiResponse<MealResponse<MealFilter>>)
fun filterByCategory(category: String, callback: FrogoDataResponse<MealResponse<MealFilter>>)

// Filter by Area
fun filterByArea(area: String, callback: ConsumeApiResponse<MealResponse<MealFilter>>)
fun filterByArea(area: String, callback: FrogoDataResponse<MealResponse<MealFilter>>)

</details>

Expand Down Expand Up @@ -348,7 +348,7 @@ https://pixabay.com/api/docs/
order: String?,
page: Int?,
perPage: Int?,
callback: ConsumeApiResponse<Response<PixabayImage>>
callback: FrogoDataResponse<Response<PixabayImage>>
)

// Search for Video
Expand All @@ -365,7 +365,7 @@ https://pixabay.com/api/docs/
order: String?,
page: Int?,
perPage: Int?,
callback: ConsumeApiResponse<Response<PixabayVideo>>
callback: FrogoDataResponse<Response<PixabayVideo>>
)

</details>
Expand Down Expand Up @@ -423,100 +423,100 @@ https://www.thesportsdb.com/api.php
fun usingChuckInterceptor(context: Context)

// Search for team by name
fun searchForTeamByName(teamName: String?, callback: ConsumeApiResponse<Teams>)
fun searchForTeamByName(teamName: String?, callback: FrogoDataResponse<Teams>)

// Search for team short code
fun searchForTeamByShortCode(shortCode: String?, callback: ConsumeApiResponse<Teams>)
fun searchForTeamByShortCode(shortCode: String?, callback: FrogoDataResponse<Teams>)

// Search for all players from team *Patreon ONLY*
fun searchForAllPlayer(teamName: String?, callback: ConsumeApiResponse<Players>)
fun searchForAllPlayer(teamName: String?, callback: FrogoDataResponse<Players>)

// Search for players by player name
fun searchForPlayer(playerName: String?, callback: ConsumeApiResponse<Players>)
fun searchForPlayer(playerName: String?, callback: FrogoDataResponse<Players>)

// Search for players by player name and team name
fun searchForPlayer(playerName: String?, teamName: String?, callback: ConsumeApiResponse<Players>)
fun searchForPlayer(playerName: String?, teamName: String?, callback: FrogoDataResponse<Players>)

// Search for event by event name
fun searchForEvent(eventName: String?, callback: ConsumeApiResponse<Events>)
fun searchForEvent(eventName: String?, callback: FrogoDataResponse<Events>)

// Search For event by event name and season
fun searchForEvent(eventName: String?, season: String?, callback: ConsumeApiResponse<Events>)
fun searchForEvent(eventName: String?, season: String?, callback: FrogoDataResponse<Events>)

// Search for event by event file name
fun searchForEventFileName(eventFileName: String?, callback: ConsumeApiResponse<Events>)
fun searchForEventFileName(eventFileName: String?, callback: FrogoDataResponse<Events>)

// List all sports
fun getAllSports(callback: ConsumeApiResponse<Sports>)
fun getAllSports(callback: FrogoDataResponse<Sports>)

// List all leagues
fun getAllLeagues(callback: ConsumeApiResponse<Leagues>)
fun getAllLeagues(callback: FrogoDataResponse<Leagues>)

// List all Leagues in a country
fun searchAllLeagues(countryName: String?, callback: ConsumeApiResponse<Countrys>)
fun searchAllLeagues(countryName: String?, callback: FrogoDataResponse<Countrys>)

// List all Leagues in a country specific by sport
fun searchAllLeagues(countryName: String?, sportName: String?, callback: ConsumeApiResponse<Countrys>)
fun searchAllLeagues(countryName: String?, sportName: String?, callback: FrogoDataResponse<Countrys>)

// List all Seasons in a League
fun searchAllSeasons(idTeam: String?, callback: ConsumeApiResponse<Seasons>)
fun searchAllSeasons(idTeam: String?, callback: FrogoDataResponse<Seasons>)

// List all Teams in a League
fun searchAllTeam(league: String?, callback: ConsumeApiResponse<Teams>)
fun searchAllTeam(league: String?, callback: FrogoDataResponse<Teams>)

// List all Teams in Sportname & Country Name
fun searchAllTeam(sportName: String?, countryName: String?, callback: ConsumeApiResponse<Teams>)
fun searchAllTeam(sportName: String?, countryName: String?, callback: FrogoDataResponse<Teams>)

// List All teams details in a league by Id
fun lookupAllTeam(idLeague: String?, callback: ConsumeApiResponse<Teams>)
fun lookupAllTeam(idLeague: String?, callback: FrogoDataResponse<Teams>)

// List All players in a team by Team Id *Patreon ONLY*
fun lookupAllPlayer(idTeam: String?, callback: ConsumeApiResponse<Players>)
fun lookupAllPlayer(idTeam: String?, callback: FrogoDataResponse<Players>)

// List all users loved teams and players
fun searchLoves(userName: String?, callback: ConsumeApiResponse<Users>)
fun searchLoves(userName: String?, callback: FrogoDataResponse<Users>)

// League Details by Id
fun lookupLeagues(idLeague: String?, callback: ConsumeApiResponse<Leagues>)
fun lookupLeagues(idLeague: String?, callback: FrogoDataResponse<Leagues>)

// Team Details by Id
fun lookupTeam(idTeam: String?, callback: ConsumeApiResponse<Teams>)
fun lookupTeam(idTeam: String?, callback: FrogoDataResponse<Teams>)

// Player Details by Id
fun lookupPlayer(idPlayer: String?, callback: ConsumeApiResponse<Players>)
fun lookupPlayer(idPlayer: String?, callback: FrogoDataResponse<Players>)

// Event Details by Id
fun lookupEvent(idEvent: String?, callback: ConsumeApiResponse<Events>)
fun lookupEvent(idEvent: String?, callback: FrogoDataResponse<Events>)

// Player Honours by Player Id
fun lookupHonour(idPlayer: String?, callback: ConsumeApiResponse<Honors>)
fun lookupHonour(idPlayer: String?, callback: FrogoDataResponse<Honors>)

// Player Former Teams by Player Id
fun lookupFormerTeam(idPlayer: String?, callback: ConsumeApiResponse<FormerTeams>)
fun lookupFormerTeam(idPlayer: String?, callback: FrogoDataResponse<FormerTeams>)

// Player Contracts by Player Id
fun lookupContract(idPlayer: String?, callback: ConsumeApiResponse<Contracts>)
fun lookupContract(idPlayer: String?, callback: FrogoDataResponse<Contracts>)

// Lookup Table by League ID and Season
fun lookupTable(idLeague: String?, season: String?, callback: ConsumeApiResponse<Tables>)
fun lookupTable(idLeague: String?, season: String?, callback: FrogoDataResponse<Tables>)

// Next 5 Events by Team Id
fun eventsNext(idTeam: String?, callback: ConsumeApiResponse<Events>)
fun eventsNext(idTeam: String?, callback: FrogoDataResponse<Events>)

// Next 15 Events by League Id
fun eventsNextLeague(idLeague: String?, callback: ConsumeApiResponse<Events>)
fun eventsNextLeague(idLeague: String?, callback: FrogoDataResponse<Events>)

// Last 5 Events by Team Id
fun eventsLast(idTeam: String?, callback: ConsumeApiResponse<Results>)
fun eventsLast(idTeam: String?, callback: FrogoDataResponse<Results>)

// Last 15 Events by League Id
fun eventsPastLeague(idLeague: String?, callback: ConsumeApiResponse<Events>)
fun eventsPastLeague(idLeague: String?, callback: FrogoDataResponse<Events>)

// Events in a specific round by league id/round/season
fun eventsRound(idLeague: String?, round: String?, season: String?, callback: ConsumeApiResponse<Events>)
fun eventsRound(idLeague: String?, round: String?, season: String?, callback: FrogoDataResponse<Events>)

// All events in specific league by season (Free tier limited to 200 events)
fun eventsSeason(idLeague: String?, season: String?, callback: ConsumeApiResponse<Events>)
fun eventsSeason(idLeague: String?, season: String?, callback: FrogoDataResponse<Events>)


</details>
Expand Down
5 changes: 2 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ dependencies {
implementation(GitHub.glide)
implementation(Util.hdodenhofCircleImageView)

implementation("com.github.amirisback:frogo-recycler-view:4.1.3")

implementation("com.github.frogobox:frogo-ui:1.0.0")
implementation(DependencyGradle.FROGO_RECYCLER_VIEW)
implementation(DependencyGradle.FROGO_UI)
implementation(DependencyGradle.FROGO_SDK)

kapt(GitHub.glideCompiler)
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/java/com/frogobox/appapi/mvvm/news/NewsViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package com.frogobox.appapi.mvvm.news

import android.app.Application
import com.frogobox.api.news.ConsumeNewsApi
import com.frogobox.coreapi.news.model.Article
import com.frogobox.coreapi.news.response.ArticleResponse
import com.frogobox.coreapi.news.NewsUrl
import com.frogobox.coreapi.ConsumeApiResponse
import com.frogobox.coreapi.news.NewsConstant.CATEGORY_BUSINESS
import com.frogobox.coreapi.news.NewsConstant.CATEGORY_ENTERTAIMENT
Expand All @@ -14,6 +11,9 @@ import com.frogobox.coreapi.news.NewsConstant.CATEGORY_SCIENCE
import com.frogobox.coreapi.news.NewsConstant.CATEGORY_SPORTS
import com.frogobox.coreapi.news.NewsConstant.CATEGORY_TECHNOLOGY
import com.frogobox.coreapi.news.NewsConstant.COUNTRY_ID
import com.frogobox.coreapi.news.NewsUrl
import com.frogobox.coreapi.news.model.Article
import com.frogobox.coreapi.news.response.ArticleResponse
import com.frogobox.sdk.util.FrogoMutableLiveData
import com.frogobox.sdk.view.FrogoViewModel

Expand All @@ -34,7 +34,7 @@ class NewsViewModel(private val context: Application) : FrogoViewModel(context)
val listDataCategory = FrogoMutableLiveData<List<Article>>()
val listData = FrogoMutableLiveData<List<Article>>()
val listCategory = FrogoMutableLiveData<List<String>>()
private val consumeNewsApi = ConsumeNewsApi(NewsUrl.API_KEY)
private val consumeNewsApi = ConsumeNewsApi(NewsUrl.API_KEY).usingChuckInterceptor(context)

fun setupCategory() {
val categories = mutableListOf<String>()
Expand All @@ -49,7 +49,6 @@ class NewsViewModel(private val context: Application) : FrogoViewModel(context)
}

fun getTopHeadline(category: String) {
consumeNewsApi.usingChuckInterceptor(context)
consumeNewsApi.getTopHeadline(
null,
null,
Expand Down Expand Up @@ -88,7 +87,6 @@ class NewsViewModel(private val context: Application) : FrogoViewModel(context)
}

fun getTopHeadline() {
consumeNewsApi.usingChuckInterceptor(context)
consumeNewsApi.getTopHeadline(
null,
null,
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ repositories {

dependencies{
// library frogo-build-src
implementation("com.github.frogobox:open-build-src:1.1.1")
implementation("com.github.frogobox:open-build-src:1.1.2")
}
9 changes: 8 additions & 1 deletion buildSrc/src/main/kotlin/DependencyGradle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ object DependencyGradle {
const val KOTLIN_VERSION = Version.JetBrains.kotlin
const val COMPOSE_MULTIPLATFORM_VERSION = Version.Androidx.composeMultiPlatform

const val FROGO_SDK_VERSION = "1.0.4"
const val FROGO_SDK_VERSION = "1.0.5"
const val FROGO_SDK = "com.github.frogobox:frogo-sdk:$FROGO_SDK_VERSION"
const val FROGO_SDK_CORE = "com.github.frogobox.frogo-sdk:frogocoresdk:$FROGO_SDK_VERSION"

const val FROGO_UI_VERSION = "1.0.1"
const val FROGO_UI = "com.github.frogobox:frogo-ui:$FROGO_UI_VERSION"
const val FROGO_UI_CORE = "com.github.frogobox.frogo-ui:frogocoreui:$FROGO_UI_VERSION"

const val FROGO_RECYCLER_VIEW_VERSION = "4.1.4"
const val FROGO_RECYCLER_VIEW = "com.github.amirisback:frogo-recycler-view:$FROGO_RECYCLER_VIEW_VERSION"

const val FROGO_PATH_CORE_CONSUME_API = ":frogocoreconsumeapi"
const val FROGO_PATH_CONSUME_API = ":frogoconsumeapi"

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/movie/Certifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// CERTIFICATIONS
// Get Movie Certifications
fun getMovieCertifications(callback: ConsumeApiResponse<Certifications<CertificationMovie>>)
fun getMovieCertifications(callback: FrogoDataResponse<Certifications<CertificationMovie>>)

// CERTIFICATIONS
// Get TV Certifications
fun getTvCertifications(callback: ConsumeApiResponse<Certifications<CertificationTv>>)
fun getTvCertifications(callback: FrogoDataResponse<Certifications<CertificationTv>>)
6 changes: 3 additions & 3 deletions docs/tutorial/movie/Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
endDate: String?,
startDate: String?,
page: Int?,
callback: ConsumeApiResponse<Changes>
callback: FrogoDataResponse<Changes>
)

// CHANGES
Expand All @@ -15,7 +15,7 @@
endDate: String?,
startDate: String?,
page: Int?,
callback: ConsumeApiResponse<Changes>
callback: FrogoDataResponse<Changes>
)

// CHANGES
Expand All @@ -24,5 +24,5 @@
endDate: String?,
startDate: String?,
page: Int?,
callback: ConsumeApiResponse<Changes>
callback: FrogoDataResponse<Changes>
)
6 changes: 3 additions & 3 deletions docs/tutorial/movie/Collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
fun getCollectionDetails(
collection_id: Int,
language: String?,
callback: ConsumeApiResponse<CollectionsDetail>
callback: FrogoDataResponse<CollectionsDetail>
)

// COLLECTION
// Get Images
fun getCollectionImages(
collection_id: Int,
language: String?,
callback: ConsumeApiResponse<CollectionsImage>
callback: FrogoDataResponse<CollectionsImage>
)

// COLLECTION
// Get Translations
fun getCollectionTranslations(
collection_id: Int,
language: String?,
callback: ConsumeApiResponse<CollectionsTranslation>
callback: FrogoDataResponse<CollectionsTranslation>
)
6 changes: 3 additions & 3 deletions docs/tutorial/movie/Companies.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// Get Details
fun getCompaniesDetails(
company_id: Int,
callback: ConsumeApiResponse<CompaniesDetail>
callback: FrogoDataResponse<CompaniesDetail>
)

// COMPANIES
// Get Alternative Names
fun getCompaniesAlternativeName(
company_id: Int,
callback: ConsumeApiResponse<CompaniesAlternateName>
callback: FrogoDataResponse<CompaniesAlternateName>
)

// COMPANIES
// Get Images
fun getCompaniesImage(
company_id: Int,
callback: ConsumeApiResponse<CompaniesImage>
callback: FrogoDataResponse<CompaniesImage>
)
Loading

0 comments on commit 7e7d8ee

Please sign in to comment.