package org.ntlab.acanthus_client.resources.gallery;

import org.ntlab.acanthus_client.entities.Page;

import java.util.ArrayList;

import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;

//-----------------------------------------------------------------
//
public interface PagesRest {

    //-----------------------------------------------------------------
    //
    @GET("gallery/{aid}/pageMap")
    Call<ArrayList<Page>> getPages(@Path("aid") Integer aid);

    //-----------------------------------------------------------------
    //
    @POST("gallery/{aid}/pageMap")
    Call<Integer> addPage(@Path("aid") Integer aid);

    //-----------------------------------------------------------------
    //
    @DELETE("gallery/{aid}/pageMap/{pageNo}")
    Call<Integer> deletePage(@Path("aid") Integer aid, @Path("pageNo") Integer pageNo);

    //-----------------------------------------------------------------
    //
    @GET("gallery/{aid}/pageMap/{pageNo}")
    Call<Page> getPage(@Path("aid") Integer aid, @Path("pageNo") Integer pageNo);

    //-----------------------------------------------------------------
    //
    @GET("gallery/{aid}/pageMap/size")
    Call<Integer> getPageSize(@Path("aid") Integer aid);

    //-----------------------------------------------------------------

}
