GetFileList
Retrieves the details of custom files stored on the server.
Service | Operation |
---|---|
s3Handling | GET_FILE_LIST |
Method Parameters
Parameter | Description |
---|---|
category | Category of files to retrieve |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.S3HandlingService.GetFileList(successCallback, failureCallback);
_bc->getS3HandlingService()->getFileList(this);
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc s3HandlingService] getFileList:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
this; // implements IServerCallback
_bc.getS3HandlingService().getFileList(this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
_bc.s3Handling.getFileList(result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
ServerResponse result = await _bc.s3HandlingService.getFileList();
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var s3HandlingProxy = bridge.getS3HandlingServiceProxy();
var postResult = s3HandlingProxy.getFileList();
if (postResult.status == 200) {
// Success!
}
{
"service": "s3Handling",
"operation": "GET_FILE_LIST",
"data": {}
}
JSON Response
{
"status": 200,
"data": {
"fileDetails": [{
"gameId": "12311331",
"fileId": "3780516b-14f8-4055-8899-8eaab6ac7e82",
"shortName": "Test Doc",
"fileName": "testDoc.txt",
"type": "g",
"subType": "cust",
"category": null,
"fileSize": 4,
"dateUploaded": 1437154770000,
"relativeUrl": "/cust/testDoc.txt",
"absoluteUrl": "http://api.braincloudservers.com/s3/portal/g/12311331/cust/testDoc.txt",
"md5Hash": "d41d8cd98f00b204e9800998ecf8427e",
"md5HashHex" : "b895454d7210f7cb84aab76289ffd39c"
}]
}
}