yellow-api-wrapper 0.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 +7 -0
- data/.autotest +1 -0
- data/.gitignore +42 -0
- data/.travis.yml +29 -0
- data/Appraisals +30 -0
- data/Gemfile +5 -0
- data/LICENSE.md +20 -0
- data/README.md +54 -0
- data/Rakefile +20 -0
- data/gemfiles/rails_3.0.gemfile +8 -0
- data/gemfiles/rails_3.0.gemfile.lock +150 -0
- data/gemfiles/rails_3.1.gemfile +8 -0
- data/gemfiles/rails_3.1.gemfile.lock +161 -0
- data/gemfiles/rails_3.2.gemfile +8 -0
- data/gemfiles/rails_3.2.gemfile.lock +159 -0
- data/gemfiles/rails_4.0.gemfile +8 -0
- data/gemfiles/rails_4.0.gemfile.lock +147 -0
- data/gemfiles/rails_4.1.gemfile +8 -0
- data/gemfiles/rails_4.1.gemfile.lock +151 -0
- data/gemfiles/rails_4.2.gemfile +8 -0
- data/gemfiles/rails_4.2.gemfile.lock +176 -0
- data/gemfiles/rails_5.0.gemfile +8 -0
- data/gemfiles/rails_5.0.gemfile.lock +185 -0
- data/gemfiles/ruby.gemfile +7 -0
- data/gemfiles/ruby.gemfile.lock +96 -0
- data/lib/yellow_api.rb +25 -0
- data/lib/yellow_api/client.rb +33 -0
- data/lib/yellow_api/client/connection.rb +22 -0
- data/lib/yellow_api/client/find_business.rb +31 -0
- data/lib/yellow_api/client/find_dealer.rb +27 -0
- data/lib/yellow_api/client/get_business_details.rb +67 -0
- data/lib/yellow_api/client/get_type_ahead.rb +28 -0
- data/lib/yellow_api/client/request.rb +24 -0
- data/lib/yellow_api/config.rb +71 -0
- data/lib/yellow_api/version.rb +3 -0
- data/spec/fixtures/find_business.json +1 -0
- data/spec/fixtures/find_dealer.json +1 -0
- data/spec/fixtures/get_business_details.json +1 -0
- data/spec/fixtures/get_type_ahead.json +1 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business.yml +207 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_format_for_businesses.yml +209 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_number_of_businesses.yml +209 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_format_for_businesses.yml +178 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_number_of_businesses.yml +178 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_gets_the_language.yml +738 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_returns_the_correct_number_of_businesses.yml +81 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_parses_the_special_characters.yml +213 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_format_for_businesses.yml +211 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_number_of_businesses.yml +213 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer.yml +45 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer/should_return_the_correct_parent_business.yml +43 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_business.yml +52 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_format.yml +52 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead.yml +50 -0
- data/spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead/should_return_suggestions.yml +50 -0
- data/spec/helper.rb +45 -0
- data/spec/yellow_api/client_spec.rb +15 -0
- data/spec/yellow_api/find_business_spec.rb +89 -0
- data/spec/yellow_api/find_dealer_spec.rb +20 -0
- data/spec/yellow_api/get_business_details_spec.rb +21 -0
- data/spec/yellow_api/get_type_ahead_spec.rb +19 -0
- data/spec/yellow_api_spec.rb +9 -0
- data/yellow_api.gemspec +29 -0
- metadata +289 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.sandbox.yellowapi.com/GetTypeAhead/?UID=asdf&apikey=<YELLOW_API_KEY>&field=WHAT&fmt=JSON&lang=en&text=au
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Date:
|
24
|
+
- Mon, 02 May 2016 18:33:11 GMT
|
25
|
+
Server:
|
26
|
+
- Mashery Proxy
|
27
|
+
Set-Cookie:
|
28
|
+
- TS01ce8515=010e4950d5319d1580540cb7056cf1ed477967b1aecd2f2a8b5c4373f203630ab1732c176804d8cc534d1a01b0ab51372ea8f34b3c;
|
29
|
+
Path=/
|
30
|
+
- f5avrbbbbbbbbbbbbbbbb=BDGLIGOAPEBNCJNPFAACPHCFGNDGCIECGNCDNIGJNEGDAMJKFLFAFKJCKDIALKIFELAPKIOHJKNLELKKNJEIJAABGFKIOPLDIMNFFDOOIKFIGONALADBLNDEANMLIEEK;
|
31
|
+
HttpOnly
|
32
|
+
X-Mashery-Responder:
|
33
|
+
- prod-j-worker-us-east-1e-126.mashery.com
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: '{"suggestedValues":[{"value":"Auto Repair Garage","type":"s","alt":"Auto
|
41
|
+
Repair Garage","code":""},{"value":"Auto Body Repair & Painting Shops","type":"s","alt":"Auto
|
42
|
+
Body Repair & Painting Shops","code":""},{"value":"Auto Scrap Yard","type":"s","alt":"Auto
|
43
|
+
Scrap Yard","code":""},{"value":"Auto Glass & Windshields","type":"s","alt":"Auto
|
44
|
+
Glass & Windshields","code":""},{"value":"Audiologist","type":"s","alt":"Audiologist","code":""},{"value":"Auditoriums
|
45
|
+
& Halls","type":"s","alt":"Auditoriums & Halls","code":""},{"value":"Auto
|
46
|
+
Parts","type":"s","alt":"Auto Parts","code":""},{"value":"Auto Repair","type":"s","alt":"Auto
|
47
|
+
Repair","code":""},{"value":"Auctioneer","type":"s","alt":"Auctioneer","code":""},{"value":"Auction","type":"s","alt":"Auction","code":""}]}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Mon, 02 May 2016 18:33:12 GMT
|
50
|
+
recorded_with: VCR 3.0.1
|
data/spec/helper.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', __FILE__)
|
2
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
require 'yellow_api'
|
6
|
+
require 'rspec'
|
7
|
+
require 'pry'
|
8
|
+
require 'vcr'
|
9
|
+
require 'webmock/rspec'
|
10
|
+
require 'active_support/all'
|
11
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
12
|
+
|
13
|
+
VCR.configure do |config|
|
14
|
+
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
15
|
+
config.hook_into :webmock
|
16
|
+
config.filter_sensitive_data('<YELLOW_API_KEY>') { ENV['YELLOW_API_KEY'] }
|
17
|
+
end
|
18
|
+
|
19
|
+
RSpec.configure do |config|
|
20
|
+
# Add VCR to all tests
|
21
|
+
config.around(:each) do |example|
|
22
|
+
options = example.metadata[:vcr] || {}
|
23
|
+
if options[:record] == :skip
|
24
|
+
VCR.turned_off(&example)
|
25
|
+
else
|
26
|
+
sleep 2
|
27
|
+
name = example.metadata[:full_description]
|
28
|
+
.split(/\s+/, 2)
|
29
|
+
.join('/')
|
30
|
+
.underscore
|
31
|
+
.tr('.', '/')
|
32
|
+
.gsub(%r{[^\w/]+}, '_')
|
33
|
+
.gsub(%r{/$}, '')
|
34
|
+
VCR.use_cassette(name, options, &example)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def fixture_path
|
40
|
+
File.expand_path('../fixtures', __FILE__)
|
41
|
+
end
|
42
|
+
|
43
|
+
def fixture(file)
|
44
|
+
File.new(fixture_path + '/' + file)
|
45
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe YellowApi::Client do
|
4
|
+
let(:apikey) { 'd34q3259tezev7rdjkfwhw7d' }
|
5
|
+
|
6
|
+
subject { YellowApi::Client.new(apikey: apikey) }
|
7
|
+
|
8
|
+
it 'has a uid' do
|
9
|
+
expect(subject.uid).to_not be_nil
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'accepts a id as param' do
|
13
|
+
expect(YellowApi::Client.new(apikey: apikey, uid: 'asdf').uid).to eq 'asdf'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
RSpec.describe YellowApi::Client::FindBusiness do
|
4
|
+
let(:apikey) { ENV['YELLOW_API_KEY'] }
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = YellowApi::Client.new(apikey: apikey, uid: 'asdf')
|
8
|
+
@client.sandbox_enabled = true
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.find_business' do
|
12
|
+
subject { @client.find_business('barber', 'Canada') }
|
13
|
+
|
14
|
+
it 'returns the correct number of businesses' do
|
15
|
+
expect(subject.summary.listingsPerPage).to eq 15
|
16
|
+
expect(subject.listings.count).to eq 15
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'returns the correct format for businesses' do
|
20
|
+
expect(subject.listings).to be_an Array
|
21
|
+
expect(subject.listings).to all(be_a Hash)
|
22
|
+
expect(subject.listings).to all have_key 'id'
|
23
|
+
expect(subject.listings).to all have_key 'name'
|
24
|
+
expect(subject.listings).to all have_key 'address'
|
25
|
+
end
|
26
|
+
|
27
|
+
it { is_expected.to be_a Hash }
|
28
|
+
|
29
|
+
context 'With special characters' do
|
30
|
+
subject { @client.find_business('h%C3%B4tels', 'Montreal') }
|
31
|
+
|
32
|
+
it 'returns the correct number of businesses' do
|
33
|
+
expect(subject.summary.listingsPerPage).to eq 15
|
34
|
+
expect(subject.summary.page_count).to eq 70
|
35
|
+
expect(subject.summary.total_listings).to eq 1039
|
36
|
+
expect(subject.listings.count).to eq 15
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'returns the correct format for businesses' do
|
40
|
+
expect(subject.listings).to be_an Array
|
41
|
+
expect(subject.listings).to all(be_a Hash)
|
42
|
+
expect(subject.listings).to all have_key 'id'
|
43
|
+
expect(subject.listings).to all have_key 'name'
|
44
|
+
expect(subject.listings).to all have_key 'address'
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'parses the special characters' do
|
48
|
+
expect(subject.summary.what).to eq "hôtels"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'with lat-lon where' do
|
53
|
+
subject { @client.find_business('taco restaurant', 'cZ-73.61995,45.49981') }
|
54
|
+
|
55
|
+
it 'returns the correct number of businesses' do
|
56
|
+
expect(subject.summary.page_count).to eq 1
|
57
|
+
expect(subject.summary.total_listings).to eq 12
|
58
|
+
expect(subject.listings.count).to eq 12
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'returns the correct format for businesses' do
|
62
|
+
expect(subject.listings).to be_an Array
|
63
|
+
expect(subject.listings).to all(be_a Hash)
|
64
|
+
expect(subject.listings).to all have_key 'id'
|
65
|
+
expect(subject.listings).to all have_key 'name'
|
66
|
+
expect(subject.listings).to all have_key 'address'
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context 'with options' do
|
71
|
+
subject { @client.find_business('hôtels', 'Montreal', pgLen: 3, pg: 2) }
|
72
|
+
|
73
|
+
it 'returns the correct number of businesses' do
|
74
|
+
expect(subject.summary.page_count).to eq 347
|
75
|
+
expect(subject.summary.first_listing).to eq 4
|
76
|
+
expect(subject.summary.listings_per_page).to eq 3
|
77
|
+
expect(subject.listings.count).to eq 3
|
78
|
+
expect(subject.summary.current_page).to eq 2
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'gets the language' do
|
82
|
+
en = @client.find_business('hôtels', 'Montreal', pgLen: 30, pg: 2, lang: 'en')
|
83
|
+
fr = @client.find_business('hôtels', 'Montreal', pgLen: 30, pg: 2, lang: 'fr')
|
84
|
+
expect(fr.summary).to eq en.summary
|
85
|
+
expect(fr.listings).to_not match_array en.listings
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe YellowApi::Client::FindDealer do
|
4
|
+
let(:apikey) { ENV['YELLOW_API_KEY'] }
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = YellowApi::Client.new(apikey: apikey, uid: 'asdf')
|
8
|
+
@client.sandbox_enabled = true
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.find_dealer' do
|
12
|
+
subject { @client.find_dealer(6_418_182, pgLen: 1) }
|
13
|
+
|
14
|
+
it 'should return the correct parent business' do
|
15
|
+
expect(subject.listings.first.parentId).to eq '6418182'
|
16
|
+
end
|
17
|
+
|
18
|
+
it { is_expected.to be_a Hash }
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
RSpec.describe YellowApi::Client::GetBusinessDetails do
|
4
|
+
let(:apikey) { ENV['YELLOW_API_KEY'] }
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = YellowApi::Client.new(apikey: apikey, uid: 'asdf')
|
8
|
+
@client.sandbox_enabled = true
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.get_business_details' do
|
12
|
+
subject { @client.get_business_details('Ile-du-Prince-Edouard', 'Co-operators-The', 6_418_182, city: 'Calgary') }
|
13
|
+
it 'returns the correct business' do
|
14
|
+
expect(subject.id).to eq '6418182'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns the correct format' do
|
18
|
+
expect(subject).to be_a Hash
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe YellowApi::Client::GetTypeAhead do
|
4
|
+
let(:apikey) { ENV['YELLOW_API_KEY'] }
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = YellowApi::Client.new(apikey: apikey, uid: 'asdf')
|
8
|
+
@client.sandbox_enabled = true
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.get_type_ahead' do
|
12
|
+
subject { @client.get_type_ahead('au', :what) }
|
13
|
+
it 'should return suggestions' do
|
14
|
+
expect(subject.length).to be > 0
|
15
|
+
end
|
16
|
+
|
17
|
+
it { is_expected.to be_a Hash }
|
18
|
+
end
|
19
|
+
end
|
data/yellow_api.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.expand_path('../lib/yellow_api/version', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = 'yellow-api-wrapper'
|
5
|
+
gem.version = YellowApi::VERSION
|
6
|
+
gem.licenses = ['MIT']
|
7
|
+
gem.authors = ['Ian Bishop', 'Sophie Déziel']
|
8
|
+
gem.email = 'courrier@sophiedeziel.com'
|
9
|
+
gem.homepage = 'https://github.com/sophiedeziel/yellow_api'
|
10
|
+
gem.summary = "Wrapper for the YellowPages' Yellow API"
|
11
|
+
gem.description = "Ruby wrapper for the YellowPages' Yellow API based on Ian Bishop's yellow_api gem"
|
12
|
+
|
13
|
+
gem.files = `git ls-files`.split("\n")
|
14
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
16
|
+
gem.require_paths = ['lib']
|
17
|
+
|
18
|
+
gem.add_development_dependency 'rake', '~> 0.9'
|
19
|
+
gem.add_development_dependency 'rspec', '~> 3.4'
|
20
|
+
gem.add_development_dependency 'simplecov', '>= 0.5.0'
|
21
|
+
gem.add_development_dependency 'webmock', '~> 1.8.0'
|
22
|
+
gem.add_development_dependency 'yard', '~> 0.7'
|
23
|
+
gem.add_development_dependency 'vcr', '~> 3.0'
|
24
|
+
gem.add_development_dependency 'pry', '~> 0.10.3'
|
25
|
+
gem.add_runtime_dependency 'faraday_middleware', '>= 0.7.0'
|
26
|
+
gem.add_runtime_dependency 'rash', '~> 0.4.0'
|
27
|
+
gem.add_runtime_dependency 'uuid', '~> 2.3.5'
|
28
|
+
gem.add_runtime_dependency 'activesupport', '>= 3.0.0'
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,289 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yellow-api-wrapper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ian Bishop
|
8
|
+
- Sophie Déziel
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0.9'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0.9'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rspec
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '3.4'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3.4'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: simplecov
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.5.0
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.5.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: webmock
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.8.0
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.8.0
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: yard
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.7'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0.7'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: vcr
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '3.0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3.0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: pry
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.10.3
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.10.3
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: faraday_middleware
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 0.7.0
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.7.0
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rash
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 0.4.0
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.4.0
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: uuid
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: 2.3.5
|
147
|
+
type: :runtime
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 2.3.5
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: activesupport
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 3.0.0
|
161
|
+
type: :runtime
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 3.0.0
|
168
|
+
description: Ruby wrapper for the YellowPages' Yellow API based on Ian Bishop's yellow_api
|
169
|
+
gem
|
170
|
+
email: courrier@sophiedeziel.com
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files: []
|
174
|
+
files:
|
175
|
+
- ".autotest"
|
176
|
+
- ".gitignore"
|
177
|
+
- ".travis.yml"
|
178
|
+
- Appraisals
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE.md
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- gemfiles/rails_3.0.gemfile
|
184
|
+
- gemfiles/rails_3.0.gemfile.lock
|
185
|
+
- gemfiles/rails_3.1.gemfile
|
186
|
+
- gemfiles/rails_3.1.gemfile.lock
|
187
|
+
- gemfiles/rails_3.2.gemfile
|
188
|
+
- gemfiles/rails_3.2.gemfile.lock
|
189
|
+
- gemfiles/rails_4.0.gemfile
|
190
|
+
- gemfiles/rails_4.0.gemfile.lock
|
191
|
+
- gemfiles/rails_4.1.gemfile
|
192
|
+
- gemfiles/rails_4.1.gemfile.lock
|
193
|
+
- gemfiles/rails_4.2.gemfile
|
194
|
+
- gemfiles/rails_4.2.gemfile.lock
|
195
|
+
- gemfiles/rails_5.0.gemfile
|
196
|
+
- gemfiles/rails_5.0.gemfile.lock
|
197
|
+
- gemfiles/ruby.gemfile
|
198
|
+
- gemfiles/ruby.gemfile.lock
|
199
|
+
- lib/yellow_api.rb
|
200
|
+
- lib/yellow_api/client.rb
|
201
|
+
- lib/yellow_api/client/connection.rb
|
202
|
+
- lib/yellow_api/client/find_business.rb
|
203
|
+
- lib/yellow_api/client/find_dealer.rb
|
204
|
+
- lib/yellow_api/client/get_business_details.rb
|
205
|
+
- lib/yellow_api/client/get_type_ahead.rb
|
206
|
+
- lib/yellow_api/client/request.rb
|
207
|
+
- lib/yellow_api/config.rb
|
208
|
+
- lib/yellow_api/version.rb
|
209
|
+
- spec/fixtures/find_business.json
|
210
|
+
- spec/fixtures/find_dealer.json
|
211
|
+
- spec/fixtures/get_business_details.json
|
212
|
+
- spec/fixtures/get_type_ahead.json
|
213
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business.yml
|
214
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_format_for_businesses.yml
|
215
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_number_of_businesses.yml
|
216
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_format_for_businesses.yml
|
217
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_number_of_businesses.yml
|
218
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_gets_the_language.yml
|
219
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_returns_the_correct_number_of_businesses.yml
|
220
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_parses_the_special_characters.yml
|
221
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_format_for_businesses.yml
|
222
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_number_of_businesses.yml
|
223
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer.yml
|
224
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer/should_return_the_correct_parent_business.yml
|
225
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_business.yml
|
226
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_format.yml
|
227
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead.yml
|
228
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead/should_return_suggestions.yml
|
229
|
+
- spec/helper.rb
|
230
|
+
- spec/yellow_api/client_spec.rb
|
231
|
+
- spec/yellow_api/find_business_spec.rb
|
232
|
+
- spec/yellow_api/find_dealer_spec.rb
|
233
|
+
- spec/yellow_api/get_business_details_spec.rb
|
234
|
+
- spec/yellow_api/get_type_ahead_spec.rb
|
235
|
+
- spec/yellow_api_spec.rb
|
236
|
+
- yellow_api.gemspec
|
237
|
+
homepage: https://github.com/sophiedeziel/yellow_api
|
238
|
+
licenses:
|
239
|
+
- MIT
|
240
|
+
metadata: {}
|
241
|
+
post_install_message:
|
242
|
+
rdoc_options: []
|
243
|
+
require_paths:
|
244
|
+
- lib
|
245
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - ">="
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
255
|
+
requirements: []
|
256
|
+
rubyforge_project:
|
257
|
+
rubygems_version: 2.4.8
|
258
|
+
signing_key:
|
259
|
+
specification_version: 4
|
260
|
+
summary: Wrapper for the YellowPages' Yellow API
|
261
|
+
test_files:
|
262
|
+
- spec/fixtures/find_business.json
|
263
|
+
- spec/fixtures/find_dealer.json
|
264
|
+
- spec/fixtures/get_business_details.json
|
265
|
+
- spec/fixtures/get_type_ahead.json
|
266
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business.yml
|
267
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_format_for_businesses.yml
|
268
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_number_of_businesses.yml
|
269
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_format_for_businesses.yml
|
270
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_number_of_businesses.yml
|
271
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_gets_the_language.yml
|
272
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_returns_the_correct_number_of_businesses.yml
|
273
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_parses_the_special_characters.yml
|
274
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_format_for_businesses.yml
|
275
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_number_of_businesses.yml
|
276
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer.yml
|
277
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer/should_return_the_correct_parent_business.yml
|
278
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_business.yml
|
279
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_format.yml
|
280
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead.yml
|
281
|
+
- spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead/should_return_suggestions.yml
|
282
|
+
- spec/helper.rb
|
283
|
+
- spec/yellow_api/client_spec.rb
|
284
|
+
- spec/yellow_api/find_business_spec.rb
|
285
|
+
- spec/yellow_api/find_dealer_spec.rb
|
286
|
+
- spec/yellow_api/get_business_details_spec.rb
|
287
|
+
- spec/yellow_api/get_type_ahead_spec.rb
|
288
|
+
- spec/yellow_api_spec.rb
|
289
|
+
has_rdoc:
|