Beruflich Dokumente
Kultur Dokumente
What is Retrofit?
Retrofit is a REST Client for Android and Java by Square. It makes it relatively easy to
retrieve and upload JSON (or other structured data) via a REST based webservice.
Using Retrofit:
Our Application uses 21 APIs to fetch and send data to our backend server using Retrofit. The names of
those APIs are as follow:
1. All items :-
This is a GET API is used to fetch all the food items data from database.
2. Recommended Products:-
This is a GET API is used to fetch Food Items that are recommended by the restaurant.
3. Category:-
This is a GET API that fetch food items category list.
4. Resturant Details:-
This is a GET API that fetches Resturant details like Address, Phone No, Tax charges and much
more.
\
5. Faq:-
This is a GET API that fetches frequently asked questions data from database.
8. Add Whislist:-
This is a POST API that send clients favorite items data to server to store it. It takes product ID
and user ID as parameters.
9. Add Cart:-
This is a POST API that sends clients item data that he wants to add in his/her cart.
10. Delete Cart:-
This is a POST API that updates clients’ cart data when he/she delete one or multiple items.
12. WishList:-
This is a POST API that returns items data that are marked as favorite by the user.
18. Login:-
This is a POST API that takes user email and password to login into the app.
When on the product page and user click “ADD TO CART” button /JSON/add-cart.php is called, Flow
Chart ( Fig no) show the working of this API in brief.
//TODO ADD IMAGE OF APP WITH “ PROCEED TO payment” BUTTON
When “Procced To Payment” button is clicked /JSON/addorders.php API is called, Flow Chart (Fig no)
show working of this API on Server-side.