Method: DiceSearch.get_listings

Defined in:
lib/dice/dice.rb

.get_listings(url) ⇒ Object

Retrieve the job listings

Parameters:

  • url (String, #read)

    the url used to query the data

  • an (JobListings)

    array of job listings



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/dice/dice.rb', line 81

def self.get_listings(url)

	# Read the data from the url
	response = open(url, "User-Agent" => "Ruby/#{RUBY_VERSION}",
				"From" => "[email protected]",
				"Referer" => "http://hotjobs.yahoo.com/").read

	# Parse the listings from the query
	parse_listings(response)

end