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

Link to this section Summary

Functions

Return a user's NSID, given their email address

Return a user's NSID, given their username.

Returns the list of groups a user is a member of.

Get information about a user.

Returns the photo and video limits that apply to the calling user account.

Return photos from the given user's photostream. Only photos visible to the calling user will be returned. This method must be authenticated; to return public photos for a user, use <a href="https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html">flickr.people.getPublicPhotos</a>.

Returns a list of photos containing a particular Flickr member.

Returns the list of public groups a user is a member of.

Get a list of public photos for the given user.

Returns information for the calling user related to photo uploads.

Link to this section Types

Link to this section Functions

Link to this function

find_by_email(find_email, opts \\ [])

View Source

Specs

find_by_email(arg(), opts()) :: operation()

Return a user's NSID, given their email address

This method does not require authentication.

Arguments

  • find_email - The email address of the user to find (may be primary or secondary).

Example response

%{
  "stat" => "ok",
  "user" => %{
    "nsid" => "12037949632@N01",
    "username" => %{"_content" => "Stewart"}
  }
}
Link to this function

find_by_username(username, opts \\ [])

View Source

Specs

find_by_username(arg(), opts()) :: operation()

Return a user's NSID, given their username.

This method does not require authentication.

Arguments

  • username - The username of the user to lookup.

Example response

%{
  "stat" => "ok",
  "user" => %{
    "nsid" => "12037949632@N01",
    "username" => %{"_content" => "Stewart"}
  }
}
Link to this function

get_groups(user_id, opts \\ [])

View Source

Specs

get_groups(arg(), opts()) :: operation()

Returns the list of groups a user is a member of.

This method requires authentication with "read" permission.

Arguments

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

Options

  • extras - A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>privacy</code>, <code>throttle</code>, <code>restrictions</code>

Example response

%{
  "groups" => %{
    "group" => [
      %{
        "admin" => "0",
        "eighteenplus" => "0",
        "iconfarm" => "1",
        "iconserver" => "1",
        "invitation_only" => "0",
        "members" => "11935",
        "name" => "Cream of the Crop - Please read the rules",
        "nsid" => "17274427@N00",
        "pool_count" => "12522"
      },
      %{
        "admin" => "0",
        "eighteenplus" => "0",
        "iconfarm" => "1",
        "iconserver" => "1",
        "invitation_only" => "0",
        "members" => "11776",
        "name" => "Apple",
        "nsid" => "20083316@N00",
        "pool_count" => "62438"
      },
      %{
        "admin" => "0",
        "eighteenplus" => "0",
        "iconfarm" => "1",
        "iconserver" => "1",
        "invitation_only" => "0",
        "members" => "168055",
        "name" => "FlickrCentral",
        "nsid" => "34427469792@N01",
        "pool_count" => "5280930"
      },
      %{
        "admin" => "0",
        "eighteenplus" => "0",
        "iconfarm" => "1",
        "iconserver" => "1",
        "invitation_only" => "0",
        "members" => "17318",
        "name" => "Typography and Lettering",
        "nsid" => "37718678610@N01",
        "pool_count" => "130169"
      }
    ]
  },
  "stat" => "ok"
}
Link to this function

get_info(user_id, opts \\ [])

View Source

Specs

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

Get information about a user.

This method does not require authentication.

Arguments

  • user_id - The NSID of the user to fetch information about.

Example response

%{
  "person" => %{
    "iconfarm" => "1",
    "iconserver" => "122",
    "ispro" => "0",
    "location" => %{"_content" => "Vancouver, Canada"},
    "mbox_sha1sum" => %{
      "_content" => "eea6cd28e3d0003ab51b0058a684d94980b727ac"
    },
    "nsid" => "12037949754@N01",
    "photos" => %{
      "count" => %{"_content" => "449"},
      "firstdate" => %{"_content" => "1071510391"},
      "firstdatetaken" => %{"_content" => "1900-09-02 09:11:24"}
    },
    "photosurl" => %{"_content" => "http://www.flickr.com/photos/bees/"},
    "profileurl" => %{"_content" => "http://www.flickr.com/people/bees/"},
    "realname" => %{"_content" => "Cal Henderson"},
    "username" => %{"_content" => "bees"}
  },
  "stat" => "ok"
}

Specs

get_limits(opts()) :: operation()

Returns the photo and video limits that apply to the calling user account.

This method requires authentication with "read" permission.

Example response

%{
  "person" => %{
    "nsid" => "30135021@N05",
    "photos" => %{"maxdisplaypx" => "1024", "maxupload" => "15728640"},
    "videos" => %{"maxduration" => "90", "maxupload" => "157286400"}
  },
  "stat" => "ok"
}
Link to this function

get_photos(user_id, opts \\ [])

View Source

Specs

get_photos(arg(), opts()) :: operation()

Return photos from the given user's photostream. Only photos visible to the calling user will be returned. This method must be authenticated; to return public photos for a user, use <a href="https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html">flickr.people.getPublicPhotos</a>.

This method does not require authentication.

