$dropbox = new DropboxClient(array(
'app_key' => "yourkey",
'app_secret' => "yourecret",
'app_full_access' => false,
),'en');
no, not reallySo I am guessing it is quite new.
DropPHP doesn't seem to do DataStore access.no, not really
but there is a php version too you can grab on dropbox site
https://www.dropbox.com/developers/core/sdks/php
DropPHP was the first i found and i have tested (successfully)
DropPHP doesn't seem to do DataStore access.
function GetDatastores($path)
{
return $this->apiCall("datastores/list_datastores", "GET", array());
}
echo "<b>Datastores:</b>\r\n";
print_r($dropbox->GetDatastores("datastores/list_datastores"));
Datastores:
stdClass Object
(
[datastores] => Array()
)
function GetOrCreateDatastore($privateID){
return $this->apiCall("datastores/get_or_create_datastore", "POST", array("dsid"=>$privateID));
}
echo "<b>Datastore 'mannes' (get or create):</b>\r\n";
print_r($dropbox->GetOrCreateDatastore("mannes"));
#echo "<b>Put Datastore 'mannes' DELTAs:</b>\r\n";
#$delta = $dropbox->PutDatastoreDelta($ds->handle, $ds->rev, "", "[[\"I\", \"members\", \"2\", {\"username\": \"ManfredTest\", \"eMail\": \"[email protected]\"}]]");
echo "<b>Get Datastore 'mannes' Snapshot:</b>\r\n";
$delta = $dropbox->GetSnapshot($ds->handle);
print_r($delta);
stdClass Object
(
[rows] => Array
(
[0] => stdClass Object
(
[tid] => tasks
[data] => stdClass Object
(
[taskname] => do laundry
[completed] =>
)
[rowid] => myrecord
)
[1] => stdClass Object
(
[tid] => members
[data] => stdClass Object
(
[username] => DonManfred
[eMail] => [email protected]
)
[rowid] => 1
)
[2] => stdClass Object
(
[tid] => members
[data] => stdClass Object
(
[username] => ManfredTest
[eMail] => [email protected]
)
[rowid] => 2
)
)
[rev] => 3
)
The "I" in Adding Delta seems to be a command: I for Insert?
<change> ::= ["I", <tid>, <recordid>, <datadict>] # INSERT
| ["U", <tid>, <recordid>, <opdict>] # UPDATE
| ["D", <tid>, <recordid>] # DELETE