private static void listBatchTaskFiles(IoTDAClient client) { ListBatchTaskFilesRequest req = new ListBatchTaskFilesRequest { InstanceId = "1a7ffc5c-d89c-44dd-8265-b1653d951ce0" }; try { var resp = client.ListBatchTaskFiles(req); Console.WriteLine(resp.HttpStatusCode); foreach (var flie in resp.Files) { Console.WriteLine(JsonConvert.SerializeObject(flie)); } } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }
/// <summary> /// 查询批量任务文件列表 /// </summary> public async Task <ListBatchTaskFilesResponse> ListBatchTaskFilesAsync(ListBatchTaskFilesRequest listBatchTaskFilesRequest) { Dictionary <string, string> urlParam = new Dictionary <string, string>(); string urlPath = HttpUtils.AddUrlPath("/v5/iot/{project_id}/batchtask-files", urlParam); SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listBatchTaskFilesRequest); HttpResponseMessage response = await DoHttpRequestAsync("GET", request); return(JsonUtils.DeSerialize <ListBatchTaskFilesResponse>(response)); }