« Posts tagged Twitter

My Leeds Hack 2 Project

Thought I would write a blog post about what I built in 24 hours for Leeds Hack 2 last weekend. I kinda got distracted last week and not had the time to write this post.

You can look at all the projects that people finished over on the Leeds Hack Website.

So what did I write

I decided to write something that I had been pondering about for a while. It’s called Spotify Roulette and revolves around the idea of crowd sourcing a new artist or area of music to listen to.

Originally it started off with me posting on Twitter quite a while back asking for something new to listen to, to which @Stanton responded with Hybrid. (I can’t find the original tweet on twitter but it’s here on Spotwitfy) Which are actually quite nice to listen to and I have a nice Spotify playlist to listen to.

I was wondering if there was a way to automate this.

So thru the combination of the Twitter and Spotify Meta Data API’s, means I can post out to Twitter, await a response, parse out the Artist and then pop open Spotify with a random track by that Artist and if the requester wants a playlist can be generated, and thru a limitation in Spotify, drag and dropped into Spotify to listen further to the Artist.

In short

In short its pretty straight forward.
Just a handful of calls to a couple of different API end points to get an Artist ID from the name, then their albums and the tracks on these albums. Chuck in a little GeoIP to hopefully check the tracks are available in the requesters’ region.
Grab the first track, pop open Spotify and grab another 10 tracks to make a playlist.

Finally I used Nerf Guns to help demo! Russian Roulette stylee.

Responses

People on Twitter can either response with text, an artist which we parse out the @user and the hashtag word. Then look that up on Spotify.
Or a response can be either an HTTP open Spotify link or a Spotify protocol link. Either to the artist page, track or album.
if it’s the Artist, I can parse out the artist ID and look for albums and tracks.
Currently not playlist urls, but that’s easy to implement.

Technology

So we used,

  • Twitter API, using @Abraham Twitter oAuth Library
  • Spotify Meta Data API
  • MaxMind GeoIP
  • jQuery and jQuery UI
  • Rick Astley
  • Nerf Guns

Give it a Go

Give it a go and offer me some feedback.
Watch out for Rick Astley tho. He likes to crop up every now and again….

It’s still a little rough round the edges in terms of theme/layout.

