Property talk:P12120

From Wikidata
Jump to navigation Jump to search

Documentation

‎Flickr photo ID
persistent identifier for images on Flickr
RepresentsFlickr (Q103204)
Has qualitynumeric identifier (Q93868746)
Data typeExternal identifier
Allowed values^\d+$
Commons example
Sourcehttps://www.flickr.com
Formatter URLhttps://www.flickr.com/photo.gne?id=$1
See alsoFlickr user ID (P3267), image (P18)
Lists
Proposal discussionProposal discussion
Current uses
Total13
Main statement17.7% of uses
Qualifier430.8% of uses
Reference861.5% of uses
[create Create a translatable help page (preferably in English) for this property to be included here]
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P12120#Single value, SPARQL
Format “^\d+$: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P12120#Format, SPARQL
Allowed entity types are Wikibase MediaInfo (Q59712033): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P12120#Entity types

Going from photo data to the Flickr API[edit]

One useful aspect of this property is that a photo ID can be passed directly to methods in the Flickr API; for example flickr.photos.getInfo – you don’t need to extract the photo ID from the different forms of Flickr URL that are floating around.

This is what that looks like (with a Flickr API key):

curl 'https://api.flickr.com/services/rest/?method=flickr.photos.getInfo&photo_id=[PHOTO_ID]&api_key=[API_KEY]'

Alexwlchan (talk) 07:40, 26 October 2023 (UTC)[reply]