Last active
February 7, 2021 21:53
-
-
Save bumie-e/0334a8f69edae3605cc63986815130a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bumie.dounix; | |
import java.util.List; | |
import retrofit2.Call; | |
import retrofit2.http.Body; | |
import retrofit2.http.Field; | |
import retrofit2.http.FormUrlEncoded; | |
import retrofit2.http.GET; | |
import retrofit2.http.POST; | |
public interface JsonPlaceholderApi { | |
// All doughnuts | |
@GET("doughnut") | |
Call<List<Model>> getDoughnuts(); | |
@GET("doughnut/Speciality") | |
Call<List<Model>> getSpecialityDoughnut(); | |
@POST("doughnut") | |
@FormUrlEncoded | |
Call<Model> addDoughnut(@Field("name") String name, | |
@Field("image") String image, | |
@Field("description") String description, | |
@Field("price") String price, | |
@Field("category") String category); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment