centaman 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -6
  3. data/lib/centaman/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 346951239d8d7ce42e7a21d378f6c05548e8fb1a
4
- data.tar.gz: 49024f7fe2429951476d5d95e2553386411bbfbc
3
+ metadata.gz: 60b36486d591b1b3c1e2aefc10c00c6b5411b2c4
4
+ data.tar.gz: 63238c5bf788e3c2db1aff88c8359db8834f36d8
5
5
  SHA512:
6
- metadata.gz: d55b12e7d7d027dcfef8918d18eeb008af1400d7b23b05fa338582cffbc8829ed28b21816027dd1eebcfb01507f9390d8bdd64441d0259fa8ab679c59d0dbacd
7
- data.tar.gz: 04af5d088e7c0a6a902599b078d1a2b0233c4a3c76c47638002e45a64b0b45f12be44909cd1d8527c5e3d81be739656d764b1e637f6200ae3a2f64acd6c95af7
6
+ metadata.gz: 75cc2bfd6a061e2a7fbee528de18a11444e7a0ebba2ef5550781913541b14451fa6f406d58d357d1eb919c4e279ed5c7fa06564a31647d5c263a78cce376a0bb
7
+ data.tar.gz: 8dd3c2a6f0cddf2255afb9231e118a834d619ade49dc6ce11db5afcf28225f98b6e389fc7911e55d715f58937f04431fb26dfda91c709b7103b198aaee0a6ac5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Centaman
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/centaman`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A wrapper for the Centaman Ticketing API.
4
4
 
5
5
  TODO: Delete this and the text above, and describe your gem
6
6
 
@@ -22,16 +22,41 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ Retrieve Booking Type Objects for a certain date
26
+ - Defaults to current date if no date parameters given
27
+ ```ruby
28
+ Centaman::Service::BookingType.new(start_date: DATE, end_date: DATE).objects
29
+ ```
30
+
31
+ Find a Booking Type
32
+ - Requires the booking type id (integer) and date
33
+ ```ruby
34
+ Centaman::Service::BookingType.find(BOOKING_TYPE_ID, DATE)
35
+ ```
36
+
37
+ Retrieve Booking Time Objects for a Booking Type
38
+ - Requires the associated booking_type_id (integer)
39
+ - start_date && end_date required to retrieve booking times for a specific date, else defaults to current date
40
+ ```ruby
41
+ Centaman::Service::BookingTime.new(booking_type_id: ID, start_date: DATE, end_date: DATE).objects
42
+ ```
43
+
44
+ Find a Booking Time
45
+ - Requires the associated booking type id (integer), booking time id (integer), and date
46
+ ```ruby
47
+ Centaman::Service::BookingTime.find(BOOKING_TYPE_ID, BOOKING_TIME_ID, DATE)
48
+ ```
49
+
26
50
 
27
51
  ## Required Environment Variables
28
52
 
29
53
  This gem assumes the following environment variables are defined by the application
30
54
 
31
- - CENTAMAN_API_URL (Centaman API endpoint, ex: https://taxi.centaman.net/CentamanAPI)
32
- - CENTAMAN_API_USERNAME (Centaman API username)
33
- - CENTAMAN_API_PASSWORD (Centaman API password)
34
- - FIXIE_URL (Optional. Used with FIXIE proxy to route outbound requests through a set of static IP addresses)
55
+ - CENTAMAN_API_URL
56
+ - CENTAMAN_API_USERNAME
57
+ - CENTAMAN_API_PASSWORD
58
+ - CENTAMAN_API_TOKEN (Optional. Required if CENTAMAN_API_USERNAME and CENTAMAN_API_PASSWORD are not provided.)
59
+ - FIXIE_URL (Optional. Used with FIXIE proxy to route outbound requests through a set of static IP addresses.)
35
60
 
36
61
  ## Development
37
62
 
@@ -1,3 +1,3 @@
1
1
  module Centaman
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: centaman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - francirp