classifieds_api 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +32 -0
- data/classifieds_api.gemspec +7 -4
- data/lib/classifieds_api/version.rb +1 -1
- metadata +20 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d105b1872236676c9f5afabc59ef63be779646bf
|
4
|
+
data.tar.gz: c91484c3b38845f4fa3009206065d7b00c15d0e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f39c5975ebe72b4291ced51878ee150eadb4cec35d4d09936ec698ddb1079e2c4f858b7f87a8a42eb6a0b363f37baf2d2e59667b7cd7846891af97664b9147
|
7
|
+
data.tar.gz: 7e5bd38bd01f5f46c554af8115b93a3e90542d4e51482a698c8668e5de096545d9453aedec976105c96c5af67ac138a589fd6c08ec758a82037d9e10853dde91
|
data/README.rdoc
CHANGED
@@ -7,3 +7,35 @@ Simple Ruby API for popular classifieds website.
|
|
7
7
|
== Installation
|
8
8
|
|
9
9
|
gem install classifieds_api
|
10
|
+
|
11
|
+
== Requirements
|
12
|
+
|
13
|
+
* Ruby 2.0 or higher
|
14
|
+
|
15
|
+
* Nokogiri version ~> 1.6
|
16
|
+
|
17
|
+
* Open-Uri version ~> 2.0
|
18
|
+
|
19
|
+
== Example
|
20
|
+
|
21
|
+
Search for 5 ads using the keyword 'computers' over $500 in the Toronto (GTA) region.
|
22
|
+
Print the results.
|
23
|
+
|
24
|
+
require 'classifieds_api'
|
25
|
+
require 'nokogiri'
|
26
|
+
require 'open-uri'
|
27
|
+
|
28
|
+
filters = ClassifiedsApi::SearchFilters.new(location: 'Toronto (GTA)')
|
29
|
+
kijiji_session = ClassifiedsApi::Kijiji.new
|
30
|
+
|
31
|
+
filters.price_minimum = 500
|
32
|
+
|
33
|
+
keyword = 'computers'
|
34
|
+
search_limit = 5
|
35
|
+
|
36
|
+
ads = kijiji_session.search(keyword, search_limit, filters)
|
37
|
+
|
38
|
+
ads.each do |ad|
|
39
|
+
ad.print_ad
|
40
|
+
end
|
41
|
+
|
data/classifieds_api.gemspec
CHANGED
@@ -4,10 +4,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'classifieds_api/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.
|
10
|
-
spec.
|
7
|
+
spec.name = "classifieds_api"
|
8
|
+
spec.version = ClassifiedsApi::VERSION
|
9
|
+
spec.license = 'MIT'
|
10
|
+
spec.authors = ["Jean-Francois Bisson"]
|
11
|
+
spec.email = ["jbisson@uwaterloo.ca"]
|
12
|
+
spec.required_ruby_version = '~> 2.0'
|
11
13
|
|
12
14
|
spec.summary = %q{Simple API for popular classifieds website}
|
13
15
|
spec.description = %q{Simple API for popular classifieds website. Currently, the gem allows you to do search items on Kijiji in Ontario.}
|
@@ -27,4 +29,5 @@ Gem::Specification.new do |spec|
|
|
27
29
|
spec.add_development_dependency "test-unit", "~> 3.0"
|
28
30
|
|
29
31
|
spec.add_runtime_dependency "nokogiri", "~> 1.6"
|
32
|
+
spec.add_runtime_dependency "rubysl-open-uri", "~> 2.0"
|
30
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classifieds_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Francois Bisson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubysl-open-uri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
69
83
|
description: Simple API for popular classifieds website. Currently, the gem allows
|
70
84
|
you to do search items on Kijiji in Ontario.
|
71
85
|
email:
|
@@ -89,7 +103,8 @@ files:
|
|
89
103
|
- lib/classifieds_api/search_filters.rb
|
90
104
|
- lib/classifieds_api/version.rb
|
91
105
|
homepage: https://github.com/jfbisson4/classifieds_api
|
92
|
-
licenses:
|
106
|
+
licenses:
|
107
|
+
- MIT
|
93
108
|
metadata:
|
94
109
|
allowed_push_host: https://rubygems.org
|
95
110
|
post_install_message:
|
@@ -98,9 +113,9 @@ require_paths:
|
|
98
113
|
- lib
|
99
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
115
|
requirements:
|
101
|
-
- - "
|
116
|
+
- - "~>"
|
102
117
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
118
|
+
version: '2.0'
|
104
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
120
|
requirements:
|
106
121
|
- - ">="
|