Posts Tagged ‘API’

The Power of Free Data

Posted in API, Data, Links, Visualization on January 18th, 2011 by Ian Ford – Be the first to comment

If you haven’t yet, check out freebase.com. It’s an awesome repository of free data with an api you can use to access it. Dig it. I found a great example of its use in the form of an interactive map that allows you to browse military conflicts around the world by time range.

What is an API?

Posted in API, Article on October 28th, 2010 by Ian Ford – Be the first to comment

A while back I sent a video around the office (this one about Molehill) and received a confused response from a coworker:

You might think I’m completely stupid, but what is an API?  I was at the Flash in the Can Conference a few months ago and have been hearing that term ever since.  I assume it’s an AS3 thing?

I explained it as follows:

API means Application Programming Interface. It basically refers to a set of procedures and protocols for getting things done. For example, you could say that things like waving hello, handshakes, speech, and meetings are part of a human communication API. When we talk about new APIs, we mean that either the set of things we can do in a specific sphere has expanded or become more powerful. If you can imagine people who are only able to do things like wave and shake hands, an API upgrade might then allow them to truly speak, or maybe shake hands more vigorously.

It’s often challenging to explain things like this to non-programmers, but this seemed like a very useful metaphor to me. Would you agree?

API Madness

Posted in Actionscript 3, API, Article on May 11th, 2010 by Ian Ford – Be the first to comment

Today I was trying to clear lingering video from a finicky NetStream and having little luck. I decided to swing by Adobe’s LiveDocs for the NetStream class and saw what you’re looking at in the image below.

Play2?

“play2?” Really? Could Adobe not come up with a better name for this alternative play method than “play2?” At least this is the only example of such an awful naming convention. Oh, wait. Nope. Nevermind.

That’s right. I must have forgotten about “atan2.” Seriously Adobe, WTF?

AS3 Developer? Android User?

Posted in API, Documentation, Flash, Flex, Mobile on January 27th, 2010 by Ian Ford – Be the first to comment

For those of you carrying Android phones that spend far too much time thinking about flash/flex development, I’ve found a very handy little app.

From the publisher’s website:

After seeing that someone wrote an ActionScript reference application for the iPhone called ActionScript 3 API Reference for iPhone, I decided to take matters into my own hands and make the same application for the Android platform which the t-mobile G1 works on.

Displaying YouTube Content in AS3

Posted in API, Downloads, Flash, Uncategorized on January 14th, 2010 by Ian Ford – 12 Comments

UPDATE: This content has been migrated to a permanent page of the blog. Please direct any comments or questions to the new page.

Recently, while working on my portfolio, I was presented with the problem of displaying YouTube content extracted from an RSS feed in Flash. On the one hand there was the difficulty of parsing embed and object tags and extracting relevant data from the mess I was given, and on the other hand there was the problem of displaying the content itself.

YouTube provides documentation for their api, but after digging around online I was surprised to find that nobody had gone through with packaging it in a format I was willing to work with. There is an ActionScript 3 YouTube Wrapper available online, but it presumes that the Chromeless YouTube Player (http://www.youtube.com/apiplayer?version=3) you download to play videos with will be accessed using a combination of the static ExternalInterface class and external JavaScripts.

This seems, to me, to be unnecessarily complicated.

I’ve gone through the trouble of picking through the API and creating a simple class that loads a chromeless player and exposes methods you can use to manipulate it and display content from YouTube, without requiring any external javascript.

The application above is written in Actionscript 3. Basic usage is as follows:

import com.agitcraft.youtube.YouTube;
import com.agitcraft.youtube.YouTubeEvent;
_tube = new YouTube();
_tube.cueURL("http://www.youtube.com/v/-CsA1CcA4Z8", 0);
addChildAt(_tube, 0);

Each of the methods made available in the official YouTube API is available in some form or another via this set of classes. When I have a little more time I’ll follow up with official documentation and availability via google code.

Download AS3 YouTube Classes

The Unofficial Google Text to Speech API

Posted in API, Downloads, Flex on December 16th, 2009 by Ian Ford – 3 Comments

Yesterday TechCrunch published an article noting that an “unofficial” google text-to-speech API had been exposed. Naturally, I jumped right on top of playing around with it. Here’s a simple little Flex application that will plug you directly into the text-to-speech API.

Update #1: Apparently translate.google.com doesn’t have a valid cross-domain policy file, so unfortunately this app won’t work through my blog. I have, however, made the source available for download so all of you crafty devs can play with it anyway.

Update #2: Apparently a policy file has been created! Now the application works! The source is still available for download.