Sha256: 91010d936e3b63986f61fbc22dec4ad1029c33e9818f6b36678de50922d31739

Contents?: true

Size: 623 Bytes

Versions: 1

Compression:

Stored size: 623 Bytes

Contents

require 'lib/jkl/rest_client.rb'
require 'lib/jkl/rss_client.rb'
require 'lib/jkl/calais_client.rb'
require 'lib/jkl/url_doc_handler.rb'

module Jkl
  
  def headlines(keyphrase)
    get_from_as_xml "#{YAML::load_file('config/config.yml')['topix']}#{CGI::escape(keyphrase)}"
  end

  def pages(headlines)
    items = get_items_from headlines
    descriptions = ""
    items.each do |item| 
      descriptions << attribute_from(item, :description).gsub("<![CDATA[",'').gsub("]]>",'')
    end
    descriptions
  end

  def tags(pages)
    cal_response = get_from_calais(pages)
    get_tag_from_json(cal_response)
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sshingler-jkl-0.0.4 lib/jkl.rb