You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf("Got a runtime error: %s\n", error->message);
276
+
}
277
+
ds3_free_error(error);
278
+
ds3_free_creds(creds);
279
+
ds3_free_client(client);
280
+
return 1;
281
+
}
282
+
283
+
if (response == NULL) {
284
+
printf("Response was null\n");
285
+
ds3_free_creds(creds);
286
+
ds3_free_client(client);
287
+
return 1;
288
+
}
289
+
290
+
if(response->num_objects == 0) {
291
+
printf("No objects returned\n");
292
+
ds3_free_bucket_response(response);
293
+
ds3_free_creds(creds);
294
+
ds3_free_client(client);
295
+
return 0;
296
+
}
297
+
298
+
for (i = 0; i < response->num_objects; i++) {
299
+
ds3_object object = response->objects[i];
300
+
printf("Object: (%s) created on %s\n", object.name, object.last_modified);
301
+
}
302
+
303
+
ds3_free_bucket_response(response);
304
+
305
+
ds3_free_creds(creds);
306
+
ds3_free_client(client);
307
+
ds3_cleanup();
308
+
return 0;
309
+
}
310
+
```
311
+
312
+
The structure of the code is very similar to the previous examples. Setup the client, setup the call, perform the call. Every request follows this same pattern. Things get a little more complicated with the bulk get/put cases. The following bulk put will demonstrate some of those complexities
0 commit comments