package com.example.administrator.zhapp.utils;

import com.example.administrator.zhapp.entity.wztpBean;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by ruihong on 2017/8/29.
 */

public interface Api {

    /**
     * 下载APK
     *
     * @param apkurl
     * @return
     */
    @GET()
    @Streaming
    Call<ResponseBody> downLoadApk(@Url String apkurl);

    @Multipart
    @POST("WLJS/WLUP/SetFiles.aspx")
    Call<wztpBean> uploadwztp(
            @Query("itemnum") String itemnum,
            @Query("itemid") String itemid,
            @Query("operid") String operid,
            @Query("type") String type,
            @Query("fname") String fname,
            @Part MultipartBody.Part file);
}
