Search the web
Sign In
New User? Sign Up
yws-flickr · YDN Flickr Developer Support Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
New API methods: flickr.machinetags (experimental)   Message List  
Reply | Forward Message #4545 of 5424 |
Hi all,

If you’re not already familiar with machine tags the easiest way to
think of them is being like a plain old tag but with a special syntax
that allows users to define additional structured data about that tag.

If you'd like to know more, the best place to start is the official
announcement we made about machine tags in the Flickr API group:

http://www.flickr.com/groups/api/discuss/72157594497877875

If you want to know even more, take a look at:

http://code.flickr.com/blog/2008/07/18/wildcard-machine-tag-urls/
http://code.flickr.com/blog/2008/08/28/machine-tags-lastfm-and-rocknroll/
http://blech.vox.com/library/post/flickr-exif-machine-tags.html

--

Okay! Now that everyone is feeling warm and fuzzy about machine tags:

We enabled (4) new experimental API methods for browsing the hierarchies
of machine tags on the site.

They are aggregate rollups of all the unique namespaces, predicates,
values and pairs for public photos with machine tags.

For example, lots of people have added "exif:" related machine tags to
their photos but there hasn't been a way to know what kind of EXIF data
has been added. exif:camera? exif:focus? exif:tunablaster?

Those are the sorts of things these methods are designed to help you
find. Sort of like wildcard URIs but for the API. Like this:

--

* flickr.machinetags.getNamespaces

This returns a list of all the unique namespaces, optionally bracketed
by a specific predicate. For example:

<namespaces predicate="airport" page="1" total="2" perpage="500" pages="1">
<namespace usage="1931" predicates="1">aero</namespace>
<namespace usage="3" predicates="1">geo</namespace>
</namespaces>

http://www.flickr.com/services/api/flickr.machinetags.getPredicates.html

* flickr.machinetags.getPredicates

Like "getNamespaces", returns a list of all the unique namespaces,
optionally bracketed by a specific namespace. For example:

<predicates namespace="aero" page="1" total="17" perpage="500" pages="1">
<predicate usage="1" namespaces="1">aiirport</predicate>
<predicate usage="1" namespaces="1">aiport</predicate>
<predicate usage="2568" namespaces="1">airline</predicate>
<predicate usage="1" namespaces="1">airlines</predicate>
<predicate usage="1" namespaces="1">airpor</predicate>
<predicate usage="1" namespaces="1">airporrt</predicate>
<predicate usage="1944" namespaces="1">airport</predicate>
<predicate usage="10" namespaces="1">icao</predicate>
<predicate usage="328" namespaces="1">ln</predicate>
<predicate usage="1972" namespaces="1">man</predicate>
<predicate usage="1926" namespaces="1">model</predicate>
<predicate usage="517" namespaces="1">msn</predicate>
<predicate usage="1" namespaces="1">seires</predicate>
<predicate usage="1894" namespaces="1">series</predicate>
<predicate usage="338" namespaces="1">special</predicate>
<predicate usage="1908" namespaces="1">tail</predicate>
<predicate usage="5" namespaces="1">type</predicate>
</predicates>

http://www.flickr.com/services/api/flickr.machinetags.getPredicates.html

* flickr.machinetags.getValues

At this point, the pattern should be pretty straightforward. All the
unique values for a specific namespace/predicate pair. For example:

<values namespace="aero" predicate="tail" page="1" total="1159"
perpage="500" pages="3">
<value usage="1">01-0041</value>
<value usage="1">164993</value>
<value usage="2">26000</value>
<value usage="1">4k-az01</value>
<value usage="1">4l-tgl</value>
<value usage="1">4r-ade</value>
<!-- and so on... -->
</values>

http://www.flickr.com/services/api/flickr.machinetags.getValues.html

* flickr.machinetags.getPairs

Finally, get pairs returns the list of unique namespace/predicate pairs
optionally filtered by namespace or predicate.

<-- please, not another blob of XML... -->

http://www.flickr.com/services/api/flickr.machinetags.getPairs.html

--

A couple things to note:

Certain namespace/predicate pairs have been special cased to return a
single value. As of this writing they are:

* geo:lat (and variations)

* geo:lon (and variations)

* file:name

* file:path

* (anything):md5

If people have a particular reason for needing or wanting these please
let us know. Otherwise the cost of storing all the variations and the
dubious use of returning them made us decide to exclude them.

Also, as of this writing some of the earliest machine tags may not have
been indexed yet. Once the indexing is complete we'll do a proper blog
post (on code.flickr.com) and probably add some machine tags specific
documentation to the API section on the site.

--

Finally, until further notice please keep in mind that these methods are
still considered experimental and write your code accordingly.

Enjoy!




Tue Nov 18, 2008 11:46 pm

aaronofmontreal
Online Now Online Now
Send Email Send Email

Forward
Message #4545 of 5424 |
Expand Messages Author Sort by Date

Hi all, If you’re not already familiar with machine tags the easiest way to think of them is being like a plain old tag but with a special syntax that allows...
Aaron Straup Cope
aaronofmontreal
Online Now Send Email
Nov 18, 2008
11:47 pm

... The obvious thing to build on top of these (long-desired) methods is some sort of graphical machine tag browser, a bit like the Mac OS X / iPod column view...
Paul Mison
pcmison
Offline Send Email
Nov 21, 2008
11:14 am

On Fri, Nov 21, 2008 at 11:14 AM, Paul Mison <lists@...> ... Thanks! That makes quite interesting browsing... Dave W....
David Wilkinson
dopiaza0
Offline Send Email
Nov 21, 2008
11:57 am

... Yeah that's fun. Interesting what predicates "jump out"... specifically those long a** ones. But the flickrite in me wants to click through to a search...
hesnut
Offline Send Email
Nov 21, 2008
1:07 pm

Thanks, cool feature & a good new direction for the API :) I've updated the Haskell API binding (version 0.3) to include support for these four methods, ...
sigbjorn.finne
Offline Send Email
Nov 21, 2008
7:07 pm

I'm still waiting for you folks to finish off your *first* machine tags change and add full & automatic reflection between geo:lat/geo:long and...
Jef Poskanzer
jef_poskanzer
Offline Send Email
Dec 15, 2008
11:44 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help