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

Link to this section Summary

Functions

Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy.

This method requires authentication with "write" permission.

Get the geo data (latitude and longitude and the accuracy level) for a photo.

Get permissions for who may view geo data for a photo.

Return a list of photos for the calling user at a specific latitude, longitude and accuracy

Removes the geo data associated with a photo.

Indicate the state of a photo's geotagginess beyond latitude and longitude.

Note : photos passed to this method must already be geotagged (using the <q>flickr.photos.geo.setLocation</q> method).

Sets the geo data (latitude and longitude and, optionally, the accuracy level) for a photo.

Set the permission for who may view the geo data associated with a photo.

Link to this section Types

Link to this section Functions

Link to this function

batch_correct_location(lat, lon, accuracy, opts \\ [])

View Source

Specs

batch_correct_location(arg(), arg(), arg(), opts()) :: operation()

Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy.

Batch corrections are processed in a delayed queue so it may take a few minutes before the changes are reflected in a user's photos.

This method requires authentication with "write" permission.

Arguments

  • lat - The latitude of the photos to be update whose valid range is -90 to 90. Anything more than 6 decimal places will be truncated.

  • lon - The longitude of the photos to be updated whose valid range is -180 to 180. Anything more than 6 decimal places will be truncated.

  • accuracy - Recorded accuracy level of the photos to be updated. World level is 1, Country is ~3, Region ~6, City ~11, Street ~16. Current range is 1-16. Defaults to 16 if not specified.

Options

  • place_id - A Flickr Places ID. (While optional, you must pass either a valid Places ID or a WOE ID.)

  • woe_id - A Where On Earth (WOE) ID. (While optional, you must pass either a valid Places ID or a WOE ID.)

Link to this function

correct_location(photo_id, foursquare_id, opts \\ [])

View Source

Specs

correct_location(arg(), arg(), opts()) :: operation()

This method requires authentication with "write" permission.

Arguments

  • photo_id - The ID of the photo whose WOE location is being corrected.

  • foursquare_id - The venue ID for a Foursquare location. (If not passed in with correction, any existing foursquare venue will be removed).

Options

  • place_id - A Flickr Places ID. (While optional, you must pass either a valid Places ID or a WOE ID.)

  • woe_id - A Where On Earth (WOE) ID. (While optional, you must pass either a valid Places ID or a WOE ID.)

Link to this function

get_location(photo_id, opts \\ [])

View Source

Specs

get_location(arg(), opts()) :: operation()

Get the geo data (latitude and longitude and the accuracy level) for a photo.

This method does not require authentication.

Arguments

  • photo_id - The id of the photo you want to retrieve location data for.

Options

  • extras - Extra flags.

Example response

%{
  "photo" => %{
    "id" => "123",
    "location" => %{
      "accuracy" => "6",
      "latitude" => "-17.685895",
      "longitude" => "-63.36914"
    }
  },
  "stat" => "ok"
}
Link to this function

get_perms(photo_id, opts \\ [])

View Source

Specs

get_perms(arg(), opts()) :: operation()

Get permissions for who may view geo data for a photo.

This method requires authentication with "read" permission.

Arguments

  • photo_id - The id of the photo to get permissions for.

Example response

%{
  "perms" => %{
    "id" => "10592",
    "iscontact" => "0",
    "isfamily" => "1",
    "isfriend" => "0",
    "ispublic" => "0"
  },
  "stat" => "ok"
}
Link to this function

photos_for_location(lat, lon, opts \\ [])

View Source

Specs

photos_for_location(arg(), arg(), opts()) :: operation()

Return a list of photos for the calling user at a specific latitude, longitude and accuracy

This method requires authentication with "read" permission.

Arguments

  • lat - The latitude whose valid range is -90 to 90. Anything more than 6 decimal places will be truncated.

  • lon - The longitude whose valid range is -180 to 180. Anything more than 6 decimal places will be truncated.

Options

  • accuracy - Recorded accuracy level of the location information. World level is 1, Country is ~3, Region ~6, City ~11, Street ~16. Current range is 1-16. Defaults to 16 if not specified.

  • 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

remove_location(photo_id, opts \\ [])

View Source

Specs

remove_location(arg(), opts()) :: operation()

Removes the geo data associated with a photo.

This method requires authentication with "write" permission.

Arguments

  • photo_id - The id of the photo you want to remove location data from.
Link to this function

set_context(photo_id, context, opts \\ [])

View Source

Specs

set_context(arg(), arg(), opts()) :: operation()

Indicate the state of a photo's geotagginess beyond latitude and longitude.

Note : photos passed to this method must already be geotagged (using the <q>flickr.photos.geo.setLocation</q> method).

This method requires authentication with "write" permission.

Arguments

  • photo_id - The id of the photo to set context data for.

  • context - Context is a numeric value representing the photo's geotagginess beyond latitude and longitude. For example, you may wish to indicate that a photo was taken "indoors" or "outdoors". <br /><br /> The current list of context IDs is :<br /><br/> <ul> <li><strong>0</strong>, not defined.</li> <li><strong>1</strong>, indoors.</li> <li><strong>2</strong>, outdoors.</li> </ul>

Link to this function

set_location(photo_id, lat, lon, opts \\ [])

View Source

Specs

set_location(arg(), arg(), arg(), opts()) :: operation()

Sets the geo data (latitude and longitude and, optionally, the accuracy level) for a photo.

Before users may assign location data to a photo they must define who, by default, may view that information. Users can edit this preference at <a href="http://www.flickr.com/account/geo/privacy/">http://www.flickr.com/account/geo/privacy/</a>. If a user has not set this preference, the API method will return an error.

This method requires authentication with "write" permission.

Arguments

  • photo_id - The id of the photo to set location data for.

  • lat - The latitude whose valid range is -90 to 90. Anything more than 6 decimal places will be truncated.

  • lon - The longitude whose valid range is -180 to 180. Anything more than 6 decimal places will be truncated.

Options

  • accuracy - Recorded accuracy level of the location information. World level is 1, Country is ~3, Region ~6, City ~11, Street ~16. Current range is 1-16. Defaults to 16 if not specified.

  • context - Context is a numeric value representing the photo's geotagginess beyond latitude and longitude. For example, you may wish to indicate that a photo was taken "indoors" or "outdoors". <br /><br /> The current list of context IDs is :<br /><br/> <ul> <li><strong>0</strong>, not defined.</li> <li><strong>1</strong>, indoors.</li> <li><strong>2</strong>, outdoors.</li> </ul><br /> The default context for geotagged photos is 0, or "not defined"

Link to this function

set_perms(is_public, is_contact, is_friend, is_family, photo_id, opts \\ [])

View Source

Specs

set_perms(arg(), arg(), arg(), arg(), arg(), opts()) :: operation()

Set the permission for who may view the geo data associated with a photo.

This method requires authentication with "write" permission.

Arguments

  • is_public - 1 to set viewing permissions for the photo's location data to public, 0 to set it to private.

  • is_contact - 1 to set viewing permissions for the photo's location data to contacts, 0 to set it to private.

  • is_friend - 1 to set viewing permissions for the photo's location data to friends, 0 to set it to private.

  • is_family - 1 to set viewing permissions for the photo's location data to family, 0 to set it to private.

  • photo_id - The id of the photo to get permissions for.