Spacer, Yes with an 'e', Released

Posted by shane
on Monday, February 11

DESCRIPTION

Ruby API for the MySpace Platform REST API

FEATURES/PROBLEMS

  • Implements v1.0 of the MySpace Platform REST API
  • Uses OAuth to securely authenticate with MySpace
  • Uses JSON for minimal transport footprint

PLAY

@myspace = Spacer::Client.new(api_key, secret_key)
user = @myspace.user('3454354')
puts user.interests.music
puts user.photos.first.caption

REQUIREMENTS

  • OAuth
  • ActiveSupport
  • Mocha (for testing)

INSTALL

  • sudo gem install spacer

DOCUMENTATION

Rubyforge: http://rubyforge.org/projects/spacer/ (submit bugs here)

RDocs: http://spacer.rubyforge.org/

Goolge Group: http://groups.google.com/group/spacer-ruby

NOTES

MySpace is still actively making changes to their API, so this is far from a 1.0 release. However, as of the day of this post, it implements all the features of their REST API.

Thanks to Ken Pelletier for coming up with the very creative name.

photo credits: bub.blicio.us and Scott Beale / Laughing Squid

Comments

Leave a response

  1. Evan FarrarFebruary 10, 2008 @ 08:30 PM

    Sweet. I will have to sign back up for myspace.

    I am picturing a site like lolinator.com which can take a well designed website and theme it using styles from random myspace profile.

  2. shaneFebruary 10, 2008 @ 08:48 PM

    Evan- Thanks for finding yet another site that will suck up my time. MySpace did a good job with their server side API. It is true REST with all the verbs, instead of being pseudo-REST like Facebook. Also going with the OAuth standard for authentication was a good idea. It’s so much better than the manual authentication scheme used by Facebook’s API.

    —Sargent Jellibelli

  3. PeytonFebruary 11, 2008 @ 03:02 AM

    Thanks for sharing another site. So at least I have other choices as my past time.

  4. ViktorFebruary 11, 2008 @ 06:29 AM

    Ive been bored with myspace which is why i switched to facebook.Now time to go back and reawaken my love for myspace and spice things up over there.

  5. Jim NeathFebruary 23, 2008 @ 10:41 AM

    Hi Shane,

    This plugin looks great, but when I’ve tried to install it I get the following error:

    Building native extensions. This could take a while… ERROR: Error installing spacer: ERROR: Failed to build gem native extension.

    D:/ruby/bin/ruby.exe extconf.rb i spacer creating Makefile

    nmake ‘nmake’ is not recognized as an internal or external command, operable program or batch file.

    Gem files will remain installed in D:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2 for inspection. Results logged to D:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2/ext/json/ext/parser/ gem_make.out

    Running on Windows XP, unfortunately.

  6. shaneFebruary 23, 2008 @ 06:30 PM

    Jim- Looks like an error building the json gem on Windows. Unfortunately I don’t have a Windows machine to try this on. Are you using this in a Rails app? If so, install the gem directly to vendor/plugins using either Piston or by svn checkout from Rubyforge. Then remove the line “require ‘json’” and replace the line JSON.parse(json) with ActiveSupport::JSON.decode(json). But this is a hack to use Rails’ built-in json decoding. The best thing is to search around to see if others are having the same problem with the json gem on Windows.

  7. shaneFebruary 28, 2008 @ 05:57 PM

    Spacer gets mentioned on the RailsEnvy Podcast #19. These guys are consistent and funny, and consistently funny :) Okay, I apparently need to work on the humor. Worth a listen.