DropboxSDK.Authorization
— Typestruct Authorization
access_token::String
end
Contains an access token. Almost all Dropbox API functions require such a token. Access tokens are like passwords and should be treated with the same care.
DropboxSDK.UploadSpec
— Typestruct UploadSpec
destination::String
content_channel::Union{AbstractChannel{Vector{UInt8}},
AbstractVector{Vector{UInt8}}}
end
Specify both path and content for a file that is to be uploaded. The content needs to be passed in as chunks via a channel.
DropboxSDK.calc_content_hash
— Methodcalc_content_hash(data::Vector{UInt8})::String
Calculate the content hash of a byte array with Dropbox's algorithm.
DropboxSDK.calc_content_hash
— Methodcalc_content_hash(
data_channel::Union{AbstractChannel{<: AbstractVector{UInt8}},
AbstractVector{<: AbstractVector{UInt8}}}
)::String
Calculate a content hash with Dropbox's algorithm from chunks of data. The data channel is used to pass in the data in chunks. The result is returned once the data channel is closed.
DropboxSDK.files_create_folder
— Methodfiles_create_folder(auth::Authorization,
path::String
)::FolderMetadata
Create a folder path
. Returns metadata for the created folder.
DropboxSDK.files_delete
— Methodfiles_delete(auth::Authorization,
path::String
)::Metadata
Delete a file or folder path
recursively. Returns metadata of the deleted object.
DropboxSDK.files_download
— Methodfiles_download(auth::Authorization,
path::String
)::Tuple{FileMetadata, Vector{UInt8}}
Download file path
. Returns both its metadata and content.
DropboxSDK.files_get_metadata
— Methodfiles_get_metadata(auth::Authorization,
path::String
)::Metadata
Get metadata for file or folder path
.
DropboxSDK.files_list_folder
— Methodfiles_list_folder(auth::Authorization,
path::String;
recursive::Bool = false
)::Vector{Metadata}
List the contents of folder path
.
DropboxSDK.files_upload
— Methodfiles_upload(auth::Authorization,
path::String,
content::Vector{UInt8}
)::FileMetadata
Upload the byte array content
to a file path
, returning its metadata. This function should only be used for small files (< 150 MByte), and if only a few files are uploaded. Other files_upload
functions are more efficient for large files and/or if there are many files to be uploaded.
DropboxSDK.files_upload
— Methodfiles_upload(auth::Authorization,
path::String,
content_channel::Channel{Vector{UInt8}}
)::FileMetadata
Upload a file path
. The upload channel is used to pass in the data in chunks, where each chunk should be no larger than 150 MByte. This channel needs to be closed after passing in all chunks to finalize the upload. The return value is then the metadata of the uploaded file.
This function should only be used if only a few files are to be uploaded. Other files_upload
functions are more efficient if there are many files to be uploaded.
DropboxSDK.files_upload
— Methodfiles_upload(auth::Authorization,
upload_spec_channel::Union{AbstractChannel{UploadSpec},
AbstractVector{UploadSpec}}
)::Vector{FileMetadata}
Uploading several files simultaneously in an efficient manner. The upload spec channel is used to describe the uploaded files. This channel needs to be closed after passing in all upload specs to finalize the uploads. The return value is then a vector of all metadata of the uploaded files.
This function is efficient if many files are uploaded.
DropboxSDK.get_authorization
— Methodget_authorization()::Authorization
Get an authorization token. This function first looks for an environment values DROPBOXSDK_ACCESS_TOKEN
, and then for a file secrets.http
in the current directory. If neither exists, this is an error.
DropboxSDK.start_task
— Functionstart_task(fun::Function)::Task
Create a new task from fun
and schedule the task, similar to the @task
macro. Also register a hook that shows exception and backtrace if the task fails.
DropboxSDK.users_get_current_account
— Methodusers_get_current_account(auth::Authorization)::FullAccount
Get information about the current account, i.e. the account associated with the account token in the authorization auth
.
DropboxSDK.users_get_space_usage
— Methodusers_get_space_usage(auth::Authorization)::SpaceUsage
Get the space usage for the current account.
DropboxSDK.geteuid
— Methodgeteuid()::Int
Call the Unix geteuid
function.
DropboxSDK.mapget
— Functionmapget(fun::Function, dict::Dict, key, def=nothing)
Get an entry from a dictionary, and apply the function fun
to the result. If the key key
is missing from the dictionary, return the default value def
.
DropboxSDK.post_content_download
— Methodpost_content_download(auth::Authorization,
fun::String,
args::Union{Nothing, Dict} = nothing
)::Tuple{Dict, Vector{UInt8}}
Post a Content Download request to the Dropbox API.
DropboxSDK.post_content_upload
— Methodpost_content_upload(auth::Authorization,
fun::String,
args::Union{Nothing, Dict} = nothing
)::Dict
Post a Content Upload request to the Dropbox API.
DropboxSDK.post_rpc
— Functionpost_rpc(auth::Authorization,
fun::String,
args::Union{Nothing, Dict} = nothing
)::Dict
Post an RPC request to the Dropbox API.