Метод | Описание | |
---|---|---|
__construct ( string $applicationKey, string $applicationSecret ) | Default constructor | |
__destruct ( ) | Default destructor | |
accountInfo ( ) : array | Retrieves information about the user's account. | |
copyRef ( string $path, bool[optional] $sandbox = false ) : array | Creates and returns a copy_ref to a file. This reference string can be used to copy that file to another user's Dropbox by passing it in as the fromCopyRef parameter on fileopsCopy. | |
delta ( string[optional] $cursor = null, string[optional] $locale = null ) : array | A way of letting you keep up with changes to files and folders in a user's Dropbox. You can periodically call /delta to get a list of "delta entries", which are instructions on how to update your local state to match the server's state. | |
fileopsCopy ( string[optional] $fromPath = null, string $toPath, string[optional] $fromCopyRef = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Copies a file or folder to a new location. | |
fileopsCreateFolder ( string $path, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Creates a folder. | |
fileopsDelete ( string $path, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Deletes a file or folder. | |
fileopsMove ( string $fromPath, string $toPath, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Moves a file or folder to a new location. | |
filesGet ( string $path, string[optional] $rev = null, bool[optional] $sandbox = false ) : array | Downloads a file. | |
filesPost ( string $path, string $localFile, bool[optional] $overwrite = null, string[optional] $parentRev = null, $locale = null, bool[optional] $sandbox = false ) : array | Uploads a file. | |
getTimeOut ( ) : integer | Get the timeout | |
getUserAgent ( ) : string | Get the useragent that will be used. | |
media ( string $path, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Returns a link directly to a file. | |
metadata ( string[optional] $path = '', int[optional] $fileLimit = 10000, string[optional] $hash = false, bool[optional] $list = true, bool[optional] $includeDeleted = false, string[optional] $rev = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Retrieves file and folder metadata. | |
oAuthAccessToken ( string $oauthToken ) : array | Step 3 of authentication. After the /oauth/authorize step is complete, the application can call /oauth/access_token to acquire an access token. | |
oAuthAuthorize ( string $oauthToken, string[optional] $oauthCallback = null, string[optional] $locale = null ) | Step 2 of authentication. Applications should direct the user to /oauth/authorize. This isn't an API call per se, but rather a web endpoint that lets the user sign in to Dropbox and choose whether to grant the application the ability to access files on their behalf. The page served by /oauth/authorize should be presented to the user through their web browser. Without the user's authorization in this step, it isn't possible for your application to obtain an access token from /oauth/access_token. | |
oAuthRequestToken ( ) : array | Step 1 of authentication. Obtain an OAuth request token to be used for the rest of the authentication process. | |
restore ( string $path, string $rev, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Restores a file path to a previous revision. | |
revisions ( string $path, int[optional] $revLimit = 10, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Obtains metadata for the previous revisions of a file. | |
search ( string $path, string $query, int[optional] $fileLimit = 1000, bool[optional] $includeDeleted = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Returns metadata for all files and folders whose filename contains the given search string as a substring. | |
setOAuthToken ( string $token ) | Set the oAuth-token | |
setOAuthTokenSecret ( string $secret ) | Set the oAuth-secret | |
setTimeOut ( integer $seconds ) | Set the timeout | |
setUserAgent ( string $userAgent ) | Get the useragent that will be used. | |
shares ( string $path, boolean $shortUrl = true, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | Creates and returns a Dropbox link to files or folders users can use to view a preview of the file in a web browser. | |
thumbnails ( string[optional] $path, string[optional] $size = 'small', string[optional] $format = 'jpeg', bool[optional] $sandbox = false ) : string | Gets a thumbnail for an image. |
Метод | Описание | |
---|---|---|
buildQuery ( array $parameters ) : string | Format the parameters as a querystring | |
calculateHeader ( array $parameters, string $url ) : string | Build the Authorization header | |
doCall ( string $url, array $parameters = null, string[optional] $method = 'GET', $filePath = null, $expectJSON = true, $isContent = false ) : string | Make the call | |
doOAuthCall ( string $url, array $parameters = null, string[optional] $method = 'POST', bool[optional] $expectJSON = true ) : mixed | Make an call to the oAuth | |
getApplicationKey ( ) : string | Get the application key | |
getApplicationSecret ( ) : string | Get the application secret | |
getOAuthToken ( ) : string | Get the oAuth-token | |
getOAuthTokenSecret ( ) : string | Get the oAuth-token-secret | |
setApplicationKey ( string $key ) | Set the application key | |
setApplicationSecret ( string $secret ) | Set the application secret | |
urlencode_rfc3986 ( mixed $value ) : string | URL-encode method for internal use |
public __construct ( string $applicationKey, string $applicationSecret ) | ||
$applicationKey | string | The application key to use. |
$applicationSecret | string | The application secret to use. |
public accountInfo ( ) : array | ||
Результат | array |
public fileopsCopy ( string[optional] $fromPath = null, string $toPath, string[optional] $fromCopyRef = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$fromPath | string[optional] | |
$toPath | string | Specifies the destination path, including the new name for the file or folder, relative to root. |
$fromCopyRef | string[optional] | |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public fileopsCreateFolder ( string $path, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$path | string | The path to the new folder to create relative to root. |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public fileopsDelete ( string $path, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$path | string | The path to the file or folder to be deleted. |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public fileopsMove ( string $fromPath, string $toPath, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$fromPath | string | Specifies the file or folder to be moved from relative to root. |
$toPath | string | Specifies the destination path, including the new name for the file or folder, relative to root. |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public filesPost ( string $path, string $localFile, bool[optional] $overwrite = null, string[optional] $parentRev = null, $locale = null, bool[optional] $sandbox = false ) : array | ||
$path | string | The path to the folder the file should be uploaded to. This parameter should not point to a file. |
$localFile | string | The path to the local file. |
$overwrite | bool[optional] | |
$parentRev | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public getUserAgent ( ) : string | ||
Результат | string |
public metadata ( string[optional] $path = '', int[optional] $fileLimit = 10000, string[optional] $hash = false, bool[optional] $list = true, bool[optional] $includeDeleted = false, string[optional] $rev = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$path | string[optional] | |
$fileLimit | int[optional] | |
$hash | string[optional] | |
$list | bool[optional] | |
$includeDeleted | bool[optional] | |
$rev | string[optional] | |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public oAuthAccessToken ( string $oauthToken ) : array | ||
$oauthToken | string | The token returned after authorizing. |
Результат | array |
public oAuthAuthorize ( string $oauthToken, string[optional] $oauthCallback = null, string[optional] $locale = null ) | ||
$oauthToken | string | The request token obtained via /oauth/request_token. |
$oauthCallback | string[optional] | |
$locale | string[optional] |
public oAuthRequestToken ( ) : array | ||
Результат | array |
public search ( string $path, string $query, int[optional] $fileLimit = 1000, bool[optional] $includeDeleted = null, string[optional] $locale = null, bool[optional] $sandbox = false ) : array | ||
$path | string | The path to the file. |
$query | string | The search string. Must be at least three characters long. |
$fileLimit | int[optional] | |
$includeDeleted | bool[optional] | |
$locale | string[optional] | |
$sandbox | bool[optional] | |
Результат | array |
public setOAuthToken ( string $token ) | ||
$token | string | The token to use. |
public setOAuthTokenSecret ( string $secret ) | ||
$secret | string | The secret to use. |
public setTimeOut ( integer $seconds ) | ||
$seconds | integer | The timeout in seconds. |
public setUserAgent ( string $userAgent ) | ||
$userAgent | string | The user-agent, it should look like |
public thumbnails ( string[optional] $path, string[optional] $size = 'small', string[optional] $format = 'jpeg', bool[optional] $sandbox = false ) : string | ||
$path | string[optional] | |
$size | string[optional] | |
$format | string[optional] | |
$sandbox | bool[optional] | |
Результат | string | An array with the content-type and the data as a base64-encoded string. |