liusuyi
2024-11-02 4acf06226c8414c7218769995660dee97271a57b
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
package com.ard.tianyu.http;
 
import com.ard.tianyu.model.dto.BoxHistoryDTO;
import com.ard.tianyu.model.dto.BoxPhotosDTO;
import com.ard.tianyu.model.dto.BoxSettingsDTO;
import com.ard.tianyu.model.dto.TokenDTO;
import com.ard.tianyu.model.receiver.*;
import com.dtflys.forest.annotation.*;
 
import java.util.List;
import java.util.Map;
 
/**
 * TYClient
 *
 * @author liusuyi
 * @date 2024年10月21日14:45
 **/
@BaseRequest(
        baseURL = "http://#{tianyu.endpoint}"    // 默认域名
)
public interface TyClient {
    /**
     * 获取云盒TOKEN
     */
    @Post(TyConst.POST_TOKEN)
    TyHttpCommonReceiver<AccessTokenReceiver> getToken(@JSONBody TokenDTO tokenDTO);
 
    /**
     * 获取云盒列表
     */
    @Get(TyConst.GET_BOX_LIST)
    TyHttpCommonReceiver<List<BoxInfoReceiver>> getBoxList(@Header Map<String, String> headers);
 
    /**
     * 获取直播地址
     */
    @Get(TyConst.GET_BOX_LIVE_URL)
    TyHttpCommonReceiver<BoxStreamUrlReceiver> getBoxLiveUrl(@Var("boxSn") String boxSn, @Header Map<String, String> headers);
 
    /**
     * 获取飞行历史
     */
    @Post(TyConst.POST_BOX_HISTORY)
    TyHttpCommonReceiver<List<BoxHistoryReceiver>> getBoxHistory(@JSONBody BoxHistoryDTO boxHistoryDTO, @Header Map<String, String> headers);
 
    /**
     * 获取任务照片
     */
    @Post(TyConst.POST_BOX_PHOTOS)
    TyHttpCommonReceiver<List<BoxPhotosReceiver>> getBoxPhotos(@JSONBody BoxPhotosDTO boxPhotosDTO, @Header Map<String, String> headers);
 
    /**
     * 修改云盒设置
     */
    @Post(TyConst.POST_BOX_UPDATE)
    TyHttpCommonReceiver<?> updateBoxSettings(@JSONBody BoxSettingsDTO boxSettingsDTO, @Header Map<String, String> headers);
}