Newer
Older
CitrusClient / app / src / main / java / com / example / citrusclient / rest / BooksRest.java
t-watanabe on 18 Jun 655 bytes Bookクラスを追加
package com.example.citrusclient.rest;

import java.util.Collection;
import java.util.HashMap;

import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;

public interface BooksRest {

    @GET("accounts/{account_id}/books")
    Call<Void> getBooks(
            @Path("account_id") String account_id
    );

    @FormUrlEncoded
    @POST("accounts/{account_id}/books")
    Call<Void> createBook(
            @Path("account_id") String account_id

    );
}