park_info 0.5.1 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc828a45edca48d377b936afbaa9afed86203114b4791f0e516e562ffd8f216a
4
- data.tar.gz: 48ecbcae8e7e5d3a9de74fde1c81641ea4ccb32cfc9bbb4b7380bb3e9a99a1fd
3
+ metadata.gz: 66bc614ce31491fcc2d042937e84df1c1f13d9c34e9a920c95379792cf5aa6f8
4
+ data.tar.gz: e9cd8f1a2bafb4d3b5466324be368c3cdf2e089c0030f647d74e923343dbf5b1
5
5
  SHA512:
6
- metadata.gz: 57d33e75ff3d763fb4b3b10efccb7f7eea1d4f7733039e51d3eed2b888a8c478b1ccb073e9ffda1e70b6b89b3ffa85b329a7021d69d5da6a6c6c96fafc68329d
7
- data.tar.gz: b6f22370c32562cfdb30799166132f634dcc6c443c407175079c7fcf09d0f1df6ab9ac6964486f1a141c2a1591c1bf419784a68f5d2cd010b2520f7a78085f94
6
+ metadata.gz: 8dece4d97418de3bbd4b34faace78a3670e8aa48469bab00212eec5b88a111bde68aca8596bd79c1c1eb2f7d539dd68120ceb83acd4195ed700c0b4ea34bb185
7
+ data.tar.gz: 6b081c50221aee608ba6c8f20f4d1cd4356dfc661596e8cc36eec0a95fa97afee8ea5d20ce15b3a3d4c0e7d57d0077d51328faed99f0f31a7cbd7b4aefbb0920
data/README.md CHANGED
@@ -41,3 +41,7 @@ Currently, the data is cached locally for 5 minutes.
41
41
  - Hollywood Studios (`ParkInfo::DisneyWorld::HollywoodStudios`)
42
42
  - Magic Kingdom (`ParkInfo::DisneyWorld:MagicKingdom`)
43
43
 
44
+ * Disneyland
45
+ - California Adventure (`ParkInfo::Disneyland::CaliforniaAdventure`)
46
+ - Disneyland Park (`ParkInfo::Disneyland::DisneylandPark`)
47
+
data/lib/disney/disney.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/disney_base'
2
2
  require File.dirname(__FILE__) + '/disney_resort'
3
3
  require File.dirname(__FILE__) + '/disney_attraction'
4
- require File.dirname(__FILE__) + '/disney_world'
4
+ require File.dirname(__FILE__) + '/disney_world'
5
+ require File.dirname(__FILE__) + '/disneyland'
@@ -7,8 +7,7 @@ module ParkInfo
7
7
 
8
8
  def wait_times
9
9
  if wait_times_timed_out
10
- url = "facility-service/theme-parks/#{park_id};destination=#{resort_id}/wait-times"
11
- @data = get(url)
10
+ @data = get(wait_times_url)
12
11
  @wait_times_timeout = Time.now + CACHE_TIMEOUT
13
12
  end
14
13
  @data
@@ -22,8 +21,12 @@ module ParkInfo
22
21
  @attractions
23
22
  end
24
23
 
25
- def facilities_info
26
- url = "mobile-service/public/destinations/#{resort_id};entityType=destination/facilities?region=#{region}"
24
+ def wait_times_url
25
+ "facility-service/theme-parks/#{park_id};destination=#{resort_id}/wait-times"
26
+ end
27
+
28
+ def facilities_info_url
29
+ "mobile-service/public/destinations/#{resort_id};entityType=destination/facilities?region=#{region}"
27
30
  end
28
31
 
29
32
  def resort_id
@@ -0,0 +1,20 @@
1
+ module ParkInfo
2
+ class Disneyland
3
+ class DisneylandBase < DisneyResort
4
+ RESORT_ID = "80008297";
5
+ REGION = "us";
6
+
7
+ def wait_times_url
8
+ "facility-service/theme-parks/#{park_id}/wait-times"
9
+ end
10
+ end
11
+
12
+ class CaliforniaAdventure < DisneylandBase
13
+ PARK_ID = "336894";
14
+ end
15
+
16
+ class DisneylandPark < DisneylandBase
17
+ PARK_ID = "330339";
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ module ParkInfo
2
+ class DisneylandParis
3
+ class MagicKingdom < DisneyResort
4
+ RESORT_ID = "dlp";
5
+ PARK_ID = "P1";
6
+ REGION = "fr";
7
+ end
8
+
9
+ class WaltDisneyStudios < DisneyResort
10
+ RESORT_ID = "dlp";
11
+ PARK_ID = "P2";
12
+ REGION = "fr";
13
+ end
14
+ end
15
+ end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ParkInfo
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: park_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Fordham
@@ -11,9 +11,9 @@ cert_chain: []
11
11
  date: 2019-06-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
- <p>This is a *very* simple library to access information about theme parks.</p>
14
+ This is a *very* simple library to access information about theme parks.
15
15
 
16
- <p>Currently, it is only handling Disney parks, but I plan to add others quickly.</p>
16
+ Currently, it is only handling Disney parks, but I plan to add others quickly.
17
17
  email: bfordham@gmail.com
18
18
  executables: []
19
19
  extensions: []
@@ -26,6 +26,8 @@ files:
26
26
  - lib/disney/disney_base.rb
27
27
  - lib/disney/disney_resort.rb
28
28
  - lib/disney/disney_world.rb
29
+ - lib/disney/disneyland.rb
30
+ - lib/disney/disneyland_paris.rb
29
31
  - lib/park_info.rb
30
32
  - lib/version.rb
31
33
  homepage: https://github.com/mnmlst-sftwr/park-info