Posts Tagged ‘API’

Kevin Rose Anounces Digg’s API

Permalink

The popular article sharing site Digg.com has announced the availability of their API.

This highly anticipated move was coupled with the announcement of an API contest which has quite honestly some pretty weak prizes (I guess publicity is the real reward).

Although I don’t use Digg as much as I used to, I’m very curious to see what type of ideas and mash-ups people dream up.

After browsing around the documentation it looks to me like the API is pretty solid. The API accepts REST requests and offers several response types: XML, JSON, Javascript, and serialized PHP. Toolkits for PHP and Flash are also available (although presently lacking documentation).

Although the value of diggable articles depreciates quickly over time, the amount of data accessible remains significant and dates back to 2004.

I suppose it’s a credit to the flexibility of their already existing RSS feeds but this API doesn’t excite me nearly as much as say Flickr or even Indeed’s API did.

Perhaps my lack of enthusiasm is due to an absence of vision on my part. I remain open minded of course - perhaps this contest (even with it’s weak prizes) will kickstart the idea machine.

API Integration: Indeed and Google Maps

Permalink

Indeed is a site for job searching which pools results aggregated from company sites and job boards such as Monster.com and CareerBuilder.com. The Indeed solution is a very attractive one because it allows job searchers to visit a single site and query across thousands of job sources.
Fortunately for developers, Indeed has a suite of tools available to the public including a web service API.

In order to use Indeed’s web services you’ll need to sign up for a developer account and receive an Indeed API Key. Alternatively, you could use Indeed’s OpenSearch offering but we’ll save that for another article.

Indeed & Google map Integration

If told to do so, Indeed can optionally pass latitude and longitude coordinates; once we have that information it becomes a simple exercise to map the coordinates using the Google Maps API.

The result is a surprisingly useful display of information with nearly endless possibilities (See the Demo here). You might want to group locations together in a single map based on proximity or you might choose to display a single larger map with an AJAX call only when each job is clicked.

In order to display Google Maps, you’ll need to sign up for the API by submitting the URL (ie. http://i.ndustrio.us) from where you’ll be generating Map calls.

Building the Indeed Search String

Here’s the basic Indeed Search String:

http://api.indeed.com/apisearch?q=Pepperdine&l=CA
&format=xml&key=xyz

In addition to the “what” and “where” parameters, we’ll want to retrieve Read More »

PHP & Last.fm/Audioscrobbler’s API

Permalink

Like many others out there, I’ve chosen to display the album covers of my most recently listened to songs in my blog’s sidebar. It was with this expressed intention in mind that I set up a Last.fm account to start tracking my listening habits.

Present Solution

Right now I’m successfully displaying this information using Dirk’s Last.fm widget which nicely piggybacks Automatic’s Sidebar Widget. Although temporary, I’ve been very happy with this setup and I encourage anyone out there using Wordpress as a blogging platform to consider this plugin combination.

That being said, this seems like the perfect opportunity to introduce myself to API offerings from Last.fm.

Inspired in large part by J Wynia’s article on this same subject; I’ll stick to his approach and more or less follow his example to create the skeletal page he introduced about a month ago.

What’s in the Data?

Last.fm XML Data

The data available with the Last.fm API is currently accessible in four formats: Plain text, XML, XSPF and RSS.

XML is available for every displayed data offering while the other three are more sporadically available; because of that, we’ll stick to XML in our examples.

Before working with the data, you need to take a look at it of course. To do that, simply append “?wsdl” to the end of the XML URL (e.g., http://ws.audioscrobbler.com/1.0/user/jrob00/topalbums.xml?wsdl) and your browser (I’m using Firefox) should nicely spit out something similar to this screenshot.

Feeding PHP

Let’s take a look at a simple script to get this data into PHP. First assign the URL… Read More »