lib/jkl.rb in jakal-0.1.6 vs lib/jkl.rb in jakal-0.1.7

- old
+ new

@@ -14,12 +14,21 @@ links.each do |link| yield link if block_given? end end + def topix_links(keyphrase) + url = YAML::load_file('config/config.yml')['topix'] + links("#{url}#{keyphrase}") + end + def tags(key, link) text = Jkl::Text::sanitize(Jkl::get_from(link)) Jkl::Extraction::tags(key, text) end + def trends + url = YAML::load_file('config/config.yml')['twitter'] + JSON.parse(Jkl::get_from(url))["trends"].map{|t| t["name"]} + end end end