Just a short post for today, but I thought I’d make you aware of an application (that has been around for a while, but hey, it’s creative).
If you use Spotify and Last.fm this mashup of an application is a great way to find music on added to Spotify that matches your top 50 artists (or so, Vilhelm writes.)
and getting it to work together.. seems like people have a lot of issues with this, so here are the steps you have to take.
If you do not have an API key, sign up for one here.
This way of installing haXe is pretty bad and should be avoided, but it made it easy swapping haXe versions fast.
I use the haXe version 1.19 together with the Google Maps Flash API.
Lets first get haXe and the Googles Flash API
root@devbox:/usr/local/src$ mkdir flashdevelopment
root@devbox:/usr/local/src$ cd flashdevelopment/
root@devbox:/usr/local/src/flashdevelopment$ wget -q \
Now, there are some changes that has to made to make haXe like the API
I generated the working sources with a newer version of haXe, and applied the changes to it.
This makes the patchfile a bit larger than it had to be, because I had to make a patch against my haxe 1.19-generated hxclasses/ folder.
Anyways, this works and it is against the 1.9 file from Google.
class MyMap extends Map {
static function main() {
var app:MyMap = new MyMap();
flash.Lib.current.addChild(app);
app.setSize(new flash.geom.Point(400,400));
}
public function new(){
super();
addEventListener(MapEvent.MAP_READY, onMapReady);
}
Now we need to make a way for haXe to understand how to compile this with the API, so this is the contents of:
/usr/local/src/flashdevelopment/compile.hxml
Voila! Your first Google Flash Map, fresh from the oven.. the filename is map.swf
Try to include this on a webpage, check the source here if you don’t know how to do it.
Your API key should be in the flashvars when applying the flash object on a webpage.
<param name=”flashvars” value=”key=key”/>
Here is my result, I messed up the width/height of my app, but it works:
Mashups. To be able to think creatively about it you must know which sites offer an API. And then; what kind of data you can expect to be able to access. Here is a list of websites which offer an API. Some are the most popular, but you will find a little golden egg or two in this list.
Facebook have an API, you can use most of the data users have stored at facebook, like friends, profile info, photos. API Docs:Facebook API Documentation
From Twitter you can get the user data, followers, friends and status updates. A previous article on this website was about Twitter applications.
API Docs:Twitter API Documentation
With the last.fm API you can retrieve user data, most popular songs and everything stored within last.fm
With the bit.ly API you can expand and shorten URL’s, then gather statistics about traffic on those specific short URL’s.
A lot of Twitter users post links shortened with bit.ly, so it would also be possible to keep track of what’s popular by the use of this API. API Docs:Bit.ly API Documentation
Create your own maps, you can use Google Maps API to display geodata in your mashup. API Docs:Google Maps API Documentation
GeoNames
With the GeoNames API you can get data for your Google Maps; Airports, Hotels and a lot of other things. Trivial resource! API Docs:GeoNames API Documentation
With the Digg.com API you can get current popular stories from all categories, the digg count, comments and a lot of other data. API Docs:Digg.com API Documentation
That’s the list!
Which other popular APIs exist? If you have used another API, leave a comment!