booking-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/console +1 -1
- data/booking.gemspec +2 -2
- data/lib/{booking.rb → booking_api.rb} +4 -4
- data/lib/{booking → booking_api}/client.rb +2 -2
- data/lib/{booking → booking_api}/http_service.rb +3 -3
- data/lib/booking_api/version.rb +3 -0
- metadata +6 -6
- data/lib/booking/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef8c7070028d583ac2dd113f97288c42f27b3788
|
4
|
+
data.tar.gz: 1dd7debcff3725741cc20011ccbad30db22700bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e4a754093b5e8c2e97a908d1b2d1a50397d9ece269c5f7c196d671acb634010141d61c46964559a230919ca970b781591c3dbdeb2fa790a1a6e49af7bcc9b92
|
7
|
+
data.tar.gz: cab3957f5b0c125ba7cba9a3772845d1f89fca8558250e8e75bc478b80618f414967447f4cf7f632ba8a6619a73390f97a8b619e678d8c833c18e2e4b83bbe43
|
data/README.md
CHANGED
@@ -23,8 +23,8 @@ Or install it yourself as:
|
|
23
23
|
Initialize the the gem by setting your username and password:
|
24
24
|
|
25
25
|
```
|
26
|
-
|
27
|
-
|
26
|
+
BookingApi.username = 'your-username'
|
27
|
+
BookingApi.password = 'your-password'
|
28
28
|
```
|
29
29
|
|
30
30
|
Right now only one endpoint is supported.
|
@@ -35,7 +35,7 @@ params = {
|
|
35
35
|
checkout: (Time.now + (60 * 60 * 24 * 7 * 2)).strftime("%F"),
|
36
36
|
hotel_ids: [303762]
|
37
37
|
}
|
38
|
-
response =
|
38
|
+
response = BookingApi::Client.new.get_hotel_availabillity(request_parameters: params)
|
39
39
|
|
40
40
|
# the parsed response is in the body
|
41
41
|
=> response.body
|
data/bin/console
CHANGED
data/booking.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'booking_api/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "booking-ruby"
|
8
|
-
spec.version =
|
8
|
+
spec.version = BookingApi::VERSION
|
9
9
|
spec.authors = ["Hendrik Kleinwaechter"]
|
10
10
|
spec.email = ["hendrik.kleinwaechter@gmail.com"]
|
11
11
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require "faraday"
|
2
2
|
require "faraday_middleware"
|
3
3
|
require "json"
|
4
|
-
require "
|
5
|
-
require "
|
6
|
-
require "
|
4
|
+
require "booking_api/version"
|
5
|
+
require "booking_api/client"
|
6
|
+
require "booking_api/http_service"
|
7
7
|
|
8
|
-
module
|
8
|
+
module BookingApi
|
9
9
|
|
10
10
|
class << self
|
11
11
|
attr_accessor :username, :password
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module BookingApi
|
2
2
|
class Client
|
3
3
|
|
4
4
|
def initialize
|
@@ -29,7 +29,7 @@ params = {
|
|
29
29
|
checkout: (Time.now + (60 * 60 * 24 * 7 * 2)).strftime("%F"),
|
30
30
|
hotel_ids: [303762]
|
31
31
|
}
|
32
|
-
response =
|
32
|
+
response = BookingApi::Client.new.get_hotel_availabillity(request_parameters: params)
|
33
33
|
|
34
34
|
puts response.body
|
35
35
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: booking-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Kleinwaechter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,10 +96,10 @@ files:
|
|
96
96
|
- bin/console
|
97
97
|
- bin/setup
|
98
98
|
- booking.gemspec
|
99
|
-
- lib/
|
100
|
-
- lib/
|
101
|
-
- lib/
|
102
|
-
- lib/
|
99
|
+
- lib/booking_api.rb
|
100
|
+
- lib/booking_api/client.rb
|
101
|
+
- lib/booking_api/http_service.rb
|
102
|
+
- lib/booking_api/version.rb
|
103
103
|
homepage: https://github.com/hendricius/booking
|
104
104
|
licenses:
|
105
105
|
- MIT
|
data/lib/booking/version.rb
DELETED