Module: Popularity

Defined in:
lib/popularity.rb,
lib/popularity.rb,
lib/popularity/search.rb,
lib/popularity/crawler.rb,
lib/popularity/rubygems.rb,
lib/popularity/networks/github.rb,
lib/popularity/networks/medium.rb,
lib/popularity/networks/twitter.rb,
lib/popularity/networks/facebook.rb,
lib/popularity/networks/rubygems.rb,
lib/popularity/results_container.rb,
lib/popularity/networks/pinterest.rb,
lib/popularity/networks/soundcloud.rb,
lib/popularity/networks/google_plus.rb,
lib/popularity/networks/reddit_post.rb,
lib/popularity/networks/reddit_share.rb,
lib/popularity/networks/reddit_comment.rb

Defined Under Namespace

Modules: ContainerMethods Classes: Crawler, Facebook, Github, GooglePlus, Medium, MultiSearch, Pinterest, RedditComment, RedditPost, RedditResult, RedditShare, ResultsContainer, Rubygems, Search, Soundcloud, Twitter

Constant Summary collapse

TYPES =
[]

Class Method Summary collapse

Class Method Details

.search(*urls) ⇒ Object



20
21
22
23
24
# File 'lib/popularity.rb', line 20

def self.search(*urls)
	response = {}

  MultiSearch.new(:urls => urls)
end

.select_types(url) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/popularity.rb', line 26

def self.select_types(url)
  # github.com stats only valid for github urls, etc
  selected_types = Popularity::TYPES.collect { |n|
    network = n.new(@url)
    network if network.valid?
  }.compact
end