private function BackupMigrateDropboxAPI::isJsonResponse in Backup and Migrate Dropbox 7.2
Returns whether the response should be a json string or file contents.
- 'api' endpoints always return json.
- 'content' endpoints may return:
- File contents (files/download).
- A json encoded object.
- Nothing (files/upload_session/append_v2).
Parameters
string $endpointType:
string $command:
Return value
bool True if the response is expected to be a json string, false otherwise.
1 call to BackupMigrateDropboxAPI::isJsonResponse()
- BackupMigrateDropboxAPI::sendMessage in ./
backup_migrate_dropbox.dropbox_api.inc - Sends a request to Dropbox and returns the response.
File
- ./
backup_migrate_dropbox.dropbox_api.inc, line 409 - backup_migrate_dropbox.api.inc
Class
- BackupMigrateDropboxAPI
- @file backup_migrate_dropbox.api.inc
Code
private function isJsonResponse($endpointType, $command) {
return $endpointType === 'api' || !in_array($command, [
'files/download',
'files/upload_session/append_v2',
]);
}