Flickrex.Flickr.Collections (flickrex v0.8.1) View Source

Link to this section Summary

Functions

Returns information for a single collection. Currently can only be called by the collection owner, this may change.

Returns a tree (or sub tree) of collections belonging to a given user.

Link to this section Types

Link to this section Functions

Link to this function

get_info(collection_id, opts \\ [])

View Source

Specs

get_info(arg(), opts()) :: operation()

Returns information for a single collection. Currently can only be called by the collection owner, this may change.

            Note that the response values of `iconlarge` and `iconsmall` are defunct and will now return empty mosaic grids. For more information on how to 
            use the new style of collection mosaics, go <a href="https://www.flickr.com/services/api/misc.collections.html">here</a>.

This method requires authentication with "read" permission.

Arguments

  • collection_id - The ID of the collection to fetch information for.

Example response

%{
  "collection" => %{
    "child_count" => "6",
    "datecreate" => "1173812218",
    "description" => %{"_content" => "Photos!"},
    "iconlarge" => "https://combo.staticflickr.com/pw/images/collection_default_l.gif",
    "iconphotos" => %{
      "_content" => "....\n",
      "photo" => [
        %{
          "farm" => "1",
          "id" => "14",
          "isfamily" => "0",
          "isfriend" => "0",
          "ispublic" => "1",
          "owner" => "12@N01",
          "secret" => "b57ba5c",
          "server" => "51",
          "title" => "in full cap and gown"
        },
        %{
          "farm" => "1",
          "id" => "15",
          "isfamily" => "0",
          "isfriend" => "1",
          "ispublic" => "0",
          "owner" => "12@N01",
          "secret" => "ba1c2a8",
          "server" => "58",
          "title" => "Just beyond the door"
        },
        %{
          "farm" => "1",
          "id" => "17",
          "isfamily" => "0",
          "isfriend" => "0",
          "ispublic" => "1",
          "owner" => "12@N01",
          "secret" => "0001969",
          "server" => "73",
          "title" => "IMG_3787.JPG"
        }
      ]
    },
    "iconsmall" => "https://combo.staticflickr.com/pw/images/collection_default_s.gif",
    "id" => "12-72157594586579649",
    "secret" => "36",
    "server" => "187",
    "title" => %{"_content" => "All My Photos"}
  },
  "stat" => "ok"
}

Specs

get_tree(opts()) :: operation()

Returns a tree (or sub tree) of collections belonging to a given user.

            Note that the response values of `iconlarge` and `iconsmall` are defunct and will now return empty mosaic grids. For more information on how to 
            use the new style of collection mosaics, go <a href="https://www.flickr.com/services/api/misc.collections.html">here</a>.

This method does not require authentication.

Options

  • collection_id - The ID of the collection to fetch a tree for, or zero to fetch the root collection. Defaults to zero.

  • user_id - The ID of the account to fetch the collection tree for. Defaults to the calling user.

Example response

%{
  "collections" => %{
    "collection" => %{
      "description" => "a collection",
      "iconlarge" => "https://combo.staticflickr.com/pw/images/collection_default_l.gif",
      "iconsmall" => "https://combo.staticflickr.com/pw/images/collection_default_s.gif",
      "id" => "12-72157594586579649",
      "set" => [
        %{
          "description" => "a set",
          "id" => "92157594171298291",
          "title" => "kitesurfing"
        },
        %{
          "description" => "some favorites.",
          "id" => "72157594247596158",
          "title" => "faves"
        }
      ],
      "title" => "All My Photos"
    }
  },
  "stat" => "ok"
}