oodler 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/oodler/client.rb +6 -5
- data/test/client_test.rb +7 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/oodler/client.rb
CHANGED
@@ -40,9 +40,9 @@ module Oodler
|
|
40
40
|
|
41
41
|
#specify the :location key for city search, i.e :location=>"Houston, Tx"
|
42
42
|
def usa_job_search(options)
|
43
|
-
options
|
44
|
-
options
|
45
|
-
options
|
43
|
+
options.merge!({:region => "usa"})
|
44
|
+
options.merge!({:category => "job"})
|
45
|
+
puts options.inspect
|
46
46
|
self.listing(options)
|
47
47
|
end
|
48
48
|
|
@@ -76,10 +76,11 @@ module Oodler
|
|
76
76
|
|
77
77
|
def validate_parameters(options)
|
78
78
|
params = options[:query]
|
79
|
+
puts options[:query][:region]
|
79
80
|
unless params[:region]
|
80
|
-
raise OodleArgumentError, 'Missing region
|
81
|
+
raise OodleArgumentError, 'Missing region parameter. Visit http://developer.oodle.com/regions-list/ for possible regions.'
|
81
82
|
end
|
82
|
-
unless params[:category] ||
|
83
|
+
unless params[:category] || params[:q]
|
83
84
|
raise OodleArgumentError, 'You must supply a category or query parameter. Visit http://developer.oodle.com/categories-list/ for possible categories.'
|
84
85
|
end
|
85
86
|
end
|
data/test/client_test.rb
CHANGED
@@ -129,6 +129,13 @@ class ClientTest < Test::Unit::TestCase
|
|
129
129
|
|
130
130
|
end
|
131
131
|
|
132
|
+
should "allow searches using job helper" do
|
133
|
+
stub_get("/api/v2/listings?attributes=job_title_software_engineer®ion=usa&key=key&category=job", "listings.xml")
|
134
|
+
p = @oodler.usa_job_search(:attributes => "job_title_software_engineer")
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
|
132
139
|
|
133
140
|
|
134
141
|
|