# CRP The **C**entral **R**eview **P**latform is a platform to review user uploaded data. This gem wraps the CRP API in a more Ruby like syntax. ## Installation The CRP gem is Ruby 1.9.x and 2.0.x compatible and hosted on [RubyGems](https://rubygems.org/gems/crp). Add this line to your application's Gemfile: gem 'crp' And then execute: $ bundle Or install it yourself as: $ gem install crp ## Usage Create a new review: ```` ruby require "crp" => true review_poster = CRP::ReviewPoster.new("crp.example.com", "client", "key") => # review_response = review_poster.new_description_review("I'm looking for that special someone.", "123ABC", :male, "davy22", 55) => #> review_response.successful? => true review_response.internal_id => "123ABC" review_response.external_id => "ABCD1234" ```` You can skip the host, client and key parameters and specify the `ENV['CRP_HOST']`, `ENV['CRP_CLIENT']` and `ENV['CRP_KEY']` environment variable for convenience. Parse the callback received from CRP: ```` ruby require "crp" => true review_callback = CRP::ReviewCallbackRequest.new(callback_request) => review_callback.internal_id => "123" review_callback.external_id => "4321" review_callback.result_code => 1 review_callback.result_message => "Approved" ```` **WARNING** You are responsible for listening for the callback, the gem does not handle that in any way. Note that CRP expects to see an `ok` body when sending its callback or it will keep sending the same callback over and over again. ## Contributing Something missing? Found a bug? Horrified by the code? Open a [github issue](https://github.com/agilewings/crp_gem/issues), write a failing test or add some code using pull requests. Your help is greatly appreciated!