package com.zxhl.cms.net.api;

import com.zxhl.cms.ad.upload.model.Response;


import com.zxhl.cms.common.NetConfig;
import com.zxhl.cms.net.model.video.MemberEntity;
import com.zxhl.cms.net.model.video.VideoEntity;
import com.zxhl.cms.net.model.video.VideoImgResult;
import com.zxhl.cms.net.model.video.VideoSynthesis;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryName;
import retrofit2.http.Url;

/**
 * Created by gaoleichao on 2018/5/2.
 */

public interface IVideoInfoApi {


    /**
     * 获取视频列表
     *
     * @return
     */
    @GET(NetConfig.Video.URL_NEWS_VIDEO_LIST)
    Observable<Response<List<VideoEntity>>> getVideoList(@Query("tag") String tag, @Query("page") String page, @Query("size") String size);

    /**
     * 获取视频播放地址
     *
     * @param
     * @param
     * @return
     */
    @GET
    Observable<VideoEntity> getVideoInfo(@Url String url);

    /**
     * 获取频道列表
     *
     * @return
     */
    @GET(NetConfig.Video.URL_VIDEO_TAB)
    Observable<Response<List<String>>> channels();

    /**
     * 获取频道列表
     *
     * @return
     */
    @GET(NetConfig.Video.URL_IMG_LIST)
    Observable<Response<List<String>>> getVideoImgList();

    /**
     * 获取频道列表
     *
     * @return
     */
    @Multipart
    @POST
    Observable<Response<VideoImgResult>> imgUpload(@Url String  url,@Part MultipartBody.Part file,@Query("tabId") String tabid);


    /**
     * 获取频道列表
     *
     * @return
     */
    @GET(NetConfig.User.URL_PAY_CONFIG)
    Observable<Response<MemberEntity>> getPayConfig();


    /**
     * 获取频道列表
     *
     * @return
     */
    @POST
    Observable<Response<VideoSynthesis>> videoSynthesis(@Url String url, @Query("imgUrl") String imgUrl, @Query("tabId") String tabId);


    /**
     * 获取频道列表
     *
     * @return
     */
    @GET
    Observable<Response<VideoEntity>> queryVideo(@Url String url, @Query("reqId") String reqId);

}
