管灌系统巡查员智能手机App
zuoxiao
2024-09-24 45e69852f43abe0f79967786ada3c7cf887b5b48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.dayu.pipirrapp.net;
 
 
import com.dayu.pipirrapp.bean.net.CodeResult;
import com.dayu.pipirrapp.bean.net.WeatherResponse;
 
import java.util.Map;
 
import io.reactivex.rxjava3.core.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
 
/**
 * Copyright (C), 2023,
 * Author: zuo
 * Date: 2023-03-27 14:56
 * Description:
 */
public interface ApiService {
 
 
    //获取天气
    @GET()
    Call<WeatherResponse> requestWeather(@Url String url, @QueryMap Map<String, Object> params);
 
 
    //    @FormUrlEncoded
    @POST()
    Observable<BaseResponse> requestPost(@Url String url, @Body Map<String, Object> params);
 
    @GET()
    Observable<BaseResponse> requestGet(@Url String url, @QueryMap Map<String, Object> params,@Header("token") String token);
 
    @GET()
    Observable<BaseResponse> requestGet(@Url String url);
 
    @GET()
    Observable<BaseResponse> requestGet(@Url String url, @Header("token") String token);
 
    @Streaming
    @GET()
    Observable<ResponseBody> requestGetCall(@Url String url);
 
    @Multipart
    @POST("file/upload")
    Call<BaseResponse> uploadFiles(@PartMap Map<String, RequestBody> map);
 
    @Multipart
    @POST(Constants.BASE_URL + "file/upload")
    Call<BaseResponse> uploadFile(@Part("description") RequestBody description, @Part MultipartBody.Part file);
 
    //获取验证码
    @GET(Constants.BASE_URL+":8088/app/captcha/get")
    Observable<CodeResult> getCode(@QueryMap Map<String, Object> params);
 
    @GET()
    Observable<ResponseBody> downloadTile(@Url String url);
 
}