Project

bateman

0.0
No commit activity in last 3 years
No release in over 3 years
A gem for retrieving a webpage's Twitter Card
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Bateman

Gem Version Build Status Dependency Status Code Climate

Bateman knows cards. Use Bateman to fetch Twitter Card data from any URL. Bateman::TwitterCard will fall back to Open Graph or basic HTML defaults if Twitter data is missing.

Installation

Add this line to your application's Gemfile:

gem 'bateman'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bateman

Usage

Pull the Twitter Card data (if available) from a URL:

Bateman::TwitterCard.new("http://example.com/articles/1")

Bateman::TwitterCard has the following attributes available:

#card
#creator
#description
#image
#site
#title
#url

Dependencies

Ruby 1.9 is required.

Bateman uses HTTParty and Nokogiri to pull HTTP and process HTML data.

Credits

Sydney was created and is maintained by Geoff Harcourt at Five Tool Development.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request