Posts Tagged ‘api’

Wildcard Machine Tag URLs

Machine tags!

Photo by cackhanded

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. In turn the magic space hamsters that run the site have been trained to recognize, index and allow for searches across multiple facets of a given machine tag.

Machine tags have three parts : a namespace which is like a subject or a topic; a predicate which is a like a property of that topic; a value which is … well, a value.

For a more thorough introduction to the subject I’d recommend reading the announcement
we made in the Flickr API discussion group
when machine tags were first added to the site. If you’d like to know even more, after that, there is good collection of links available on del.icio.us.

Which brings us to the part where I tell you that we’ve added the ability to search for machine tagged photos in plain old tag URLs (as well as in tag searches on the Flickr search page) using the facetted query syntax that has always been available in the API. For example :

That’s a trick, really. You’ve always been able to do this since machine tags are just
tags. The New-New means you can be even more granular in what you are looking
for. How about :

The wildcard URL syntax is also available for an individual user’s tags :

Now for the list of caveats and Known-Knowns :

  • At the moment it is still not possible to poke around the hierarchy of a given machine tag : all the predicates for a namespace; all the unique pairs of namespace and predicates; that sort of thing. It is On The List ™ and hopefully we can offer up something for you to play with, even if it’s just in the API to start with, shortly.

  • Values in wildcard URLs should are treated the same way regular tags are in URLs. That is “san francisco” becomes “sanfrancisco” or in machine tag speak : *:*=sanfrancisco.

  • In the examples above, I’ve illustrated namespaces that are used to denote one service or another. It is important to remember that there are no rules about what can or should be a namespace. Like tagging, the hope is that the various communities will arrive at and adapt a consensus according to their needs.

  • Untitled Souvenir #1173678685

    Photo by straup

    In the meantime, kick back and enjoy photos taken by people on their Dopplr trips, photos by people who really really like airplanes or photos by people who are interested in possums
    (not to mention all manner of marsupials) or whatever else comes to mind!

WebMonkey, Flickr API and Python

The reborn-phoenix-like-from-the-ashes WebMonkey has a tutorial up on Getting Started with the Flickr API using the Python API library.

Covers fetching favorites (an under mashedup feature if there ever was one), and plotting geotagged photos on Google Maps.

Twitter API updates, FireEagle and new Flickr API fun

Last night twitter released their next batch of API improvements, of course the one that caught my eye was …

“[NEW] /account/update_location.[xml|json] - sets the location for the
authenticated user to the string passed in a “location” parameter.
Nothing fancy, no geocoding or normalization. Just putting this out
there so developers can start playing with how geolocation might fit
into their Twitter applications.”

saving woeids in the location field

… which is nice as it’s just thrown in there as a ‘what if’ type of thing. There’s no direct reason for twitter to have location stuff, (well no more than Flickr I guess) but everyone knows that everyone wants it.

It’d be great if you didn’t have to update twitter yourself and there was something else out there that could do it for us.

Read the rest of “Twitter API updates, FireEagle and new Flickr API fun” for more on Twitter’s location API, FireEagle, and Flickr’s not-a-geocoder.

FireDopplGängEaglr

First, there was filtr but that’s another story entirely. The point being that I gave up carrying around a capital-C camera a few years ago choosing instead to make do with cameraphones and the availability of cheap, unlimited data-plans in the U.S.

I am mostly lazy and can’t really be bothered to shuttle photos around from one device to another only to move them again to the giant device in the sky called Flickr. Before filtr I relied on the upload by email feature to snag a photo and quickly share it with the future-past but the desire to touch up — or filter — the photos before upload meant that I needed to write my own service to accept, process and then upload pictures to Flickr using the API.

ph:camera=n82

Which is what I want to talk about. Sort of.

Read the rest of “FireDopplGängEaglr” for thoughts on FireEagle, Dopplr, place, and the DWIM engine.

Inside Photophlow: an interview with Neil Berkman

photophlow

I knew when we started talking about Code.Flickr I wanted to have interviews with third party developers, and I knew that I wanted my first interview to be with Neil Berkman, one of the engineers behind the amazing Photophlow

1. Can you say a bit about what Photophlow is for people who don’t know?

Photophlow is a web application for real-time group Flickr browsing. As you search and share photos the group you’re browsing with sees the same things you are instantly. You can comment on photos, fave them, tag them and more, and all of this is shared with the group in real-time. Photophlow is meant to be used for all types of interactions around photos - organized activities such as group critiques and tutorials, as well as just plain hanging out and sharing.

We also integrate with some other services like Twitter and Tumblr. For example you can send out a Twitter message with a link to your Photophlow room to invite your followers to a real-time conversation over photos. We also integrate with the major IM networks to notify you instantly when things happen in Photophlow, like someone commenting on one of your photos.

If you’d like to a quick tour of Photophlow I’d recommend this screencast.

(editor note: Also checkout the photophlow group!)

2. How are you integrating with Flickr? What services or API methods do you use?

We use quite a bit of the API. Your identity on Photophlow is your Flickr identity, so of course we take advantage of authentication. We currently have two types of rooms - “personal rooms” tied to a user and rooms based on Flickr groups. We use the contacts and groups API’s to give control over privacy.

We take advantage of almost all of the API methods for browsing or searching for photos. And of course tagging, commenting and faving all go through the API.

One of my favorite features makes use of machine tags. We let you specify custom “photo emotes” - for example if you type /smile as a chat message we’ll show a photo you’ve tagged as phlow:emote=smile. Another makes use of the Yahoo Term Extraction API. We use this to determine interesting words and phrases in chat messages and we turn these into Flickr search links. Keying off of the conversation like this works really nicely for discovering areas of Flickrspace that you might not discover otherwise, and the results you get from clicking on a random phrase are often very funny and unexpected.

3. What if you favorite part of working with the Flickr APIs?

The nicest thing about it is the completeness. So far we’ve found that almost everything we’ve wanted to do has been possible.

4. What (if any) where the challenges?

The major challenges we face are due to the unique real-time group nature of our application. We’d like to be responsible consumers of the API so we set some restrictions for ourselves, such as never making a separate API call for each person in the room. For example when we display a photo we don’t indicate whether it’s already a fave because we’d need to make this call multiple times. We turned this into a feature - if you “re-fave” a photo we delete your previous fave and add it again, moving it to the top of your list.

5. What else should I have asked you? (I’m new at this!)

How about “what would you like to see added to the API?”

One is “invite photo to group”. Some group admins are using Photophlow to review photos to invite to their pool. It would be great if we could allow them to actually issue the invitations from within Photophlow.

Another, much larger one would be the ability to invite your Flickr contacts to use a Flickr-based application. This would take a lot of work to ensure that it could be done in a non-spammy way. Even I have mixed feelings about it but as an app developer it would be nice to allow people to use their existing connections on Flickr to be able spread the word about an application more easily.

6. Are you using any open source components in Photophlow, especially any that relate to Flickr? Are you planning to release any?

Like everybody these days we make heavy use of open source. The part of Photophlow that interacts with Flickr is developed using Ruby on Rails, and we use the Ruby API for Flickr. We’ve hacked this up a bit and may either clean it up and contribute back or take another look at the current Ruby Flickr interfaces and see if we might want to switch.

7. What is next? Are you planning to build more with Flickr? Enhance your current app, or build something new? Is there an application you’re hoping someone else would build?

We plan on improving Photophlow in a number of ways. A big one is to provide more explicit support for events such as critiques and competitions. There are a number of fun features we’d love to build, for example the ability to add notes to photos and share these in real-time.

We’re also building a new web application called Videophlow, which allows for group synchronous video viewing with a “shared remote control”. Initially this will support Youtube but we’re planning to support other services and would love to include Flickr video as well.

Thanks so much Neil and good luck at Launchpad today!

Have you got a neat Flickr project folks should know about? Let us know in recommendations for the DevBlog thread!

Photo: “photophlow” by d.j. paine

DevBlog: Recent posts

Flickr development team talks nerdy.






Hacking Uploadr: Recent posts

A place to moan about all things XULRunner.
more...


Random photos from FlickrHQ


more...