Deutsches LiveCode Wiki
Advertisement

List shared links of this user.

Syntax:

dropboxListSharedLinks ''pAccessToken'', [''pPath'', ''pDirectOnly'', ''pCursor'', ''pCallback'']

Parameters:

  • pAccessToken: An OAuth2 Access token to access the user's account
  • pPath: If no path is given, returns a list of all shared links for the current user. If a non-empty path is given, returns a list of all shared links that allow access

to the given path - direct links to the given path and links to parent folders of the given path.

  • pDirectOnly: Links to parent folders can be suppressed by setting direct_only to true.
  • pCursor: The cursor returned by your last call to list_shared_links. This field is optional.
  • pCallback: The handler to call when the request is complete. If empty the command will block until complete. Requires tsNet with LiveCode Indy License.

If the callback parameter is not empty the request will be asynchronus and when complete the callback will be sent to the object that accessed the API.

The callback will be sent with three parameters:

  • - The request ID which will be the value of the it variable after calling the command
  • - The HTTP response code
  • - The data returned which will be the same data as documented for the it variable in a synchronous request.

Output values:

  • The result: An error if the HTTP request failed
  • It: For asynchronous requests it will contain a request ID. This may be used with tsNet's tsNetGetStatus function. If the request is synchronous and successful the it

variable will be a UTF-8 encoded JSON string in the form:

{
"links": [
{
".tag": "file",
"url": "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0",
"name": "Prime_Numbers.txt",
"link_permissions": {
"can_revoke": false,
"resolved_visibility": {
".tag": "public"
},
"revoke_failure_reason": {
".tag": "owner_only"
}
},
"client_modified": "2015-05-12T15:50:38Z",
"server_modified": "2015-05-12T15:50:38Z",
"rev": "a1c10ce0dd78",
"size": 7212,
"id": "id:a4ayc_80_OEAAAAAAAAAXw",
"path_lower": "/homework/math/prime_numbers.txt",
"team_member_info": {
"team_info": {
"id": "dbtid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I",
"name": "Acme, Inc."
},
"display_name": "Roger Rabbit",
"member_id": "dbmid:abcd1234"
}
}
],
"has_more": true,
"cursor": "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
}

If an error occurred the JSON string will be in the following form:

{
"error_summary": string,
"error": {
".tag": string
}
}
Advertisement