Spotify Roulette (http://spotifyroulette.com/)

Future

Hopefully if people like it and use it I can expand further.

Perhaps use Facebook to share playlists, or another way to crowd source a new artist. And if Spotify release a HTTP API for generating and saving playlists then incorporate that too.

Some Random Useful Things

Some random useful things:

Twitter, is scrapping Basic Auth! Which means no more simple curl calls, its on to OAuth.

Check out http://dev.twitter.com/pages/basic_to_oauth for how to update your Apps/Usage, and http://countdowntooauth.com/ for a handy countdown.

In other twitter news, I use Notifo to forward my twitter replies to my iPhone, which uses Push.ly to grab the stream. Twitter has currently borked @Replies both in apps and on the website, however Notifo announced they have updated their website with a new design, (hurrah), and a desktop client (further hurrah).
So with my mac and growl I now get Growl @ Responses….. SUCCESS!

Thats enough twitter! I was linked in a random IRC channel to http://jsfiddle.net/, which is a sort of real time code and run/test interface for several different javascript libs, including MooTools, and jQuery. Its currently in Alpha and under “heavy development”, so far I have found it quite useful, since it saves a lot of time in prototyping something. Looking forward to when they add user accounts, will be easier to track my own fiddles, heres the 5th version of me fiddling with jQuery UI tabs yes it has basic version control!

Facebook next, came across this today: http://developers.facebook.com/roadmap pretty much nails the coffin shut on FBML and suggests that we will all be using iFrames instead….

Not sure if this is a good thing or a bad thing, since iFrames are not always the most secure of things, but will make sending more upto date stuff to a Facebook page easier. And no longer stuck with Facebook caching, which in itself is a useful thing….

Also they are moving to a larger oauth setting with the use of oauth version 2! And scrapping their Rest API.

So there is a lot of change going on within two of the larger things I have been involved with (in terms of building things for clients), so in this vein when is the Last.FM api moving to oAuth too, tho it does use a token based Auth now?!

I’m gonna need to do a lot of recoding/refactoring for things that use FBML and basic Auth….

Is oAuth the future for all API’s? What do you think?

Edit:

O and I am going to invest in one of these!

Twitter @Anywhere, and the End of Halo 2

So there I was last night, watching Justin.tv. a couple of streams, a Live Halo 2 stream and live coverage of Chirp, the Twitter Developers Conference.

My net was actually behaving for once, watching two Justin.TV streams, sending and receiving a Skype video chat, as well as uploading tracks to the LSRfm.com Jukebox.


Today is the final day of Xbox Live existing for Original Xbox and Original Xbox Games, most predominately Halo 2, what this means is that you can still play the game locally, but you can’t go online via Xbox Live and play match making/custom games. They are going to turn those servers over to the Xbox 360 Network. Bungie News article about the end of Halo 2

So, no more Halo2, unless you’re a Xbox KAI user for example or LAN PARTY!!!!

I have been up all night and as of 9am BST (+1) this morning, the servers are still on, so get you’re Halo 2 on!

Back to Twitter/Chirp, Twitter has launched their new Developers website, which essentially brings together the API documentation, the Oauth application registration, and API status pages to a single location.

Twitter also spoke about @Anywhere which essentially allows you to integrate some aspects of Twitter into your website, thru the use of a single javascript call.


You can allow users to tweet from your website, automatically convert any @username to the new hovercards. See the example from @abraham on (His Site).

And then allow users to follow you, without bouncing to twitter, other than a popup to authenticate you to twitter and allow the Anywhere App access.

Check Anywhere out at http://dev.twitter.com/anywhere/ and checkout what The Guardian are doing with it.

On a unrelated point, when you login to Justin.TV via twitter, it is automatically posts anything you put in the video chat box, to your twitter account, along with links to what you are watching, bit of a spam fest, if you a) don’t know about it and b) forget to turn it off. But it led to this: Read and LOL

Halo Reach is coming

So Halo Reach the Beta multi-player is just over a month away.

And this caught my eye on the twitter feed as retweeted by @Bungietweets from @TheFeed

http://bit.ly/ciThuW

Halo Reach and its “All-Encompassing Player Investment System” looks quite good, but will be interested to see it in use when the times comes

Summer of Code is on, Horace Andy is off and You Do Talk About Barcamp

So I have finally recovered from the epic weekend that was Fruity, Tidy, and Slamdunk as well as Slam Dunk prep. when not working.

In the end Arrived at work at 11am Saturday (Tidy day) and left 3am Monday (after Slamdunk after Party), an epic Weekend.

Throughly enjoyed some of the music as well, I was running lights using Chamsys (MagicQ) on the Vans Stage, aka The Riley Smith Hall, no drinks of any kind thank you!

Best thing about my MagicQ was the remote desktop into the PC, running lights off my phone and netbook was good fun.

So The Slackers and King Blues were enjoyed, but AntiFlag were far too policitical (I now know what a Circle Pit is too).

 

So Today is day 4 of Google Summer of Code, so far done nothing for it. I lost Monday to sleeping (eventually out of bed by 5pm) Tuesday was clear the theatre day, Wednesday was getting office back in order, and today is Thursday, supposed to be doing the Horace Andy gig, lighting wise, however its been Cancelled.

 

So that takes us to, what am I going to do today, and Friday. Lets plan Summer of Code work, I’m working for GeekLog on a Syndication API, details to follow.

 

That then takes us to the Weekend, which is BarCamp Leeds 2009, part of Leeds Web Festival 2009. Should be good fun, at least is was last time, last years BarCamp let me discover geekery in Leeds, which has led to loads of new friends. And lots of werewolf playing.

 

So look out for lots and lots of Twittering this weekend on that.

 

Also I jsut remembered its my Boss’es leaving do on Friday so off to Grease Fruity, its  going to be EPIC!

And the Fruity dancers are coming as Pink Ladies too.

 

Right to GSoC Planning