Magpie.FileRequests (Magpie v0.1.0)

Copy Markdown View Source

Endpoints for Dropbox file requests (/file_requests/*).

Summary

Functions

Returns the total number of file requests owned by this user.

Creates a file request for this user.

Delete a batch of closed file requests by id.

Delete all closed file requests owned by this user.

Returns the specified file request.

Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.

Fetches the next page of results from list_v2/2.

Returns a paginated list of file requests owned by this user.

Returns a lazy Stream over all file requests of the current user, fetching pages through list_v2/2 + list_continue/2 on demand. Raises Magpie.Error if a page request fails.

Functions

count(client)

Returns the total number of file requests owned by this user.

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-count

create(client, title, destination, deadline, open \\ true)

Creates a file request for this user.

Example

deadline = %{ "deadline" => "2020-10-12T17:00:00Z" } Magpie.FileRequests.create client , "cool", "/Temp", deadline

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create

delete(client, ids)

Delete a batch of closed file requests by id.

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-delete

delete_all_closed(client)

Delete all closed file requests owned by this user.

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-delete_all_closed

get(client, id)

Returns the specified file request.

Example

Magpie.FileRequests.get client , ""

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-get

list(client)

Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.

Example

Magpie.FileRequests.list client

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-list

list_continue(client, cursor)

Fetches the next page of results from list_v2/2.

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-list-continue

list_v2(client, limit \\ 1000)

Returns a paginated list of file requests owned by this user.

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-list_v2

stream(client, limit \\ 1000)

Returns a lazy Stream over all file requests of the current user, fetching pages through list_v2/2 + list_continue/2 on demand. Raises Magpie.Error if a page request fails.

Example

client |> Magpie.FileRequests.stream() |> Enum.count()

update(client, id, title, destination, deadline, open \\ true)

Update a file request.

Example

deadline = %{ "deadline" => "2020-10-12T17:00:00Z" } Magpie.FileRequests.create client, "", "cool", "/Temp", deadline

More info at: https://www.dropbox.com/developers/documentation/http/documentation#file_requests-list