module OvercastAPI
Constants
- BASE_URL
- VERSION
Public Class Methods
clean(str)
click to toggle source
# File lib/overcast_api.rb, line 20 def self.clean(str) str.gsub "\n", '' end
enter_container(base_node)
click to toggle source
Remove <html> & <body>
# File lib/overcast_api.rb, line 10 def self.enter_container(base_node) base_node.xpath "/html/body/div[@class='container']" end
player(username)
click to toggle source
# File lib/overcast_api.rb, line 14 def self.player(username) resp = HTTParty.get("#{BASE_URL}/#{username}") html = Nokogiri::HTML resp.parsed_response Player.new(enter_container(html)) end