conflikt/imdb_celebrity

View on GitHub
README.rdoc

Summary

Maintainability
Test Coverage
{<img src="https://codeclimate.com/github/conflikt/imdb_celebrity/badges/gpa.svg" />}[https://codeclimate.com/github/conflikt/imdb_celebrity]

= imdb_celebrity

{<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/conflikt/imdb_celebrity">}[https://gitter.im/conflikt/imdb_celebrity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]

* http://github.com/sandeepkrao/imdb_celebrity

== DESCRIPTION:

* Imdb_celebrity is a ruby-gem which is used for scrapping celebrity pages from www.imdb.com . You can install imdb_celebrity as 
    gem install imdb_celebrity
  With current initial release we can search a celebrity with name or we can fetch content for a celebrity with given IMDB id or/and name,  by specifying which parser we want to use.
  Right now we support Hpricot and Nokogiri as parser classes.
  
  Usages:
    require 'imdb_celebrity'
    
    ** searching a celebrity
      imdb_celebs = ImdbCelebrity::Search.new("Brad Pitt")
      imdb_celebs.celebrities
      # this will return array of celebrity objects. 
      Also you can define the ParserClass which u wanna use [ right now you have choice of using either Nokogiri or Hpricot], as
      imdb_celebs = ImdbCelebrity::Search.new("Brad Pitt", "NokogiriParser") #by default it will be HpricotParser
      imdb_celebs.celebrities
    
    ** Fetching data for celebrity
      celeb = ImdbCelebrity::Celebrity.new("0000093", "brad pitt") # give 7 digit imdbid number
      celeb.parser
      => it will give you the type of parser class it using
      celeb.public_methods(false)
      => will give you the public methods of ImdbCelebrity::Celebrity class only
      celeb.to_s
      => will return an array of celebrity data items containing name, real_name, biography, nationality, height, url.

== REQUIREMENTS:

  * Hpricot gem should be installed.
  * Nokogiri gem should be installed.
  

== INSTALL:
  gem install imdb_celebrity
  you may need sudo permissions to install gem.

== LICENSE:

(The MIT License)

Copyright (c) 2010 FIXME full name

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.