Sha256: e5e705cad58c7a6b775230f4c863c1f3fb8c0ce1839818011599fc9c0e587737

Contents?: true

Size: 1020 Bytes

Versions: 1

Compression:

Stored size: 1020 Bytes

Contents

if RUBY_VERSION < '1.9.0'
  require 'rubygems'
end

require 'json'
require 'open-uri'
require 'nokogiri'
require 'set'
require 'mechanize'

require 'webstalker/base'
require 'webstalker/github'
require 'webstalker/flickr'
require 'webstalker/ohloh'
require 'webstalker/twitter'
require 'webstalker/youtube'
require 'webstalker/reddit'

module Webstalker
  def self.tags_for(net, username, opts = {})
    service = self.service_for(net, username, opts)
    service ? service.tags : []
  end

  def self.service_for(net, username, opts = {})
    case net.to_s
    when "youtube"
      Webstalker::Youtube.new(username, opts)
    when "github"
      Webstalker::Github.new(username, opts)
    when "flickr"
      Webstalker::Flickr.new(username, opts)
    when "twitter"
      Webstalker::Twitter.new(username, opts)
    when "ohloh"
      Webstalker::Ohloh.new(username, opts)
    when "reddit"
      Webstalker::Reddit.new(username, opts)
    else
      raise ArgumentError, "unknown service: #{net}"
    end
  end
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webstalker-0.1.0 lib/webstalker.rb