useless-wait-list 0.0.3 → 0.0.4
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 +4 -4
- data/lib/useless/wait_list.rb +52 -2
- data/useless-wait-list.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166323991a40e1597674dafc34683bed1f5b8c55
|
4
|
+
data.tar.gz: d6213514a0bb186ebc019c7cd66f005c715a0b9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2f4d3ff35dbfd64cd6246668775f96be766e9e308159d34b1f0c8ab8abbbf521c8c317cbb6fea110e1bb558eaca33f9c408f4606ebd0e37ef82b0ea68fdd3e
|
7
|
+
data.tar.gz: a4b34eab291f3631d962736181c494b60808fec1c60dcda1b0abdc0d76991dca1d769a6ca02fad2b8ec8a61f0079b3dfa56a08d47b6c3f8606422f44622e85be
|
data/lib/useless/wait_list.rb
CHANGED
@@ -80,8 +80,8 @@ module Useless
|
|
80
80
|
DESC
|
81
81
|
end
|
82
82
|
|
83
|
-
doc.get '/
|
84
|
-
description 'Search by geolocation and party size'
|
83
|
+
doc.get '/wait_lists' do
|
84
|
+
description 'Search for wait lists by geolocation and party size'
|
85
85
|
|
86
86
|
authentication_required false
|
87
87
|
|
@@ -101,6 +101,7 @@ module Useless
|
|
101
101
|
attribute 'page', 'The page of results that was returned'
|
102
102
|
attribute 'total', 'The total number of wait lists matching the parameters'
|
103
103
|
attribute 'wait_lists', 'The list of wait lists matching the parameters, for the current page', type: 'array[object]' do
|
104
|
+
attribute 'id', 'The unique ID of the wait list.', type: 'string'
|
104
105
|
attribute 'restaurant', 'The restaurant associated with the wait list', type: 'object' do
|
105
106
|
attribute 'id', 'The unique ID of the restaurant', type: 'string'
|
106
107
|
attribute 'name', 'The name of the restaurant', type: 'string'
|
@@ -120,5 +121,54 @@ module Useless
|
|
120
121
|
response 422, 'Invalid table_size - must be an integer greater than zero'
|
121
122
|
response 422, 'Invalid page - must be an integer greater than zero'
|
122
123
|
end
|
124
|
+
|
125
|
+
get '/wait_lists' do
|
126
|
+
[501, 'Not yet implemented']
|
127
|
+
end
|
128
|
+
|
129
|
+
doc.post '/wait_lists' do
|
130
|
+
description 'Create a new wait list'
|
131
|
+
|
132
|
+
authentication_required true
|
133
|
+
|
134
|
+
body do
|
135
|
+
content_type 'application/json'
|
136
|
+
|
137
|
+
attribute 'restaurant_id', 'The ID of the restaurant to which the wait list should be added.',
|
138
|
+
type: 'string', required: true
|
139
|
+
attribute 'table_size', 'The party size that can be accomodated by the tables on this wait list',
|
140
|
+
type: 'integer', required: true
|
141
|
+
attribute 'table_quantity', 'The number of tables available on this wait list. ' +
|
142
|
+
'This number is used to determine the estimated_seating_time', type: 'integer', required: false
|
143
|
+
attribute 'seating_start', 'When the first resevation will be seated. Also used to determine the ' +
|
144
|
+
'estimated_seating_time', type: 'timestamp', required: false, default: '[now]'
|
145
|
+
attribute 'reservations_start', 'When reservations will be accepted for this wait list',
|
146
|
+
type: 'timestamp', required: false, default: '[now]'
|
147
|
+
attribute 'reservations_end', 'When this wait list close and stop accepting reservations',
|
148
|
+
type: 'timestamp', required: false
|
149
|
+
attribute 'maximum_reservations', 'The total number of reservations that will be accepted before ' +
|
150
|
+
'the wait list closes', type: 'integer', required: false
|
151
|
+
end
|
152
|
+
|
153
|
+
response 201, 'The wait list was successfully created' do
|
154
|
+
header 'Location', 'The location of the newly created wait list'
|
155
|
+
end
|
156
|
+
|
157
|
+
response 401, 'Request must be authenticated'
|
158
|
+
response 401, 'The user is not authorized to manage the specified restaurant'
|
159
|
+
response 422, 'restaurant_id or table_size was omitted'
|
160
|
+
response 404, 'The specified restaurant_id could not be found'
|
161
|
+
response 422, 'Invalid table_size - must be an integer greater than zero'
|
162
|
+
response 422, 'Invalid table_quantity - must be an integer greater than zero'
|
163
|
+
response 422, 'Invalid seating_start - must be a timestamp in ISO 8601 format'
|
164
|
+
response 422, 'Invalid reservations_start - must be a timestamp in ISO 8601 format'
|
165
|
+
response 422, 'Invalid reservations_end - must be a timestamp in ISO 8601 format, ' +
|
166
|
+
'greater than reservation_start'
|
167
|
+
response 422, 'Invalid maximum_reservations - must be an integer greater than zero'
|
168
|
+
end
|
169
|
+
|
170
|
+
post '/wait_lists' do
|
171
|
+
[501, 'Not yet implemented']
|
172
|
+
end
|
123
173
|
end
|
124
174
|
end
|
data/useless-wait-list.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'useless-wait-list'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.4'
|
8
8
|
spec.authors = ['Kevin Hyland']
|
9
9
|
spec.email = ['khy@me.com']
|
10
10
|
spec.summary = 'For restaurants that don\'t take reservations'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: useless-wait-list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Hyland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|