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

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amirisback committed Mar 15, 2020
1 parent 42da2a4 commit 0347f5a
Showing 1 changed file with 75 additions and 5 deletions.
80 changes: 75 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# consumable-code-meal-api By AmirIsBack
- v1.0.0 - Development
- Release Soon
- Stable Version

# About This Project
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
Expand All @@ -19,6 +19,43 @@ https://www.themealdb.com/api.php

# Function Main From This Project

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

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

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

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

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

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

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

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

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

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

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

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


# Android Library Version (build.gradle)
- ext.kotlin_version = '1.3.70'
- classpath 'com.android.tools.build:gradle:3.6.1'
Expand All @@ -29,15 +66,48 @@ https://www.themealdb.com/api.php
# Version Release
This Is Latest Release

$version_release = Still on development
$version_release = 1.0.0

What's New??

* Development *
* Stable Version *

# How To Use This Project
- Release soon

<h3>Step 1. Add the JitPack repository to your build file</h3>

Add it in your root build.gradle at the end of repositories:

allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}


<h3>Step 2. Add the dependency</h3>

dependencies {
// library consumable code the meal db api
implementation 'com.github.amirisback:consumable-code-the-meal-db-api:$version_release'
}

<h3>Step 3. Declaration ConsumeTheMealDbApi</h3>

val consumeMealApi = ConsumeTheMealDbApi("1") // 1 is API_KEY
consumeMealApi.usingChuckInterceptor(this) // Using Chuck Interceptor
consumeMealApi.listAllCateories(object : MealResultCallback<MealResponse<Category>> {
override fun getResultData(data: MealResponse<Category>) {

// * PLACE YOUR CODE HERE FOR UI / ARRAYLIST *

}

override fun failedResult(statusCode: Int, errorMessage: String?) {
Toast.makeText(this@MainActivity, errorMessage, Toast.LENGTH_SHORT).show()
}
})

# Colaborator
Very open to anyone, I'll write your name under this, please contribute by sending an email to me

Expand Down

0 comments on commit 0347f5a

Please sign in to comment.