classifieds_api 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d105b1872236676c9f5afabc59ef63be779646bf
4
- data.tar.gz: c91484c3b38845f4fa3009206065d7b00c15d0e0
3
+ metadata.gz: d12a954c851b0595bfad36c7d7b4ada4ac0aaef7
4
+ data.tar.gz: a47db7edae33a4652a0cd247aad7bb11336e3933
5
5
  SHA512:
6
- metadata.gz: 03f39c5975ebe72b4291ced51878ee150eadb4cec35d4d09936ec698ddb1079e2c4f858b7f87a8a42eb6a0b363f37baf2d2e59667b7cd7846891af97664b9147
7
- data.tar.gz: 7e5bd38bd01f5f46c554af8115b93a3e90542d4e51482a698c8668e5de096545d9453aedec976105c96c5af67ac138a589fd6c08ec758a82037d9e10853dde91
6
+ metadata.gz: bf7cdc419c03452a5653407b8f8ab7ec1e055556baa82ab580f5ef4312ded562ffcb8d82db695e391d2d72fbbdae93e33c88baed3a239c6ce06583fd7545b4b2
7
+ data.tar.gz: 36d1323e3753d2a9ba4b4a3d7ebd3726f13cd06603858304cb9ebc82e903be66b7c0f687338f24c69f7007340b7d3270f5e6ccb66b473f595209020f4b7dd5dc
data/README.rdoc CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  == Description
4
4
 
5
- Simple Ruby API for popular classifieds website.
5
+ This premature gem allows one to search items on Kijiji using search filters.
6
+
7
+ The gem is currently in development for more features.
8
+
9
+ If you would like a feature to be added to the upcoming features, please email me at jbisson@uwaterloo.ca
10
+
11
+ View the complete documentation at: https://github.com/jfbisson4/classifieds_api/wiki
6
12
 
7
13
  == Installation
8
14
 
@@ -35,7 +41,4 @@ Print the results.
35
41
 
36
42
  ads = kijiji_session.search(keyword, search_limit, filters)
37
43
 
38
- ads.each do |ad|
39
- ad.print_ad
40
- end
41
-
44
+ ads.each { |ad| ad.print_ad }
@@ -9,10 +9,10 @@ Gem::Specification.new do |spec|
9
9
  spec.license = 'MIT'
10
10
  spec.authors = ["Jean-Francois Bisson"]
11
11
  spec.email = ["jbisson@uwaterloo.ca"]
12
- spec.required_ruby_version = '~> 2.0'
12
+ spec.required_ruby_version = '>= 2.0'
13
13
 
14
- spec.summary = %q{Simple API for popular classifieds website}
15
- spec.description = %q{Simple API for popular classifieds website. Currently, the gem allows you to do search items on Kijiji in Ontario.}
14
+ spec.summary = %q{Simple API for Kijiji}
15
+ spec.description = %q{Simple API for Kijiji. Currently, the gem allows you to search items on Kijiji in Ontario.}
16
16
  spec.homepage = "https://github.com/jfbisson4/classifieds_api"
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -2,7 +2,7 @@ module ClassifiedsApi
2
2
  class SearchFilters
3
3
 
4
4
  attr_reader :category, :location, :distance, :offer_type, :price_minimum,
5
- :price_maximum, :additional_info, :include_sponsored_ads
5
+ :price_maximum, :include_sponsored_ads
6
6
 
7
7
  def initialize(params={})
8
8
  self.category = params[:category] || 'all'
@@ -59,7 +59,7 @@ module ClassifiedsApi
59
59
  raise RangeError,
60
60
  "Argument #{price_minimum} should be between bigger than 0."
61
61
  end
62
- if price_minimum > (@price_maximum || 10000000)
62
+ if price_minimum > @price_maximum
63
63
  raise RangeError,
64
64
  "Argument #{price_minimum} should be smaller than maximum price " +
65
65
  "#{@price_maximum}."
@@ -71,7 +71,7 @@ module ClassifiedsApi
71
71
  unless price_maximum.is_a? Numeric
72
72
  raise TypeError, "Argument #{price_maximum} is not numeric."
73
73
  end
74
- if price_maximum < (@price_minimum || 0)
74
+ if price_maximum < @price_minimum
75
75
  raise RangeError,
76
76
  "Argument #{price_maximum} should be bigger than minimum price " +
77
77
  "#{@price_minimum}."
@@ -1,3 +1,3 @@
1
1
  module ClassifiedsApi
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classifieds_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Francois Bisson
@@ -80,8 +80,8 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.0'
83
- description: Simple API for popular classifieds website. Currently, the gem allows
84
- you to do search items on Kijiji in Ontario.
83
+ description: Simple API for Kijiji. Currently, the gem allows you to search items
84
+ on Kijiji in Ontario.
85
85
  email:
86
86
  - jbisson@uwaterloo.ca
87
87
  executables: []
@@ -113,7 +113,7 @@ require_paths:
113
113
  - lib
114
114
  required_ruby_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '2.0'
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -126,5 +126,5 @@ rubyforge_project:
126
126
  rubygems_version: 2.4.5
127
127
  signing_key:
128
128
  specification_version: 4
129
- summary: Simple API for popular classifieds website
129
+ summary: Simple API for Kijiji
130
130
  test_files: []