The Disqussion Ruby Gem ==================== A Ruby wrapper for the Disqus API Installation ------------ ``` sh gem install disqussion ``` Documentation ------------- Does your project or organization use this gem? ----------------------------------------------- Add it to the [apps](http://github.com/jeremyvdw/disqussion/wiki/apps) wiki! Continuous Integration ---------------------- [![Build Status](http://travis-ci.org/jeremyvdw/disqussion.png)](http://travis-ci.org/jeremyvdw/disqussion) What's in 0.0.4? ---------------- Disqussion currently covers *only* stable Disqus API features for: applications, categories, exports, forums, imports, posts, reactions, reports, threads and users. Missing following features: blacklists and whitelists. The error classes are consistent with [Disqus documented response codes](http://disqus.com/api/docs/errors/). Error details from Disqus API are encapsulated in HTTP response.
Response Code Error
400 Disqussion::BadRequest
401 Disqussion::Unauthorized
403 Disqussion::Forbidden
404 Disqussion::NotFound
500 Disqussion::InternalServerError
Here are a few reasons use (and improve) this gem: * Full Ruby 1.9 compatibility: All code and specs now work in the latest version of Ruby * Support for HTTP proxies * Support for multiple HTTP adapters: NetHttp (default), em-net-http (async), Typhoeus, Patron, or ActionDispatch * SSL: On by default for increased [speed](http://gist.github.com/652330) and security Help! I'm getting: "Did not recognize your engine specification. Please specify either a symbol or a class. (RuntimeError)" --------------------------------------------------------------------------------------------------------------------------- If you're using the JSON request format (i.e., the default), you'll need to explicitly require a JSON library. We recommend [yajl-ruby](http://github.com/brianmario/yajl-ruby). Usage Examples -------------- ``` ruby require "rubygems" require "disqussion" # Certain methods require authentication. To get your Disqus credentials, # register an app at http://disqus.com/api/applications/ Disqussion.configure do |config| config.api_key = YOUR_API_KEY config.api_secret = YOUR_API_SECRET end # Get an application's usage details puts Disqussion::Client.applications.listUsage("the88") Contributing ------------ In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project. Here are some ways *you* can contribute: * by using alpha, beta, and prerelease versions * by reporting bugs * by suggesting new features * by writing or editing documentation * by writing specifications * by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace) * by refactoring code * by closing [issues](http://github.com/jeremyvdw/disqussion/issues) * by reviewing patches All contributors will be added to the [HISTORY](https://github.com/jeremyvdw/disqussion/blob/master/HISTORY.mkd) file and will receive the respect and gratitude of the community. Submitting an Issue ------------------- We use the [GitHub issue tracker](http://github.com/jeremyvdw/disqussion/issues) to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issuse by voting it up. When submitting a bug report, please include a [Gist](http://gist.github.com/) that includes a stack trace and any details that may be necessary to reproduce the bug, including your gem version, Ruby version, and operating system. Ideally, a bug report should include a pull request with failing specs. Submitting a Pull Request ------------------------- 1. Fork the project. 2. Create a topic branch. 3. Implement your feature or bug fix. 4. Add documentation for your feature or bug fix. 5. Run bundle exec rake doc:yard. If your changes are not 100% documented, go back to step 4. 6. Add specs for your feature or bug fix. 7. Run bundle exec rake spec. If your changes are not 100% covered, go back to step 6. 8. Commit and push your changes. 9. 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.) Thanks ------ This gem is based on the work by John Nunemaker, Wynn Netherland, Erik Michaels-Ober and Steve Richert on the [Twitter gem](http://github.com/jnunemaker/twitter) Copyright --------- Copyright (c) 2011 Jérémy Van de Wyngaert. See [LICENSE](https://github.com/jeremyvdw/disqussion/blob/master/LICENSE.mkd) for details.