Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

jeremyvdw/disqussion

Repository files navigation

The Disqussion Ruby Gem

A Ruby wrapper for the Disqus API

Installation

gem install disqussion

Documentation

http://rdoc.info/gems/disqussion

Does your project or organization use this gem?

Add it to the apps wiki!

Continuous Integration

Build Status Dependency Status

What's in 0.0.7?

  • Added list of forum moderators (@shabankarumba)
  • Added list of popular hreads, create threads (@shabankarumba)
  • Added list and details of reactions (@shabankarumba)
  • Added hierarchal tree of a post, list of the most popular posts and informations on a post (@shabankarumba)
  • Added list of users a user is being followed by and users a user is following, list of forums a user has been active on recenty (@shabankarumba)
  • Added set of threads given a list of ids (@shabankarumba)
  • Added list of threads sorted by hotness (@shabankarumba)
  • Added check username availability (@shabankarumba)
  • Added list of most active users (@m0dd3r)

What's in 0.0.6?

  • Added subscribe and unsubscribe API calls (@wbrady)
  • List users activity and list users active threads (@shabankarumba)
  • Updated dependencies

What's in 0.0.5?

  • Fixes conflicts with the twitter gem (@mathieuravaux).

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. 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 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.

Usage Examples

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, 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
  • by reviewing patches

All contributors will be added to the HISTORY file and will receive the respect and gratitude of the community.

Submitting an Issue

We use the GitHub issue tracker 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 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

Copyright

See LICENSE for details.

About

A Ruby wrapper for the Disqus REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages