Tapirgo
A simple Ruby library for the Tapir API.
Installation
Add this line to your application's Gemfile:
gem 'tapirgo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tapirgo
Usage
Searches
Create a Tapirgo::Search
instance with your Tapir API token and desired
search string:
search = Tapirgo::Search.new('XXXXXXXXXXXXXX', 'example')
Search results can be accessed individually or iterated over:
first_result = search[0]
search.each { |result| puts result }
Each result has methods for all the data returned by the Tapir API:
result.title
result.score
result.link
result.content
result.summary
result.published
For additional information, see the Tapir documentation.
Contributing
- Fork it ( http://github.com/RoboticCheese/tapirgo-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Ensure all tests still pass and that your change is tested (
rake
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request