GalleryRestに追記しました。 #26

Merged k-fujii merged 4 commits into nitta-lab-2021:master from nitta-lab-2021:GallerRest on 12 Jun 2021
Showing 1 changed file
View
39
app/src/main/java/org/ntlab/acanthus_client/resources/gallery/GalleryRest.java
package org.ntlab.acanthus_client.resources.gallery;
 
import org.ntlab.acanthus_client.entities.AnimationJson;
 
import java.util.Collection;
 
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
 
public interface GalleryRest {
 
//すべての作品情報を返す。
@GET("gallery")
Call<Collection<AnimationJson>> getGallery();
 
@GET("gallery")
Call<Collection<AnimationJson>> getAnimationByAnimationName(
@Query("name") String name
);
//作品の更新
@FormUrlEncoded
@POST("gallery")
Call<Integer> createAnimation(
@Field("name") String animationName,
@Field("token") String token,
@Field("uid") Integer uid
);
 
//特定の作品の表示
@GET("gallery/{aid}")
Call<Collection<AnimationJson>> getAnimationInformation(
@Path("aid") Integer aid
);
 
 
 
}