Dropbox V2 API.
More...
◆ __construct()
repository_dropbox\dropbox::__construct |
( |
issuer | $issuer, |
|
|
| $callback ) |
Create the DropBox API Client.
- Parameters
-
issuer | $issuer | The dropbox issuer |
string | $callback | The callback URL |
◆ auth_url()
repository_dropbox\dropbox::auth_url |
( |
| ) |
|
|
protected |
Returns the auth url for OAuth 2.0 request.
- Return values
-
◆ check_and_handle_api_errors()
repository_dropbox\dropbox::check_and_handle_api_errors |
( |
| $data | ) |
|
|
protected |
◆ fetch_dropbox_content()
repository_dropbox\dropbox::fetch_dropbox_content |
( |
| $endpoint, |
|
|
| $data = [] ) |
|
protected |
Fetch content from the specified endpoint with the supplied data.
- Parameters
-
string | $endpoint | The endpoint to be contacted |
array | $data | Any data to pass to the endpoint |
- Return values
-
◆ fetch_dropbox_data()
repository_dropbox\dropbox::fetch_dropbox_data |
( |
| $endpoint, |
|
|
| $data = [], |
|
|
string | $resultnode = 'entries' ) |
|
protected |
Make an API call against the specified endpoint with supplied data.
- Parameters
-
string | $endpoint | The endpoint to be contacted |
array | $data | Any data to pass to the endpoint |
string | $resultnode | The name of the node that contains the data |
- Return values
-
object | Content decoded from the endpoint |
◆ get_api_endpoint()
repository_dropbox\dropbox::get_api_endpoint |
( |
| $endpoint | ) |
|
|
protected |
Return the constructed API endpoint URL.
- Parameters
-
string | $endpoint | The endpoint to be contacted |
- Return values
-
◆ get_content_endpoint()
repository_dropbox\dropbox::get_content_endpoint |
( |
| $endpoint | ) |
|
|
protected |
Return the constructed content endpoint URL.
- Parameters
-
string | $endpoint | The endpoint to be contacted |
- Return values
-
◆ get_endpoint_for_continue()
repository_dropbox\dropbox::get_endpoint_for_continue |
( |
string | $endpoint | ) |
|
|
protected |
Get the continue endpoint for the provided endpoint.
- Parameters
-
string | $endpoint | The original endpoint |
- Return values
-
string#$endpoint | The generated/mapped continue link |
◆ get_file_share_info()
repository_dropbox\dropbox::get_file_share_info |
( |
| $id | ) |
|
Fetch a valid public share link for the specified file.
- Parameters
-
string | $id | The file path or file id of the file to fetch information for. |
- Return values
-
object | An object containing the id, path, size, and URL of the entry |
◆ get_listing()
repository_dropbox\dropbox::get_listing |
( |
| $path = '' | ) |
|
Get file listing from dropbox.
- Parameters
-
string | $path | The path to query |
- Return values
-
object | The returned directory listing, or null on failure |
◆ get_login_scopes()
repository_dropbox\dropbox::get_login_scopes |
( |
| ) |
|
|
protected |
Override - Return an empty string to override parent function.
Dropbox does not require scopes to be provided and can function without them. Additional information MDL-70268
- Return values
-
◆ get_thumbnail()
repository_dropbox\dropbox::get_thumbnail |
( |
| $path | ) |
|
Retrieves the thumbnail for the content, as supplied by dropbox.
- Parameters
-
string | $path | The path to fetch a thumbnail for |
- Return values
-
string | Thumbnail image content |
◆ has_additional_results()
repository_dropbox\dropbox::has_additional_results |
( |
| $result | ) |
|
Whether the supplied result is paginated and not the final page.
- Parameters
-
object | $result | The result of an operation |
- Return values
-
◆ logout()
repository_dropbox\dropbox::logout |
( |
| ) |
|
Revoke the current access token.
- Return values
-
◆ normalize_file_share_info()
repository_dropbox\dropbox::normalize_file_share_info |
( |
| $entry | ) |
|
|
protected |
Normalize the file share info.
- Parameters
-
object | $entry | Information retrieved from share endpoints |
- Return values
-
object | Normalized entry information to store as repository information |
◆ search()
repository_dropbox\dropbox::search |
( |
| $query = '' | ) |
|
Get file search results from dropbox.
- Parameters
-
string | $query | The search query |
- Return values
-
object | The returned directory listing, or null on failure |
◆ supports_thumbnail()
repository_dropbox\dropbox::supports_thumbnail |
( |
| $entry | ) |
|
◆ token_url()
repository_dropbox\dropbox::token_url |
( |
| ) |
|
|
protected |
Returns the token url for OAuth 2.0 request.
- Return values
-
The documentation for this class was generated from the following file:
- repository/dropbox/classes/dropbox.php