Skip to content

geoffharcourt/bateman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A gem for fetching Twitter Cards from pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages