MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Ruby Client Library

Last post 02-28-2008 4:04 PM by ayn. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 02-08-2008 8:23 PM

    Ruby Client Library

    Hey guys- I started working on a Ruby client library for the REST api. It is far from complete, but you can check it out at Rubyforge: http://rubyforge.org/projects/spacer/. I'll make an announcement when its ready for release and put up some documentation.
    Filed under:
  • 02-08-2008 9:11 PM In reply to

    Re: Ruby Client Library

    Cool! Whenever its ready, I'll check it out.

    -Thanks
    -V
  • 02-09-2008 5:11 AM In reply to

    • David
    • Not Ranked
    • Joined on 02-06-2008
    • Posts 3

    Re: Ruby Client Library

    Hi, Let me know if I can help. I am working on a couple myspace apps on Rails as well. David
  • 02-09-2008 5:02 PM In reply to

    Re: Ruby Client Library

    Hey guys,

    I released the Ruby client lib. It generates Ruby objects for method calls, so you don't have to worry about parsing JSON or XML on your own.

    Install with: sudo gem install spacer

    The (rather sparse) documentation is at: http://spacer.rubyforge.org/

    Use like:

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

    I'll start a Google Group for questions/comments. Please submit test-driven patches to Rubyforge (http://rubyforge.org/projects/spacer/). Keep in mind that this is super alpha software and no where near a 1.0. For example there is no error handling yet.

    Enjoy!
    Filed under:
  • 02-10-2008 12:56 PM In reply to

    • Greg
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 1

    Re: Ruby Client Library

     Awesome.. I'll send you patches if/when I find any bugs :)

  • 02-13-2008 12:33 PM In reply to

    Re: Ruby Client Library

    ok

     

  • 02-13-2008 4:56 PM In reply to

    • Mark
    • Top 50 Contributor
    • Joined on 02-05-2008
    • Posts 66

    Re: Ruby Client Library

    Thanks for putting this together.  I'm getting the following error.  Any idea what might be causing it?  I have the activerecord gem installed and it looks like the decode method is defined to me.

    NoMethodError (undefined method `decode' for ActiveSupport::JSON:Module):
        c:/ruby/lib/ruby/gems/1.8/gems/spacer-0.5.0/lib/spacer/client.rb:134:in `do_request'
        c:/ruby/lib/ruby/gems/1.8/gems/spacer-0.5.0/lib/spacer/client.rb:21:in `user'

    Thanks 

  • 02-15-2008 11:14 AM In reply to

    Re: Ruby Client Library

    the decode method is in the active support 2.0.2 but its not in 1.2.6

    maybe you could make sure its pulling in the correct gem
  • 02-15-2008 12:21 PM In reply to

    Re: Ruby Client Library

    ooh ooh ooh thank you! :D

    I'm far from a developer, but have been learning ruby, and want to start building my own stuff (just for fun, I could never compete with a "real" engineer) - this is really cool.

    Please follow us on Twitter for major announcements and updates:

    http://www.twitter.com/MySpaceDevTeam
  • 02-19-2008 7:51 AM In reply to

    Re: Ruby Client Library

     Hi,

    I feel a bit stupid to ask, but in the line

    @myspace = Spacer::Client.new(api_key, secret_key)

    what is api_key and secret_key?How do they relate to the oAuth stuff I see on over here?

    Thanks for hints
    Cheers
    Michael

  • 02-19-2008 10:08 AM In reply to

    Re: Ruby Client Library

     no worries, I figured it out.

    for all others: the values are on the app details page 

  • 02-21-2008 11:27 AM In reply to

    Re: Ruby Client Library

    StephanieBamBam:

    ooh ooh ooh thank you! :D

    I'm far from a developer, but have been learning ruby, and want to start building my own stuff (just for fun, I could never compete with a "real" engineer) - this is really cool.

    Ruby is the way to go.. congrats! You don't have to be an engineer to build stuff. I was a self-taught programmer before I even went to school.
  • 02-21-2008 11:28 AM In reply to

    Re: Ruby Client Library

    Michael:

     no worries, I figured it out.

    for all others: the values are on the app details page 

    And just to clarify, the api key is your application url, and the secret key is, well... the secret key :)
  • 02-28-2008 4:04 PM In reply to

    • ayn
    • Not Ranked
    • Joined on 02-25-2008
    • Posts 3

    Re: Ruby Client Library

    I just wrote a simple test script to test out this gem, looks like you're now missing a new attribute for models/user.rb, namely, you might have to add the largeimage attribute to the attr_accessor list for it to work.  

Page 1 of 1 (14 items)