zohoho 0.2.4 → 0.2.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@ GEM
13
13
  rake
14
14
  json (1.5.3)
15
15
  mocha (0.9.12)
16
+ nokogiri (1.5.0)
16
17
  rake (0.9.2)
17
18
  rcov (0.9.9)
18
19
  rdoc (3.8)
@@ -37,6 +38,7 @@ DEPENDENCIES
37
38
  jeweler (~> 1.6.0)
38
39
  json
39
40
  mocha
41
+ nokogiri
40
42
  rake
41
43
  rcov
42
44
  rdoc
@@ -20,15 +20,15 @@ module Zohoho
20
20
  end
21
21
 
22
22
  def get_candidates(conditions = {})
23
- (@type == 'json' ? JSON.parse(self.class.get(candidates_url, conditions)) : Nokogiri::XML.parse(self.class.get(candidates_url, conditions)))
23
+ (@type == 'json' ? JSON.parse(self.class.get(candidates_url+"&#{conditions.to_params}")) : Nokogiri::XML.parse(self.class.get(candidates_url, conditions)))
24
24
  end
25
25
 
26
26
  def candidates(conditions = {})
27
- @candidates ||= get_candidates
27
+ @candidates ||= get_candidates(conditions)
28
28
  end
29
29
 
30
- def get_parsed_candidates(conditions = {:toIndex => 200})
31
- raw_candidates = candidates
30
+ def get_parsed_candidates(conditions = {:fromIndex => 1, :toIndex => 200})
31
+ raw_candidates = candidates(conditions)
32
32
  @candidates = raw_candidates["response"]["result"]["Candidates"]["row"]
33
33
 
34
34
  #extracts the relevant data
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{zohoho}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["KentonWhite", "Elland"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zohoho
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.4
5
+ version: 0.2.5.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - KentonWhite