skyscanner 0.1 → 0.2.0
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.md +4 -2
- data/lib/skyscanner.rb +1 -1
- data/skyscanner.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ced354e2a4a8d69517a1b6500c01d1dcf92ae88
|
4
|
+
data.tar.gz: 775201c9023d6f8380d84d2306af7024ddc3d1dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889b1afc6fd8b8e8dca9966cd175313dc78893d7796629492f50f2bbecec74084ec798a949cff6b015f9d6c0c688be4da143581a24f613bdb3cfe6ff937cfc80
|
7
|
+
data.tar.gz: 86e6385f6827da3eec7c6977cc025b8c5752b6c7845f91f4bf69216ef018ccb51a5182bc6af19248b7a2c4c3ca676626697b11f8232c0c159a96e6d4cd4b8fb6
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
skyscanner
|
2
2
|
==========
|
3
3
|
|
4
|
-
A Ruby wrapper for the Skyscanner API.
|
4
|
+
A Ruby wrapper for the Skyscanner API. See http://business.skyscanner.net/portal/en-GB/AffiliateNetwork and
|
5
|
+
http://business.skyscanner.net/portal/en-GB/Documentation/Api for official documentation.
|
5
6
|
|
6
7
|
|
7
8
|
Installation
|
@@ -33,11 +34,12 @@ Each of the four endpoints can be accessed with a class method reflecting the en
|
|
33
34
|
Options can be passed in a hash to these methods and they will be included in the request.
|
34
35
|
|
35
36
|
## Example from: http://www.skyscanneraffiliate.net/portal/en-GB/US/BrowseCache/BrowseQuotes
|
36
|
-
Skyscanner::
|
37
|
+
Skyscanner::Connection.browse_quotes({ :country => "GB", :currency => "GBP", :locale => "en-GB", :originPlace => "UK", :destinationPlace => "anywhere", :outboundPartialDate => "anytime", :inboundPartialDate => "anytime" })
|
37
38
|
# => GET http://partners.api.skyscanner.net/apiservices/browsequotes/v1.0/GB/GBP/en-GB/UK/anywhere/anytime/anytime?apiKey=prtl6749387986743898559646983194
|
38
39
|
|
39
40
|
There are a number of class level options that can be overridden.
|
40
41
|
|
42
|
+
Skyscanner::Connection.apikey # the default API Key
|
41
43
|
Skyscanner::Connection.adapter # the Faraday adapter to use (default: :net_http)
|
42
44
|
Skyscanner::Connection.logger # a Logger object for logging requests (default: nil)
|
43
45
|
Skyscanner::Connection.protocol # http or https (default: :http)
|
data/lib/skyscanner.rb
CHANGED
@@ -118,7 +118,7 @@ module Skyscanner
|
|
118
118
|
|
119
119
|
# request('skyscannerredirect', segments, params)
|
120
120
|
# Life isn't that easy - in this case the constructed URL is what we return
|
121
|
-
ret = builder("
|
121
|
+
ret = builder("referral", segments_to_path(segments, params), params.clone)
|
122
122
|
"#{ret[0]}?apiKey=#{api_key}"
|
123
123
|
end
|
124
124
|
|
data/skyscanner.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "skyscanner"
|
5
|
-
gem.version = "0.
|
5
|
+
gem.version = "0.2.0"
|
6
6
|
gem.authors = ["Alex Beregszaszi"]
|
7
7
|
gem.email = ["alex@rtfs.hu"]
|
8
8
|
gem.description = "A Ruby wrapper for the Skyscanner API. See http://www.skyscanneraffiliate.net/portal/en-GB/US/api/overview for the official documentation."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skyscanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Beregszaszi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|