Arguments

  • user_id - The NSID of the user who's photos to return. A value of "me" will return the calling user's photos.

Options

  • safe_search - Safe search setting: <ul> <li>1 for safe.</li> <li>2 for moderate.</li> <li>3 for restricted.</li> </ul> (Please note: Un-authed calls can only see Safe content.)

  • min_upload_date - Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date should be in the form of a unix timestamp.

  • max_upload_date - Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date should be in the form of a unix timestamp.

  • min_taken_date - Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date should be in the form of a mysql datetime.

  • max_taken_date - Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date should be in the form of a mysql datetime.

  • content_type - Content Type setting: <ul> <li>1 for photos only.</li> <li>2 for screenshots only.</li> <li>3 for 'other' only.</li> <li>4 for photos and screenshots.</li> <li>5 for screenshots and 'other'.</li> <li>6 for photos and 'other'.</li> <li>7 for photos, screenshots, and 'other' (all).</li> </ul>

  • privacy_filter - Return photos only matching a certain privacy level. This only applies when making an authenticated call to view photos you own. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>

  • extras - A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>

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

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

Link to this function

get_photos_of(user_id, opts \\ [])

View Source

Specs

get_photos_of(arg(), opts()) :: operation()

Returns a list of photos containing a particular Flickr member.

This method does not require authentication.

Arguments

  • user_id - The NSID of the user you want to find photos of. A value of "me" will search against photos of the calling user, for authenticated calls.

Options

  • owner_id - An NSID of a Flickr member. This will restrict the list of photos to those taken by that member.

  • extras - A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>date_person_added</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>

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

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

Example response

%{
  "photos" => %{
    "has_next_page" => "1",
    "page" => "2",
    "perpage" => "10",
    "photo" => [
      %{
        "id" => "2636",
        "isfamily" => "0",
        "isfriend" => "0",
        "ispublic" => "1",
        "owner" => "47058503995@N01",
        "secret" => "a123456",
        "server" => "2",
        "title" => "test_04"
      },
      %{
        "id" => "2635",
        "isfamily" => "1",
        "isfriend" => "1",
        "ispublic" => "0",
        "owner" => "47058503995@N01",
        "secret" => "b123456",
        "server" => "2",
        "title" => "test_03"
      },
      %{
        "id" => "2633",
        "isfamily" => "0",
        "isfriend" => "0",
        "ispublic" => "1",
        "owner" => "47058503995@N01",
        "secret" => "c123456",
        "server" => "2",
        "title" => "test_01"
      },
      %{
        "id" => "2610",
        "isfamily" => "0",
        "isfriend" => "0",
        "ispublic" => "1",
        "owner" => "12037949754@N01",
        "secret" => "d123456",
        "server" => "2",
        "title" => "00_tall"
      }
    ]
  },
  "stat" => "ok"
}
Link to this function

get_public_groups(user_id, opts \\ [])

View Source

Specs

get_public_groups(arg(), opts()) :: operation()

Returns the list of public groups a user is a member of.

This method does not require authentication.

Arguments

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

Options

Example response

%{
  "groups" => %{
    "group" => [
      %{
        "admin" => "0",
        "eighteenplus" => "0",
        "invitation_only" => "0",
        "name" => "FlickrCentral",
        "nsid" => "34427469792@N01"
      },
      %{
        "admin" => "1",
        "eighteenplus" => "0",
        "invitation_only" => "1",
        "name" => "Cal's Test Group",
        "nsid" => "37114057624@N01"
      },
      %{
        "admin" => "1",
        "eighteenplus" => "1",
        "invitation_only" => "0",
        "name" => "18+ Group",
        "nsid" => "34955637532@N01"
      }
    ]
  },
  "stat" => "ok"
}
Link to this function

get_public_photos(user_id, opts \\ [])

View Source

Specs

get_public_photos(arg(), opts()) :: operation()

Get a list of public photos for the given user.

This method does not require authentication.

Arguments

  • user_id - The NSID of the user who's photos to return.

Options

  • safe_search - Safe search setting: <ul> <li>1 for safe.</li> <li>2 for moderate.</li> <li>3 for restricted.</li> </ul> (Please note: Un-authed calls can only see Safe content.)

  • extras - A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>

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

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

Link to this function

get_upload_status(opts \\ [])

View Source

Specs

get_upload_status(opts()) :: operation()

Returns information for the calling user related to photo uploads.

This method requires authentication with "read" permission.

Example response

%{
  "stat" => "ok",
  "user" => %{
    "bandwidth" => %{
      "maxbytes" => "2147483648",
      "maxkb" => "2097152",
      "remainingbytes" => "2147099924",
      "remainingkb" => "2096777",
      "usedbytes" => "383724",
      "usedkb" => "374"
    },
    "filesize" => %{"maxbytes" => "10485760", "maxkb" => "10240"},
    "id" => "12037949754@N01",
    "ispro" => "1",
    "sets" => %{"created" => "27", "remaining" => "lots"},
    "username" => %{"_content" => "Bees"},
    "videos" => %{"remaining" => "lots", "uploaded" => "5"}
  }
}