com.cloudesire.platform.apiclient.api.CommentApi Maven / Gradle / Ivy
The newest version!
package com.cloudesire.platform.apiclient.api;
import com.cloudesire.platform.apiclient.dto.model.dto.CommentDTO;
import com.cloudesire.platform.apiclient.query.CommentQuery;
import com.cloudesire.platform.apiclient.query.PageRequestQuery;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import java.util.List;
public interface CommentApi
{
@POST( "comment" )
Call create( @Body CommentDTO comment );
@GET( "comment/{id}" )
Call get( @Path( "id" ) int id );
@GET( "comment" )
Call> getAll( @QueryMap CommentQuery query );
/**
* @deprecated by {@link #getAll(CommentQuery)}
*/
@Deprecated
@GET( "comment" )
Call> getListByProduct( @Query( "productId" ) int productId );
/**
* @deprecated by {@link #getAll(CommentQuery)}
*/
@Deprecated
@GET( "comment" )
Call> getListByProduct( @Query( "productId" ) int productId, @QueryMap PageRequestQuery pager );
@PUT( "comment/{id}" )
Call update( @Path( "id" ) int id, @Body CommentDTO comment );
@DELETE( "comment/{id}" )
Call delete( @Path( "id" ) int id );
}