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

Link to this section Summary

Functions

Get a list of contacts for the calling user.

Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.

Get the contact list for a user.

Get suggestions for tagging people in photos based on the calling user's contacts.

Link to this section Types

Link to this section Functions

Specs

get_list(opts()) :: operation()

Get a list of contacts for the calling user.

This method requires authentication with "read" permission.

Options

  • filter - An optional filter of the results. The following values are valid:<br /> &nbsp; <dl> <dt><b><code>friends</code></b></dt> <dl>Only contacts who are friends (and not family)</dl> <dt><b><code>family</code></b></dt> <dl>Only contacts who are family (and not friends)</dl> <dt><b><code>both</code></b></dt> <dl>Only contacts who are both friends and family</dl> <dt><b><code>neither</code></b></dt> <dl>Only contacts who are neither friends nor family</dl> </dl>

  • page - The page of results to return. If this argument is omitted, it defaults to 1.

  • per_page - Number of photos to return per page. If this argument is omitted, it defaults to 1000. The maximum allowed value is 1000.

  • sort - The order in which to sort the returned contacts. Defaults to name. The possible values are: name and time.

Example response

%{
  "contacts" => %{
    "contact" => [
      %{
        "family" => "0",
        "friend" => "1",
        "iconserver" => "1",
        "ignored" => "1",
        "nsid" => "12037949629@N01",
        "realname" => "Eric Costello",
        "username" => "Eric"
      },
      %{
        "family" => "0",
        "friend" => "0",
        "iconserver" => "1",
        "ignored" => "0",
        "nsid" => "12037949631@N01",
        "realname" => "Ben Cerveny",
        "username" => "neb"
      },
      %{
        "family" => "1",
        "friend" => "1",
        "iconserver" => "1",
        "ignored" => "0",
        "nsid" => "41578656547@N01",
        "realname" => "Cal Henderson",
        "username" => "cal_abc"
      }
    ],
    "page" => "1",
    "pages" => "1",
    "perpage" => "1000",
    "total" => "3"
  },
  "stat" => "ok"
}
Link to this function

get_list_recently_uploaded(opts \\ [])

View Source

Specs

get_list_recently_uploaded(opts()) :: operation()

Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.

This method is still considered experimental. We don't plan for it to change or to go away but so long as this notice is present you should write your code accordingly.

This method requires authentication with "read" permission.

Options

  • date_lastupload - Limits the resultset to contacts that have uploaded photos since this date. The date should be in the form of a Unix timestamp. The default offset is (1) hour and the maximum (24) hours.

  • filter - Limit the result set to all contacts or only those who are friends or family. Valid options are: <ul> <li><strong>ff</strong> friends and family</li> <li><strong>all</strong> all your contacts</li> </ul> Default value is "all".

Link to this function

get_public_list(user_id, opts \\ [])

View Source

Specs

get_public_list(arg(), opts()) :: operation()

Get the contact list for a user.

This method does not require authentication.

Arguments

  • user_id - The NSID of the user to fetch the contact list for.

Options

  • page - The page of results to return. If this argument is omitted, it defaults to 1.

  • per_page - Number of photos to return per page. If this argument is omitted, it defaults to 1000. The maximum allowed value is 1000.

Example response

%{
  "contacts" => %{
    "contact" => [
      %{
        "iconserver" => "1",
        "ignored" => "1",
        "nsid" => "12037949629@N01",
        "username" => "Eric"
      },
      %{
        "iconserver" => "1",
        "ignored" => "0",
        "nsid" => "12037949631@N01",
        "username" => "neb"
      },
      %{
        "iconserver" => "1",
        "ignored" => "0",
        "nsid" => "41578656547@N01",
        "username" => "cal_abc"
      }
    ],
    "page" => "1",
    "pages" => "1",
    "perpage" => "1000",
    "total" => "3"
  },
  "stat" => "ok"
}
Link to this function

get_tagging_suggestions(opts \\ [])

View Source

Specs

get_tagging_suggestions(opts()) :: operation()

Get suggestions for tagging people in photos based on the calling user's contacts.

This method requires authentication with "read" permission.

Options

  • per_page - Number of contacts to return per page. If this argument is omitted, all contacts will be returned.

  • page - The page of results to return. If this argument is omitted, it defaults to 1.

Example response

%{
  "contacts" => %{
    "contact" => %{
      "family" => "0",
      "friend" => "0",
      "iconfarm" => "1",
      "iconserver" => "1",
      "nsid" => "30135021@N05",
      "path_alias" => "",
      "realname" => "",
      "username" => "Hugo Haas"
    },
    "page" => "1",
    "pages" => "1",
    "perpage" => "1000",
    "total" => "1"
  },
  "stat" => "ok"
}