Returns photos from the given user's photo stream. Only photos visible to the calling user will be returned.
getPhotos(user_id = NULL, img_size = "s", extras = NULL, api_key = NULL, ...)get_photos(user_id = NULL, img_size = "s", extras = NULL, api_key = NULL, ...)
getFavePhotos(
user_id = NULL,
img_size = "s",
extras = NULL,
fave_date = NULL,
public = TRUE,
api_key = NULL,
page = NULL,
per_page = 100,
...
)
get_fave_photos(
user_id = NULL,
img_size = "s",
extras = NULL,
fave_date = NULL,
public = TRUE,
api_key = NULL,
page = NULL,
per_page = 100,
...
)
This function returns a data.frame
including columns:
id
owner
secret
server
farm
title
ispublic
isfriend
isfamily
The NSID of the user whose photos to return. A value of "me" return the calling user's photos.
A character string with the abbreviation for one or more image sizes ("sq", "t", "s", "q", "m", "n", "z", "c", "l", or "o"). If a single img_size is provided the url, width, and height columns are renamed (e.g. img_url instead of url_sq) and an img_asp column is added to the results; defaults to `NULL`.
A vector of extra information to fetch for each returned record. Currently supported fields are: c("description", "license", "date_upload", "date_taken", "owner_name", "icon_server", "original_format", "last_update", "geo", "tags", "machine_tags", "o_dims", "views", "media", "path_alias", "url_sq", "url_t", "url_s", "url_q", "url_m", "url_n", "url_z", "url_c", "url_l", "url_o")
Flickr API key. If api_key is `NULL`, the function uses [getFlickrAPIKey()] to use the environment variable "FLICKR_API_KEY" as the key.
Additional parameters passed to [getPhotoSearch]
Length 1 or 2 vector with UNIX formatted date (may include minimum and maximum favorite date).
If `TRUE`, get public favorites (no authentication needed). If `FALSE`, get all favorite (requires authentication for access).
Number specifying which search results page to return. Default is page 1 of results returned.
Number specifying how many results per page to return. Default 100 results per page. Maximum of 250 if `bbox` provided or 500 otherwise.
For `getFavePhotos` the provided user_id may need to be the NSID code or the user name rather than the typical user id due to some inconsistencies in the Flickr API.
if (FALSE) {
getPhotos(api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", user_id = "141696738@N08")
}
Run the code above in your browser using DataLab