The project provides tools to make requests to the Chimp Rewriter API. The API is used to automatically spin and rewrite articles using a host of intelligent algorithms, phrases and synonyms.
The API clones features of the automatic rewriting available in the desktop version of Chimp Rewriter. This is a content/article spinner and rewriter which you can find out about here: http://chimprewriter.com
Instantiate client with proper e-mail, application identifier and API key. (Current API do not check application identifier at all and it can contain arbitrary string, however it will change in future). Two methods: +chimp_rewrite+ and +create_spin+ accept text as the first parameter and return text as well. Additional options may be passed in optional hash. +#statistics+ returns account usage statistics, limits etc.
All actions raise +ChimpRewriter::ChimpRewriterError+ with descriptive message when API response indicates failure.
For detailed description of each action and allowed options, refer to: http://chimprewriter.com/api/documentation/
Brief usage example:
client = ChimpRewriter.new(email, application_identifier, api_key) } client.statistics # => OpenStruct, contains statistics client.chimp_rewrite "I wandered lonely as a cloud", quality: 4 # => String, spin results client.create_spin "I wandered lonely as a cloud", reorderparagraphs: true # => String, spin results
Another example in +example/raven.rb+. To run it just clone the repo and run in that directory.
/usr/bin/env CR_EMAIL="[email protected]" CR_APP_ID="app.id" CR_API_KEY="api_key" ruby -Ilib example/raven.rb
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install chimp_rewriter
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request