lib/bookshark.rb
def category(options = {})
      uri = process_options(options, __method__)
      options[:format] ||= @format

      category_extractor = Biblionet::Extractors::CategoryExtractor.new
      category = category_extractor.extract_categories_from(uri)

      response = {}
      response[:category] = !category.nil? ? [category] : []
      response = change_format(response, options[:format])

      return response
    end
def category(options = {})
      uri = process_options(options, __method__)
      options[:format] ||= @format

      category_extractor = Biblionet::Extractors::CategoryExtractor.new
      category = category_extractor.extract_categories_from(uri)

      response = {}
      response[:category] = !category.nil? ? [category] : []
      response = change_format(response, options[:format])

      return response
    end
def bibliographical_book(options = {})
   bibliographical_book_extractor = Biblionet::Extractors::BibliographicalBookExtractor.new
   uri = "http://www.biblionet.gr/main.asp?page=results&Titlesid=#{options[:id]}"
   options[:format]  ||= @format
   book = bibliographical_book_extractor.load_and_extract_book(uri)
   response = {}
   response[:book] = !book.nil? ? [book] : []
   response = change_format(response, options[:format])
   response = bibliographical_book_extractor.decode_text(response)
 end
 puts Bookshark::Extractor.new(format: 'pretty_json').bibliographical_book(id: 103788)