| | |
| | | |
| | | 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.*; |
| | |
| | | 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<BoxReceiver>> getBoxList(@Header Map<String, String> headers); |
| | | /** |
| | | * 获取云盒列表 |
| | | */ |
| | | @Get(value = TyConst.GET_BOX_LIST,interceptor = TokenInterceptor.class) |
| | | TyHttpCommonReceiver<List<BoxInfoReceiver>> getBoxList(); |
| | | |
| | | @Get(TyConst.GET_BOX_LIVE_URL) |
| | | TyHttpCommonReceiver<PullStreamUrlReceiver> getBoxLiveUrl(@Var("boxSn") String boxSn, @Header Map<String, String> headers); |
| | | /** |
| | | * 获取直播地址 |
| | | */ |
| | | @Get(value =TyConst.GET_BOX_LIVE_URL,interceptor = TokenInterceptor.class) |
| | | TyHttpCommonReceiver<BoxStreamUrlReceiver> getBoxLiveUrl(@Var("boxSn") String boxSn); |
| | | |
| | | @Post(TyConst.POST_BOX_HISTORY) |
| | | TyHttpCommonReceiver<List<BoxHistoryReceiver>> getBoxHistory(@JSONBody BoxHistoryDTO boxHistoryDTO, @Header Map<String, String> headers); |
| | | /** |
| | | * 获取飞行历史 |
| | | */ |
| | | @Post(value =TyConst.POST_BOX_HISTORY,interceptor = TokenInterceptor.class) |
| | | TyHttpCommonReceiver<List<BoxHistoryReceiver>> getBoxHistory(@JSONBody BoxHistoryDTO boxHistoryDTO); |
| | | |
| | | @Post(TyConst.POST_BOX_PHOTOS) |
| | | TyHttpCommonReceiver<List<BoxPhotosReceiver>> getBoxPhotos(@JSONBody BoxPhotosDTO boxPhotosDTO, @Header Map<String, String> headers); |
| | | /** |
| | | * 获取任务照片 |
| | | */ |
| | | @Post(value =TyConst.POST_BOX_PHOTOS,interceptor = TokenInterceptor.class) |
| | | TyHttpCommonReceiver<List<BoxPhotosReceiver>> getBoxPhotos(@JSONBody BoxPhotosDTO boxPhotosDTO); |
| | | |
| | | /** |
| | | * 修改云盒设置 |
| | | */ |
| | | @Post(value =TyConst.POST_BOX_UPDATE,interceptor = TokenInterceptor.class) |
| | | TyHttpCommonReceiver<?> updateBoxSettings(@JSONBody BoxSettingsDTO boxSettingsDTO); |
| | | } |