Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

About

rubyoverflow is an ruby wrapper for the Stack Exchange API.

Status

Middle of being rewritten. Handles /users/{id}/* routes along with /sites and /users. Documentation forthcoming

Known Issues

Not completed

Documentation

Coming soon

License

Released under the MIT Open Source License.

Download

gem install rubyoverflow 

or GitHub

Platform

Ruby 1.8.7, 1.9.2, 1.9.3

Contact

rubyoverflow contains contributions from Dan Seaver. Leave feedback and bug reports on my GitHub project page.

Code

Complete source can be downloaded from GitHub.

Notes

Documentation of how API methods map to rubyoverflow coming shortly

Release Notes

0.5

Begins Rewrite

share|improve this question
    
I like the get_next_set idea. Wish other wrappers used it. –  Nathan Osman Jun 17 '10 at 20:40
    
@George: Thanks, I am looking to add things to my wrapper that will make it stand out –  Dan McClain Jun 17 '10 at 22:04
    
@phsr: Mind if others use this idea :) –  Nathan Osman Jun 18 '10 at 0:24
    
@George: If you voted up this library, its fine by me :P. Seriously, go ahead, the vote would be appreciated though (if you haven't voted it up already) –  Dan McClain Jun 18 '10 at 0:35
    
@phsr: I voted it up. (Even though I don't use Ruby.) –  Nathan Osman Jun 18 '10 at 2:17
    
@phsr: Please consider posting rubyoverflow on StackList. –  Nathan Osman Jul 9 '10 at 20:54
    
Is it safe to assume that this wrapper is no longer supported? –  marcamillion Dec 4 '11 at 0:57
    
@marcamillion: Actually, quite the contrary, I am in the middle of rewriting it, because shortly after the launch of the official API, this wrapper was broken. –  Dan McClain Dec 4 '11 at 17:38
add comment

2 Answers 2

Its not bad to borrow someone else's code since you give credit to the person you borrowed the code from. ;-)

The class << self its a shortcut to define a lot of class methods, so instead of doing something like:

class MyClass
  def MyClass.a_method
  end

  def MyClass.another_method
  end
end

You can do:

class MyClass
  class << self
    def a_method
    end

    def another_method
    end
  end
end
share|improve this answer
    
I understand what class << self does, its why the init_class! works the way it does. I don't get that I can call Rubyoverflow::Client.config &block once and it keeps the api information set throughout. –  Dan McClain Jun 8 '10 at 11:42
1  
init_class! set a @client variable in the eigenclass of the Base class. All classes that inherits Base can access the @client var in their eigenclass. –  daltojr Jun 9 '10 at 1:32
add comment

Its funny how some of the rubyoverflow's sourcecode is incredibly similar to pilha.

http://github.com/phsr/rubyoverflow/blob/master/lib/rubyoverflow.rb

http://github.com/dlt/pilha/blob/master/lib/pilha.rb

Why not send pull requests to pilha instead of making your own version of it?

share|improve this answer
1  
This is no longer the case, as that was the old repository (I have renamed my github account) and also have began rewriting the wrapper from scratch –  Dan McClain Dec 4 '11 at 18:01
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .