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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6a2b7e3c34b5cb2cc3f37cc4392106749ee9c1e
4
- data.tar.gz: 9a43ef251476b92c2a4afc37f6e5bfd86041a059
3
+ metadata.gz: ef8c7070028d583ac2dd113f97288c42f27b3788
4
+ data.tar.gz: 1dd7debcff3725741cc20011ccbad30db22700bb
5
5
  SHA512:
6
- metadata.gz: 388b2ae2bac0f2786d28c464ac6f7464d4b60ea126f4a449aa2ef91735114c3440012451b12815edc82a6a94aa1bb7a5bcdd54c0d5bba806603b201b22e1fc03
7
- data.tar.gz: 5f0a989ffb3db6d6c3325aca7d423dfdaa81be43e93b68dcef96715130da5a07ea817b21d15803c3351e04698466f0260018c58a61286142605b4f73c8a8228a
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
- Booking.username = 'your-username'
27
- Booking.password = 'your-password'
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 = Booking::Client.new.get_hotel_availabillity(request_parameters: params)
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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "booking"
4
+ require "booking_api"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -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 'booking/version'
4
+ require 'booking_api/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "booking-ruby"
8
- spec.version = Booking::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 "booking/version"
5
- require "booking/client"
6
- require "booking/http_service"
4
+ require "booking_api/version"
5
+ require "booking_api/client"
6
+ require "booking_api/http_service"
7
7
 
8
- module Booking
8
+ module BookingApi
9
9
 
10
10
  class << self
11
11
  attr_accessor :username, :password
@@ -1,4 +1,4 @@
1
- module Booking
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 = Booking::Client.new.get_hotel_availabillity(request_parameters: params)
32
+ response = BookingApi::Client.new.get_hotel_availabillity(request_parameters: params)
33
33
 
34
34
  puts response.body
35
35
  {
@@ -1,8 +1,8 @@
1
- module Booking
1
+ module BookingApi
2
2
  class HttpService
3
3
  def initialize
4
- @auth_username = Booking.username
5
- @auth_password = Booking.password
4
+ @auth_username = BookingApi.username
5
+ @auth_password = BookingApi.password
6
6
  end
7
7
 
8
8
  def connection
@@ -0,0 +1,3 @@
1
+ module BookingApi
2
+ VERSION = "0.1.2"
3
+ end
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.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-21 00:00:00.000000000 Z
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/booking.rb
100
- - lib/booking/client.rb
101
- - lib/booking/http_service.rb
102
- - lib/booking/version.rb
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
@@ -1,3 +0,0 @@
1
- module Booking
2
- VERSION = "0.1.1"
3
- end