Flickrex.Flickr.Photos.Licenses (flickrex v0.8.1) View Source

Link to this section Summary

Functions

Fetches a list of available photo licenses for Flickr.

Sets the license for a photo.

Link to this section Types

Link to this section Functions

Specs

get_info(opts()) :: operation()

Fetches a list of available photo licenses for Flickr.

This method does not require authentication.

Example response

%{
  "licenses" => %{
    "license" => [
      %{"id" => "0", "name" => "All Rights Reserved", "url" => ""},
      %{
        "id" => "1",
        "name" => "Attribution-NonCommercial-ShareAlike License",
        "url" => "https://creativecommons.org/licenses/by-nc-sa/2.0/"
      },
      %{
        "id" => "2",
        "name" => "Attribution-NonCommercial License",
        "url" => "https://creativecommons.org/licenses/by-nc/2.0/"
      },
      %{
        "id" => "3",
        "name" => "Attribution-NonCommercial-NoDerivs License",
        "url" => "https://creativecommons.org/licenses/by-nc-nd/2.0/"
      },
      %{
        "id" => "4",
        "name" => "Attribution License",
        "url" => "https://creativecommons.org/licenses/by/2.0/"
      },
      %{
        "id" => "5",
        "name" => "Attribution-ShareAlike License",
        "url" => "https://creativecommons.org/licenses/by-sa/2.0/"
      },
      %{
        "id" => "6",
        "name" => "Attribution-NoDerivs License",
        "url" => "https://creativecommons.org/licenses/by-nd/2.0/"
      },
      %{
        "id" => "7",
        "name" => "No known copyright restrictions",
        "url" => "https://www.flickr.com/commons/usage/"
      },
      %{
        "id" => "8",
        "name" => "United States Government Work",
        "url" => "http://www.usa.gov/copyright.shtml"
      },
      %{
        "id" => "9",
        "name" => "Public Domain Dedication (CC0)",
        "url" => "https://creativecommons.org/publicdomain/zero/1.0/"
      },
      %{
        "id" => "10",
        "name" => "Public Domain Mark",
        "url" => "https://creativecommons.org/publicdomain/mark/1.0/"
      }
    ]
  },
  "stat" => "ok"
}
Link to this function

set_license(photo_id, license_id, opts \\ [])

View Source

Specs

set_license(arg(), arg(), opts()) :: operation()

Sets the license for a photo.

This method requires authentication with "write" permission.

Arguments

  • photo_id - The photo to update the license for.

  • license_id - The license to apply, or 0 (zero) to remove the current license. Note : as of this writing the "no known copyright restrictions" license (7) is not a valid argument.