travel_time 0.3.1 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ede2b3ca9b12f1d411227a72ecf78374b4c2e2440bd554750de51b5aa828c841
4
- data.tar.gz: 37aec14a1fd0e9c09cd8d101dbbad7cc297b60abc27a596b980cd9884e64ebf7
3
+ metadata.gz: f6711d01c7b8c3c6803f0c4e82c5754918c160ea7e0077a0c773fe84c15705f1
4
+ data.tar.gz: 1c7e9520650b1d77140f6a36f76f14d7f952d22a038c9e6ba692d09b340a8ea0
5
5
  SHA512:
6
- metadata.gz: 64831cb1d98876a2aab320c84dfc5b59ed27174c319810bac81800da4fd1a2a9cab0330737b393fd27fc7737cd44c0ccc8d14effbcea342bacbfdaf1f68b9da5
7
- data.tar.gz: 923ac3cea840237a5e35eb8e4333cec5f84eea8b267851131a246b5f70841a7866205d236f53bbd7c084e10e97680054f275b6a8faf16eb9c73882a099407a01
6
+ metadata.gz: 6437d4f698d3ef410e3483c178992d0f15233113d94b989c0f0d23c4d43f08d8dac72fe59841d77c6bfdf6388f0f38dec62cf8fd3580036d167eab924877cb6b
7
+ data.tar.gz: fd7a853cf20380365981cb20420a52317acccab62cc0f23af73991d7b2f4a9045c209f6c87de5646cb2bb8a529180a3e1f978fcf3160d72a1b4b3a30919827d6
data/README.md CHANGED
@@ -37,10 +37,10 @@ end
37
37
  After that, you can instantiate a client to initiate the API connection:
38
38
 
39
39
  ```ruby
40
- client = TimeTravel::Client.new
40
+ client = TravelTime::Client.new
41
41
  ```
42
42
 
43
- You can then use the clint to call API endpoints:
43
+ You can then use the client to call API endpoints:
44
44
 
45
45
  ```ruby
46
46
  response = client.map_info
@@ -387,13 +387,6 @@ Currently only supports United Kingdom.
387
387
  ```ruby
388
388
  require 'time'
389
389
 
390
- TravelTime.configure do |config|
391
- config.application_id = 'YOUR_API_ID'
392
- config.api_key = 'YOUR_API_KEY'
393
- end
394
-
395
- client = TravelTime::Client.new
396
-
397
390
  departure_search = {
398
391
  id: 'public transport from Trafalgar Square',
399
392
  departure_time: Time.now.iso8601,
@@ -494,4 +487,4 @@ a GitHub Action which will push the `.gem` file to [rubygems.org](https://rubyge
494
487
 
495
488
  ## Contributing
496
489
 
497
- Bug reports and pull requests are welcome on GitHub at https://github.com/traveltime-dev/travel_time.
490
+ Bug reports and pull requests are welcome on GitHub at https://github.com/traveltime-dev/travel_time.
@@ -43,11 +43,13 @@ module TravelTime
43
43
  perform_request { connection.post('supported-locations', { locations: locations }) }
44
44
  end
45
45
 
46
- def geocoding(query:, within_country: nil, exclude: nil, limit: nil, force_postcode: nil, bounds: nil)
46
+ def geocoding(query:, within_country: nil, format_name: nil, exclude: nil, limit: nil, force_postcode: nil,
47
+ bounds: nil)
47
48
  query = {
48
49
  query: query,
49
50
  'within.country': within_country,
50
- 'exclude.location.types': exclude,
51
+ 'format.name': format_name,
52
+ 'format.exclude.country': exclude,
51
53
  limit: limit,
52
54
  'force.add.postcode': force_postcode,
53
55
  bounds: bounds ? bounds.join(',') : nil
@@ -65,14 +67,14 @@ module TravelTime
65
67
  perform_request { connection.get('geocoding/reverse', query) }
66
68
  end
67
69
 
68
- def time_map(departure_searches: nil, arrival_searches: nil, unions: nil, intersections: nil)
70
+ def time_map(departure_searches: nil, arrival_searches: nil, unions: nil, intersections: nil, format: nil)
69
71
  payload = {
70
72
  departure_searches: departure_searches,
71
73
  arrival_searches: arrival_searches,
72
74
  unions: unions,
73
75
  intersections: intersections
74
76
  }.compact
75
- perform_request { connection.post('time-map', payload) }
77
+ perform_request { connection.post('time-map', payload, { 'Accept' => format }) }
76
78
  end
77
79
 
78
80
  def time_filter(locations:, departure_searches: nil, arrival_searches: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TravelTime
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travel_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TravelTime Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-19 00:00:00.000000000 Z
11
+ date: 2022-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable