Radian6 gem is a (rough) ruby interface to the Radian6 EST API (http://labs.radian6.com/api/)
gem install radian6
# connect to the API api = Radian6::API.new(username, password, app_key, :sandbox =>
true, :proxy => myproxy, :debug => true, :async => false)
# get a XML dump of the posts within a specified range posts_xml = api.fetchRangeTopicPostsXML( ((Time.now - 3600)*1000).to_s, (Time.now * 1000).to_s, [topic]) # get topics topics = api.topics
This is just the first draft of the wrapper. It can be improved in many, many ways. The API class in particular is quite messy, as it's the result of several experiments, expect it to change quite dramatically in the near future.
Feel free to help (see Contributing below)
- Clean up API class (maybe structuring the various calls in different "services" as suggested by the API documentation)
- better coverage for object output (right now only Post and Topic are supported)
- remove the option to generate objects from xml as it's too slow and hogs the memory when dealing with big pages.
- remove async connection option and isolate it via a Connector class interface
Contributing to the code (a.k.a. submitting a pull request)
- Fork the project.
- Create a topic branch.
- Implement your feature or bug fix.
- Commit and push your changes.
- Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
Copyright (c) 2012 Riccardo Cambiassi. See LICENSE for details.