Magpie.DeletedMetadata (Magpie v0.5.1)

Copy Markdown View Source

A deleted file or folder, as returned by /files/list_folder with "include_deleted" => true and by /files/get_metadata with include_deleted.

Built by Magpie.Metadata.decode/1. Dropbox only reports the path of a deleted entry — there is no id, size or timestamp. is_restorable is filled in when the listing asked for "include_restorable_info" => true, and is nil otherwise.

client
|> Magpie.Files.ListFolder.stream("/Inbox", %{"include_deleted" => true})
|> Enum.filter(&match?(%Magpie.DeletedMetadata{}, &1))

Summary

Functions

Builds the struct from a decoded DeletedMetadata JSON object.

Types

t()

@type t() :: %Magpie.DeletedMetadata{
  is_restorable: boolean() | nil,
  name: String.t(),
  parent_shared_folder_id: String.t() | nil,
  path_display: String.t() | nil,
  path_lower: String.t() | nil,
  preview_url: String.t() | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds the struct from a decoded DeletedMetadata JSON object.

Prefer Magpie.Metadata.decode/1, which also handles files and folders by looking at the ".tag".