Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (25 sloc) 768 Bytes

Spacious

Spacious is a simple ruby client for the myspace api. It is designed to be used from Rails as a plugin, however rails is not required.

Example

Get User

begin
	myspace_user = Spacious::User.get(params[:opensocial_viewer_id].to_i)
rescue Spacious::AuthenticationFailed => e
	# Hasn't really added the app yet
	...
rescue Spacious::InvalidResponse => e
	...
end

Get Friends of a User

begin
	friend_data = Spacious::Friends.get(myspace_user_id, {:page => params[:page], :page_size => 20})

	@friends = friend_data.friends
			
	@total_friends = friend_data.count
rescue Spacious::InvalidResponse
	...
end

Copyright (c) 2009 Benjamin Govero and Ryan Stout, released under the MIT license