10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/whos_using_what/api_clients/simply_hired_client.rb', line 10
def perform_search query, location, number_results = 20, exclude_recruiters = true, page_number = 1
recruiters_string = ""
if exclude_recruiters
recruiters_string = "/fem-employer"
end
url = "http://api.simplyhired.com/a/jobs-api/xml-v2/" <<
"q-%22" << query << "%22/" <<
"l-" << location <<
"/pn-" << page_number.to_s
"/ws-" << number_results.to_s <<
recruiters_string <<
"?pshid=47575&ssty=2&cflg=r&jbd=hiringto.jobamatic.com"
url = url.tr(" ", "+")
xml_response = RestClient.get(url)
map = Crack::XML.parse(xml_response)
end
|