文档中心 > API类目 > 云游戏API

alibaba.cgame.content.distribution.file.download.update (文件下载回调)

提供内容服务器更新文件下载状态的能力

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
req_param FileDownloadCallbackRequest 可选 请求参数
  • result
  • DownloadFileCommandResult
  • 可选
  • 文件下载结果
  • └ succeeded
  • Boolean
  • 可选
  • true
  • 文件下载是否成功
  • └ task_id
  • String
  • 可选
  • t_pre_0abb7a70-56c3-4a11-99fe-565e3522d758
  • 文件下载任务ID
  • └ failure_reason
  • String
  • 可选
  • PACKAGE_NOT_FOUND
  • 文件下载失败原因

响应参数

名称 类型 示例值 描述
succeeded Boolean true 文件下载是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCgameContentDistributionFileDownloadUpdateRequest req = new AlibabaCgameContentDistributionFileDownloadUpdateRequest();
AlibabaCgameContentDistributionFileDownloadUpdateRequest.FileDownloadCallbackRequest obj1 = new AlibabaCgameContentDistributionFileDownloadUpdateRequest.FileDownloadCallbackRequest();
AlibabaCgameContentDistributionFileDownloadUpdateRequest.DownloadFileCommandResult obj2 = new AlibabaCgameContentDistributionFileDownloadUpdateRequest.DownloadFileCommandResult();
obj2.setSucceeded(true);
obj2.setTaskId("t_pre_0abb7a70-56c3-4a11-99fe-565e3522d758");
obj2.setFailureReason("PACKAGE_NOT_FOUND");
obj1.setResult(obj2);
req.setReqParam(obj1);
AlibabaCgameContentDistributionFileDownloadUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_cgame_content_distribution_file_download_update_response>
    <succeeded>true</succeeded>
</alibaba_cgame_content_distribution_file_download_update_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部