lws 0.4.2 → 6.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -2
- data/bin/lwsconsole +32 -35
- data/lib/lws/auth.rb +425 -152
- data/lib/lws/corporate_website.rb +186 -68
- data/lib/lws/digital_signage.rb +1796 -0
- data/lib/lws/generic.rb +46 -50
- data/lib/lws/maps.rb +84 -38
- data/lib/lws/presence.rb +93 -73
- data/lib/lws/stubbing.rb +2 -2
- data/lib/lws/ticket.rb +230 -177
- data/lib/lws/version.rb +2 -2
- data/lib/lws.rb +66 -25
- data/lws.gemspec +3 -2
- data/test/api_token_middleware_test.rb +4 -4
- data/test/auth_test.rb +95 -8
- data/test/corporate_website_test.rb +44 -2
- data/test/digital_signage_test.rb +829 -0
- data/test/fixtures/auth.yml +4 -1
- data/test/fixtures/permissions.yml +0 -4
- data/test/generic_test.rb +0 -17
- data/test/json_parser_test.rb +57 -0
- data/test/logger_test.rb +2 -1
- data/test/maps_test.rb +22 -1
- data/test/presence_test.rb +18 -18
- data/test/setup_test.rb +5 -0
- data/test/stubbing_test.rb +4 -2
- data/test/test_helper.rb +3 -2
- data/test/ticket_test.rb +59 -44
- metadata +43 -24
@@ -0,0 +1,1796 @@
|
|
1
|
+
#
|
2
|
+
# Copyright © 2017 LeftClick B.V.
|
3
|
+
#
|
4
|
+
# This software is property of LeftClick B.V. and cannot be redistributed
|
5
|
+
# and/or modified without permission. The software or any of its parts
|
6
|
+
# cannot be used for any other purposes than the LeftClick services and
|
7
|
+
# only during a valid license subscription. For more information, please
|
8
|
+
# contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
|
9
|
+
# Netherlands, info@leftclick.eu, +31492-782120.
|
10
|
+
|
11
|
+
|
12
|
+
# = The digital_signage app module
|
13
|
+
module LWS::DigitalSignage
|
14
|
+
|
15
|
+
# :nocov:
|
16
|
+
unless defined? ENDPOINT
|
17
|
+
# The API endpoint for the digital signage app
|
18
|
+
ENDPOINT = { production: "https://cm.leftclick.cloud/" ,
|
19
|
+
development: "https://cm-dev.leftclick.cloud/" }
|
20
|
+
end
|
21
|
+
# :nocov:
|
22
|
+
|
23
|
+
# @!visibility private
|
24
|
+
def self.api
|
25
|
+
LWS.setup_api(LWS.config.endpoints[:digital_signage] ||
|
26
|
+
ENDPOINT[LWS.config.environment])
|
27
|
+
end
|
28
|
+
|
29
|
+
### Generic classes
|
30
|
+
|
31
|
+
# (see Generic::Configuration)
|
32
|
+
class Configuration < LWS::Generic::Configuration
|
33
|
+
use_api LWS::DigitalSignage.api
|
34
|
+
end
|
35
|
+
|
36
|
+
### App specific classes
|
37
|
+
|
38
|
+
# = The channel class
|
39
|
+
class Channel < LWS::Generic::Model
|
40
|
+
use_api LWS::DigitalSignage.api
|
41
|
+
|
42
|
+
# @!attribute id [r]
|
43
|
+
# @return [Fixnum] the (unique) ID of the channel
|
44
|
+
attribute :id
|
45
|
+
|
46
|
+
# @!attribute company
|
47
|
+
# @return [LWS::Auth::Company] the company the channel belongs to
|
48
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
49
|
+
|
50
|
+
# @!attribute company_id
|
51
|
+
# @return [Fixnum] the ID of the company the channel belongs to
|
52
|
+
attribute :company_id
|
53
|
+
|
54
|
+
# @!attribute display
|
55
|
+
# @return [Display] the display of the channel
|
56
|
+
belongs_to :display, class_name: "LWS::DigitalSignage::Display"
|
57
|
+
# :nocov:
|
58
|
+
def display
|
59
|
+
# Create a dummy method so that the original #display method is not used
|
60
|
+
association(:display).load
|
61
|
+
end
|
62
|
+
# :nocov:
|
63
|
+
|
64
|
+
# @!attribute display_id
|
65
|
+
# @return [Fixnum] the ID of the display of the channel
|
66
|
+
attribute :display_id
|
67
|
+
|
68
|
+
# @!attribute groups
|
69
|
+
# @return [Array<Channel::Group>] the groups the channel is a member of
|
70
|
+
has_many :groups, class_name: "LWS::DigitalSignage::Channel::Group"
|
71
|
+
|
72
|
+
# @!attribute name
|
73
|
+
# @return [String] the name of the channel
|
74
|
+
attribute :name
|
75
|
+
|
76
|
+
# @!attribute orientation
|
77
|
+
# @return ["normal", "left", "right", "inverted"] the orientation of
|
78
|
+
# the channel
|
79
|
+
attribute :orientation
|
80
|
+
|
81
|
+
# @!attribute players
|
82
|
+
# @return [Array<Player>] the players linked to the channel
|
83
|
+
has_many :players, class_name: "LWS::DigitalSignage::Player"
|
84
|
+
|
85
|
+
# @!attribute tags
|
86
|
+
# @return [Array<Channel::Tag>] the tags of the channel
|
87
|
+
has_many :tags, class_name: "LWS::DigitalSignage::Channel::Tag"
|
88
|
+
|
89
|
+
# @!attribute time_schedule
|
90
|
+
# @return [Channel::TimeSchedule] the time schedule of the channel
|
91
|
+
belongs_to :time_schedule, class_name: "LWS::DigitalSignage::Channel::TimeSchedule",
|
92
|
+
uri: "channel/time_schedules/:id"
|
93
|
+
|
94
|
+
# @!attribute time_schedule_id
|
95
|
+
# @return [Fixnum] the ID of the time schedule of the channel
|
96
|
+
attribute :time_schedule_id
|
97
|
+
|
98
|
+
# @!attribute time_schedule_overrides
|
99
|
+
# @return [Array<Channel::TimeScheduleOverride>] the time schedule
|
100
|
+
# overrides of the channel
|
101
|
+
has_many :time_schedule_overrides, class_name: "LWS::DigitalSignage::Channel::TimeScheduleOverride"
|
102
|
+
|
103
|
+
# @!attribute time_zone
|
104
|
+
# @return [String] the time zone for the channel
|
105
|
+
attribute :time_zone
|
106
|
+
|
107
|
+
# @!attribute created_at [r]
|
108
|
+
# @return [String] the timestamp of when the channel was created
|
109
|
+
attribute :created_at
|
110
|
+
|
111
|
+
# @!attribute updated_at [r]
|
112
|
+
# @return [String] the timestamp of when the channel was last updated
|
113
|
+
attribute :updated_at
|
114
|
+
end
|
115
|
+
|
116
|
+
# = The channel group class
|
117
|
+
class Channel::Group < LWS::Generic::Model
|
118
|
+
use_api LWS::DigitalSignage.api
|
119
|
+
uri "channel/groups/(:id)"
|
120
|
+
|
121
|
+
# @!attribute id [r]
|
122
|
+
# @return [Fixnum] the (unique) ID of the channel group
|
123
|
+
attribute :id
|
124
|
+
|
125
|
+
# @!attribute channels
|
126
|
+
# @return [Array<Channel>] the channels that are part of the channel group
|
127
|
+
has_many :channels, class_name: "LWS::DigitalSignage::Channel",
|
128
|
+
uri: "channel/groups/:group_id/channels"
|
129
|
+
|
130
|
+
# @!attribute company
|
131
|
+
# @return [LWS::Auth::Company] the company the channel group belongs to
|
132
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
133
|
+
|
134
|
+
# @!attribute company_id
|
135
|
+
# @return [Fixnum] the ID of the company the channel group belongs to
|
136
|
+
attribute :company_id
|
137
|
+
|
138
|
+
# @!attribute name
|
139
|
+
# @return [String] the name of the channel group
|
140
|
+
attribute :name
|
141
|
+
|
142
|
+
# @!attribute parent
|
143
|
+
# @return [Channel::Group, nil] the parent group of the channel group
|
144
|
+
belongs_to :parent, class_name: "LWS::DigitalSignage::Channel::Group",
|
145
|
+
foreign_key: "parent_id",
|
146
|
+
uri: "channel/groups/:id"
|
147
|
+
|
148
|
+
# @!attribute parent_id
|
149
|
+
# @return [Fixnum, nil] the ID of the parent group of the channel group
|
150
|
+
attribute :parent_id
|
151
|
+
|
152
|
+
#@!attribute tags
|
153
|
+
# @return [Array<Channel::Group::Tag>] the tags of the channel group
|
154
|
+
has_many :tags, class_name: "LWS::DigitalSignage::Channel::Group::Tag",
|
155
|
+
uri: "channel/groups/:group_id/tags"
|
156
|
+
|
157
|
+
# @!attribute time_schedule_overrides
|
158
|
+
# @return [Array<Channel::TimeScheduleOverride>] the time schedule overrides of the channel group
|
159
|
+
has_many :time_schedule_overrides, class_name: "LWS::DigitalSignage::Channel::TimeScheduleOverride",
|
160
|
+
uri: "channel/groups/:group_id/time_schedule_overrides"
|
161
|
+
|
162
|
+
# @!attribute created_at [r]
|
163
|
+
# @return [String] the timestamp of when the channel group was created
|
164
|
+
attribute :created_at
|
165
|
+
|
166
|
+
# @!attribute updated_at [r]
|
167
|
+
# @return [String] the timestamp of when the channel group was last updated
|
168
|
+
attribute :updated_at
|
169
|
+
end
|
170
|
+
|
171
|
+
# = The channel group tag class
|
172
|
+
#
|
173
|
+
# @note
|
174
|
+
# This class is only used within the context of the {Channel::Group}
|
175
|
+
# class.
|
176
|
+
class Channel::Group::Tag < LWS::Generic::Model
|
177
|
+
use_api LWS::DigitalSignage.api
|
178
|
+
|
179
|
+
# @!attribute id [r]
|
180
|
+
# @return [Fixnum] the (unique) ID of the display
|
181
|
+
attribute :id
|
182
|
+
|
183
|
+
# @!attribute group
|
184
|
+
# @return [Channel::Group] the channel group associated with the tag
|
185
|
+
belongs_to :group, class_names: "LWS::DigitalSignage::Channel::Group",
|
186
|
+
uri: "channel/groups/:id"
|
187
|
+
|
188
|
+
# @!attribute group_id
|
189
|
+
# @return [Fixnum] the ID of the channel group associated with the tag
|
190
|
+
attribute :group_id
|
191
|
+
|
192
|
+
# @!attribute key
|
193
|
+
# @return [String] the key of the channel group tag
|
194
|
+
attribute :key
|
195
|
+
|
196
|
+
# @!attribute protected_value
|
197
|
+
# @return [Boolean] whether the value of the channel group tag should
|
198
|
+
# return a protected representation of the value
|
199
|
+
attribute :protected_value
|
200
|
+
|
201
|
+
# @!attribute value
|
202
|
+
# @return [String, nil] the value of the channel group tag
|
203
|
+
attribute :value
|
204
|
+
|
205
|
+
# @!attribute created_at [r]
|
206
|
+
# @return [String] the timestamp of when the channel group was created
|
207
|
+
attribute :created_at
|
208
|
+
|
209
|
+
# @!attribute updated_at [r]
|
210
|
+
# @return [String] the timestamp of when the channel group was last updated
|
211
|
+
attribute :updated_at
|
212
|
+
end
|
213
|
+
|
214
|
+
# = The channel tag class
|
215
|
+
#
|
216
|
+
# @note
|
217
|
+
# This class is only used within the context of the {Channel} class.
|
218
|
+
class Channel::Tag < LWS::Generic::Model
|
219
|
+
use_api LWS::DigitalSignage.api
|
220
|
+
|
221
|
+
# @!attribute id [r]
|
222
|
+
# @return [Fixnum] the (unique) ID of the channel tag
|
223
|
+
attribute :id
|
224
|
+
|
225
|
+
# @!attribute channel
|
226
|
+
# @return [Channel] the channel associated with the tag
|
227
|
+
belongs_to :channel, class_name: "LWS::DigitalSignage::Channel"
|
228
|
+
|
229
|
+
# @!attribute channel_id
|
230
|
+
# @return [Fixnum] the ID of the channel associated with the tag
|
231
|
+
attribute :channel_id
|
232
|
+
|
233
|
+
# @!attribute key
|
234
|
+
# @return [String] the key of the channel tag
|
235
|
+
attribute :key
|
236
|
+
|
237
|
+
# @!attribute protected_value
|
238
|
+
# @return [Boolean] whether the value of the channel tag should
|
239
|
+
# return a protected representation of the value
|
240
|
+
attribute :protected_value
|
241
|
+
|
242
|
+
# @!attribute value
|
243
|
+
# @return [String, nil] the value of the channel tag
|
244
|
+
attribute :value
|
245
|
+
|
246
|
+
# @!attribute created_at [r]
|
247
|
+
# @return [String] the timestamp of when the channel was created
|
248
|
+
attribute :created_at
|
249
|
+
|
250
|
+
# @!attribute updated_at [r]
|
251
|
+
# @return [String] the timestamp of when the channel was last updated
|
252
|
+
attribute :updated_at
|
253
|
+
end
|
254
|
+
|
255
|
+
# = The channel time schedule class
|
256
|
+
class Channel::TimeSchedule < LWS::Generic::Model
|
257
|
+
use_api LWS::DigitalSignage.api
|
258
|
+
uri "channel/time_schedules/(:id)"
|
259
|
+
|
260
|
+
# @!attribute id [r]
|
261
|
+
# @return [Fixnum] the (unique) ID of the channel time schedule
|
262
|
+
attribute :id
|
263
|
+
|
264
|
+
# @!attribute company
|
265
|
+
# @return [LWS::Auth::Company] the company the channel time schedule belongs to
|
266
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
267
|
+
|
268
|
+
# @!attribute company_id
|
269
|
+
# @return [Fixnum] the ID of the company the channel time schedule belongs to
|
270
|
+
attribute :company_id
|
271
|
+
|
272
|
+
# @!attribute channels
|
273
|
+
# @return [Array<Channel>] the channels using the time schedule
|
274
|
+
has_many :channels, class_name: "LWS::DigitalSignage::Channel",
|
275
|
+
uri: "channel/time_schedules/:time_schedule_id/channels"
|
276
|
+
|
277
|
+
# @!attribute days
|
278
|
+
# @return [Array<Channel::TimeSchedule::Day>] the days included in the
|
279
|
+
# channel time schedule
|
280
|
+
has_many :days, class_name: "LWS::DigitalSignage::Channel::TimeSchedule::Day",
|
281
|
+
uri: "channel/time_schedules/:time_schedule_id/days"
|
282
|
+
|
283
|
+
# @!attribute name
|
284
|
+
# @return [String] the name of the channel time schedule
|
285
|
+
attribute :name
|
286
|
+
|
287
|
+
# @!attribute created_at [r]
|
288
|
+
# @return [String] the timestamp of when the channel time schedule was created
|
289
|
+
attribute :created_at
|
290
|
+
|
291
|
+
# @!attribute updated_at [r]
|
292
|
+
# @return [String] the timestamp of when the channel time schedule was last updated
|
293
|
+
attribute :updated_at
|
294
|
+
end
|
295
|
+
|
296
|
+
# = The channel time schedule day class
|
297
|
+
#
|
298
|
+
# @note
|
299
|
+
# This class is only used within the context of the {Channel::TimeSchedule}
|
300
|
+
# class.
|
301
|
+
class Channel::TimeSchedule::Day < LWS::Generic::Model
|
302
|
+
use_api LWS::DigitalSignage.api
|
303
|
+
uri "channel/time_schedules/:time_schedule_id/days/(:id)"
|
304
|
+
|
305
|
+
# @!attribute id [r]
|
306
|
+
# @return [Fixnum] the (unique) ID of the channel time schedule day
|
307
|
+
attribute :id
|
308
|
+
|
309
|
+
# @!attribute day
|
310
|
+
# @return [Fixnum] the ID of the day of the channel time schedule
|
311
|
+
# (0 = Sunday, 1 = Monday, ..., 6 = Saturday)
|
312
|
+
attribute :day
|
313
|
+
|
314
|
+
# @!attribute shutdown
|
315
|
+
# @return [String] the shutdown time of the channel
|
316
|
+
attribute :shutdown
|
317
|
+
|
318
|
+
# @!attribute time_schedule
|
319
|
+
# @return [Channel::TimeSchedule] the time schedule the day belongs to
|
320
|
+
belongs_to :time_schedule, class_name: "LWS::DigitalSignage::Channel::TimeSchedule",
|
321
|
+
uri: "channel/time_schedules/:id"
|
322
|
+
|
323
|
+
# @!attribute time_schedule_id
|
324
|
+
# @return [Fixnum] the ID of the time schedule the day belongs to
|
325
|
+
attribute :time_schedule_id
|
326
|
+
|
327
|
+
# @!attribute wakeup
|
328
|
+
# @return [String] the wakeup time of the channel
|
329
|
+
attribute :wakeup
|
330
|
+
|
331
|
+
# @!attribute created_at [r]
|
332
|
+
# @return [String] the timestamp of when the channel time schedule day was created
|
333
|
+
attribute :created_at
|
334
|
+
|
335
|
+
# @!attribute updated_at [r]
|
336
|
+
# @return [String] the timestamp of when the channel time schedule day was last updated
|
337
|
+
attribute :updated_at
|
338
|
+
end
|
339
|
+
|
340
|
+
# = The channel time override schedule class
|
341
|
+
class Channel::TimeScheduleOverride < LWS::Generic::Model
|
342
|
+
use_api LWS::DigitalSignage.api
|
343
|
+
uri "channel/time_schedule_overrides/(:id)"
|
344
|
+
|
345
|
+
# @!attribute id [r]
|
346
|
+
# @return [Fixnum] the (unique) ID of the channel time schedule override
|
347
|
+
attribute :id
|
348
|
+
|
349
|
+
# @!attribute channels
|
350
|
+
# @return [Array<Channel>] the channels using the time schedule override
|
351
|
+
has_many :channels, class_name: "LWS::DigitalSignage::Channel",
|
352
|
+
uri: "channel/time_schedule_overrides/:time_schedule_override_id/channels"
|
353
|
+
|
354
|
+
# @!attribute company
|
355
|
+
# @return [LWS::Auth::Company] the company the channel time schedule override belongs to
|
356
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
357
|
+
|
358
|
+
# @!attribute company_id
|
359
|
+
# @return [Fixnum] the ID of the company the channel time schedule override belongs to
|
360
|
+
attribute :company_id
|
361
|
+
|
362
|
+
# @!attribute end
|
363
|
+
# @return [String] the end date (inclusive) of the channel time schedule override
|
364
|
+
attribute :end
|
365
|
+
|
366
|
+
# @!attribute channel_groups
|
367
|
+
# @return [Array<Channel::Group>] the channel groups using the time schedule override
|
368
|
+
has_many :groups, class_name: "LWS::DigitalSignage::Channel::Group",
|
369
|
+
uri: "channel/time_schedule_overrides/:time_schedule_override_id/groups"
|
370
|
+
|
371
|
+
# @!attribute name
|
372
|
+
# @return [String] the name of the channel time schedule override
|
373
|
+
attribute :name
|
374
|
+
|
375
|
+
# @!attribute shutdown
|
376
|
+
# @return [String] the shutdown time of the channel
|
377
|
+
attribute :shutdown
|
378
|
+
|
379
|
+
# @!attribute start
|
380
|
+
# @return [String] the start date of the channel time schedule override
|
381
|
+
attribute :start
|
382
|
+
|
383
|
+
# @!attribute wakeup
|
384
|
+
# @return [String] the wakeup time of the channel
|
385
|
+
attribute :wakeup
|
386
|
+
|
387
|
+
# @!attribute created_at [r]
|
388
|
+
# @return [String] the timestamp of when the channel time schedule override was created
|
389
|
+
attribute :created_at
|
390
|
+
|
391
|
+
# @!attribute updated_at [r]
|
392
|
+
# @return [String] the timestamp of when the channel time schedule override was last updated
|
393
|
+
attribute :updated_at
|
394
|
+
end
|
395
|
+
|
396
|
+
# = The display class
|
397
|
+
class Display < LWS::Generic::Model
|
398
|
+
use_api LWS::DigitalSignage.api
|
399
|
+
|
400
|
+
# @!attribute id [r]
|
401
|
+
# @return [Fixnum] the (unique) ID of the display
|
402
|
+
attribute :id
|
403
|
+
|
404
|
+
# @!attribute aspect_ratio
|
405
|
+
# @return [String, nil] the aspect ratio of the display
|
406
|
+
attribute :aspect_ratio
|
407
|
+
|
408
|
+
# @!attribute baud_rate
|
409
|
+
# @return [String] the baud rate of the RS232 connection to the display
|
410
|
+
attribute :baud_rate
|
411
|
+
|
412
|
+
# @!attribute channels
|
413
|
+
# @return [Array<Channel>] the channels using the display
|
414
|
+
has_many :channels, class_name: "LWS::DigitalSignage::Channel"
|
415
|
+
|
416
|
+
# @!attribute data_bits
|
417
|
+
# @return [String] the data bits setting of the RS232 connection to the display
|
418
|
+
attribute :data_bits
|
419
|
+
|
420
|
+
# @!attribute inputs
|
421
|
+
# @return [Array<Display::Input>] the inputs supported by the display
|
422
|
+
has_many :inputs, class_name: "LWS::DigitalSignage::Display::Input"
|
423
|
+
|
424
|
+
# @!attribute name
|
425
|
+
# @return [String] the name of the display
|
426
|
+
attribute :name
|
427
|
+
|
428
|
+
# @!attribute parity
|
429
|
+
# @return ["none", "odd", "even" "mark", "space"] the parity setting of
|
430
|
+
# the RS232 connection to the display
|
431
|
+
attribute :parity
|
432
|
+
|
433
|
+
# @!attribute power_on_command
|
434
|
+
# @return [String, nil] the command to turn the display on via the RS232 connection
|
435
|
+
attribute :power_on_command
|
436
|
+
|
437
|
+
# @!attribute power_on_feedback_command
|
438
|
+
# @return [String, nil] the feedback command to turn the display on via the RS232 connection
|
439
|
+
attribute :power_on_feedback_command
|
440
|
+
|
441
|
+
# @!attribute power_on_feedback_result
|
442
|
+
# @return [String, nil] the result of the feedback command to turn the display on via the RS232 connection
|
443
|
+
attribute :power_on_feedback_result
|
444
|
+
|
445
|
+
# @!attribute power_off_command
|
446
|
+
# @return [String, nil] the command to turn the display off via the RS232 connection
|
447
|
+
attribute :power_off_command
|
448
|
+
|
449
|
+
# @!attribute power_off_feedback_command
|
450
|
+
# @return [String, nil] the feedback command to turn the display off via the RS232 connection
|
451
|
+
attribute :power_off_feedback_command
|
452
|
+
|
453
|
+
# @!attribute power_off_feedback_result
|
454
|
+
# @return [String, nil] the result of the feedback command to turn the display off via the RS232 connection
|
455
|
+
attribute :power_off_feedback_result
|
456
|
+
|
457
|
+
# @!attribute resolutions
|
458
|
+
# @return [Array<Display::Resolution>] the resolutions supported by the display
|
459
|
+
has_many :resolutions, class_name: "LWS::DigitalSignage::Display::Resolution"
|
460
|
+
|
461
|
+
# @!attribute slug [r]
|
462
|
+
# @return [String] the slug(ified name) of the display
|
463
|
+
attribute :slug
|
464
|
+
|
465
|
+
# @!attribute stop_bits
|
466
|
+
# @return [String] the stop bits setting of the RS232 connection to the display
|
467
|
+
attribute :stop_bits
|
468
|
+
|
469
|
+
# @!attribute created_at [r]
|
470
|
+
# @return [String] the timestamp of when the display was created
|
471
|
+
attribute :created_at
|
472
|
+
|
473
|
+
# @!attribute updated_at [r]
|
474
|
+
# @return [String] the timestamp of when the display was last updated
|
475
|
+
attribute :updated_at
|
476
|
+
end
|
477
|
+
|
478
|
+
# = The display input class
|
479
|
+
#
|
480
|
+
# @note
|
481
|
+
# This class is only used within the context of the {Display} class.
|
482
|
+
class Display::Input < LWS::Generic::Model
|
483
|
+
use_api LWS::DigitalSignage.api
|
484
|
+
uri "displays/:display_id/inputs/(:id)"
|
485
|
+
|
486
|
+
# @!attribute id [r]
|
487
|
+
# @return [Fixnum] the (unique) ID of the display input
|
488
|
+
attribute :id
|
489
|
+
|
490
|
+
# @!attribute command
|
491
|
+
# @return [String, nil] the command to send to select the display input
|
492
|
+
attribute :command
|
493
|
+
|
494
|
+
# @!attribute display
|
495
|
+
# @return [Display] the display associated with the input
|
496
|
+
belongs_to :display, class_name: "LWS::DigitalSignage::Display"
|
497
|
+
# :nocov:
|
498
|
+
def display
|
499
|
+
# Create a dummy method so that the original #display method is not used
|
500
|
+
association(:display).load
|
501
|
+
end
|
502
|
+
# :nocov:
|
503
|
+
|
504
|
+
# @!attribute display_id
|
505
|
+
# @return [Fixnum] the ID of the display associated with the input
|
506
|
+
attribute :display_id
|
507
|
+
|
508
|
+
# @!attribute feedback_command
|
509
|
+
# @return [String, nil] the feedback command to check to the display input
|
510
|
+
attribute :feedback_command
|
511
|
+
|
512
|
+
# @!attribute feedback_result
|
513
|
+
# @return [String, nil] the result of the feedback command sent to check the display input
|
514
|
+
attribute :feedback_result
|
515
|
+
|
516
|
+
# @!attribute name
|
517
|
+
# @return [String] the name of the display input
|
518
|
+
attribute :name
|
519
|
+
|
520
|
+
# @!attribute created_at [r]
|
521
|
+
# @return [String] the timestamp of when the display input was created
|
522
|
+
attribute :created_at
|
523
|
+
|
524
|
+
# @!attribute updated_at [r]
|
525
|
+
# @return [String] the timestamp of when the display input was last updated
|
526
|
+
attribute :updated_at
|
527
|
+
end
|
528
|
+
|
529
|
+
# = The display resolution class
|
530
|
+
class Display::Resolution < LWS::Generic::Model
|
531
|
+
use_api LWS::DigitalSignage.api
|
532
|
+
uri "display/resolutions/(:id)"
|
533
|
+
|
534
|
+
# @!attribute id [r]
|
535
|
+
# @return [Fixnum] the (unique) ID of the display resolution
|
536
|
+
attribute :id
|
537
|
+
|
538
|
+
# @!attribute aspect_ratio [r]
|
539
|
+
# The aspect ratio is recalculated immediately when the width and/or
|
540
|
+
# height of the resolution changes.
|
541
|
+
#
|
542
|
+
# @return [String] the aspect ratio of the resolution
|
543
|
+
attribute :aspect_ratio
|
544
|
+
|
545
|
+
# @!attribute displays
|
546
|
+
# @return [Array<Display>] the displays supporting the display resolution
|
547
|
+
has_many :displays, class_name: "LWS::DigitalSignage::Display",
|
548
|
+
uri: "display/resolutions/:resolution_id/displays"
|
549
|
+
|
550
|
+
# @!attribute height
|
551
|
+
# @return [Fixnum] the height of the resolution
|
552
|
+
attribute :height
|
553
|
+
|
554
|
+
# @!attribute models
|
555
|
+
# @return [Array<Player::Model>] the player models that support the
|
556
|
+
# display resolution
|
557
|
+
has_many :models, class_name: "LWS::DigitalSignage::Player::Model",
|
558
|
+
uri: "display/resolutions/:resolution_id/models"
|
559
|
+
|
560
|
+
# @!attribute scanning_mode
|
561
|
+
# @return ["progressive", "interlaced"] the scanning mode setting of
|
562
|
+
# the display resolution
|
563
|
+
attribute :scanning_mode
|
564
|
+
|
565
|
+
# @!attribute width
|
566
|
+
# @return [Fixnum] the width of the resolution
|
567
|
+
attribute :width
|
568
|
+
|
569
|
+
# @!attribute created_at [r]
|
570
|
+
# @return [String] the timestamp of when the display resolution was created
|
571
|
+
attribute :created_at
|
572
|
+
|
573
|
+
# @!attribute updated_at [r]
|
574
|
+
# @return [String] the timestamp of when the display resolution was last updated
|
575
|
+
attribute :updated_at
|
576
|
+
end
|
577
|
+
|
578
|
+
# = The player class
|
579
|
+
class Player < LWS::Generic::Model
|
580
|
+
use_api LWS::DigitalSignage.api
|
581
|
+
|
582
|
+
# @!attribute id [r]
|
583
|
+
# @return [Fixnum] the (unique) ID of the player
|
584
|
+
attribute :id
|
585
|
+
|
586
|
+
# @!attribute channel
|
587
|
+
# @return [Channel] the channel of the player
|
588
|
+
belongs_to :channel, class_name: "LWS::DigitalSignage::Channel"
|
589
|
+
|
590
|
+
# @!attribute channel_id
|
591
|
+
# @return [Fixnum] the ID of the channel of the player
|
592
|
+
attribute :channel_id
|
593
|
+
|
594
|
+
# @!attribute company
|
595
|
+
# @return [LWS::Auth::Company] the company the player belongs to
|
596
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
597
|
+
|
598
|
+
# @!attribute company_id
|
599
|
+
# @return [Fixnum] the ID of the company the player belongs to
|
600
|
+
attribute :company_id
|
601
|
+
|
602
|
+
# @!attribute components
|
603
|
+
# @return [Array<Player::Component>] the components of the player
|
604
|
+
has_many :components, class_name: "LWS::DigitalSignage::Player::Component"
|
605
|
+
|
606
|
+
# @!attribute configuration
|
607
|
+
# @return [Player::Configuration] the configuration of the player
|
608
|
+
belongs_to :configuration, class_name: "LWS::DigitalSignage::Player::Configuration",
|
609
|
+
uri: "player/configurations/:id"
|
610
|
+
|
611
|
+
# @!attribute configuration_id
|
612
|
+
# @return [Fixnum] the ID of the configuration of the player
|
613
|
+
attribute :configuration_id
|
614
|
+
|
615
|
+
# @!attribute feedbacks
|
616
|
+
# @return [Array<Player::Feedback>] the feedbacks for the player
|
617
|
+
has_many :feedbacks, class_name: "LWS::DigitalSignage::Player::Feedback"
|
618
|
+
|
619
|
+
# @!attribute logs
|
620
|
+
# @return [Array<Player::Log>] the logs of the player
|
621
|
+
has_many :logs, class_name: "LWS::DigitalSignage::Player::Log"
|
622
|
+
|
623
|
+
# @!attribute mac_lan
|
624
|
+
# @return [String, nil] the MAC address of the LAN interface of the player
|
625
|
+
attribute :mac_lan
|
626
|
+
|
627
|
+
# @!attribute mac_wifi
|
628
|
+
# @return [String, nil] the MAC address of the Wi-Fi interface of the player
|
629
|
+
attribute :mac_wifi
|
630
|
+
|
631
|
+
# @!attribute model
|
632
|
+
# @return [Player::Model] the model of the player
|
633
|
+
belongs_to :model, class_name: "LWS::DigitalSignage::Player::Model",
|
634
|
+
uri: "player/models/:id"
|
635
|
+
|
636
|
+
# @!attribute model_id
|
637
|
+
# @return [Fixnum] the ID of the model of the player
|
638
|
+
attribute :model_id
|
639
|
+
|
640
|
+
# @!attribute notifications
|
641
|
+
# @return [Array<Player::Notification>] the notifications for the player
|
642
|
+
has_many :notifications, class_name: "LWS::DigitalSignage::Player::Notification"
|
643
|
+
|
644
|
+
# @!attribute operational_since
|
645
|
+
# @return [String, nil] the date/time when the player became operational
|
646
|
+
# for the first time
|
647
|
+
attribute :operational_since
|
648
|
+
|
649
|
+
# @!attribute parts
|
650
|
+
# @return [Array<Player::Component::Part>] the parts of the player
|
651
|
+
has_many :parts, class_name: "LWS::DigitalSignage::Player::Component::Part"
|
652
|
+
|
653
|
+
# @!attribute release_channel
|
654
|
+
# @return [Player::Os::ReleaseChannel] the player OS release channel used
|
655
|
+
# by the player
|
656
|
+
belongs_to :release_channel, class_name: "LWS::DigitalSignage::Player::Os::ReleaseChannel",
|
657
|
+
uri: "player/os/release_channels/:id"
|
658
|
+
|
659
|
+
# @!attribute release_channel_id
|
660
|
+
# @return [Fixnum] the ID of the player OS release channel used by the
|
661
|
+
# player
|
662
|
+
attribute :releasee_channel_id
|
663
|
+
|
664
|
+
# @!attribute requests
|
665
|
+
# @return [Array<Player::Feedback>] the requests for the player
|
666
|
+
has_many :requests, class_name: "LWS::DigitalSignage::Player::Request"
|
667
|
+
|
668
|
+
# @!attribute screenshots
|
669
|
+
# @return [Array<Player::Screenshot>] the screenshots of the player
|
670
|
+
has_many :screenshots, class_name: "LWS::DigitalSignage::Player::Screenshot"
|
671
|
+
|
672
|
+
# @!attribute serial_number [r]
|
673
|
+
# @return [String] the serial number of the player
|
674
|
+
attribute :serial_number
|
675
|
+
|
676
|
+
# @!attribute service
|
677
|
+
# @return [Boolean] whether the player is being serviced/is in service
|
678
|
+
attribute :service
|
679
|
+
|
680
|
+
# @!attribute status
|
681
|
+
# @return ["unknown", "good", "warning", "bad"] the player status
|
682
|
+
attribute :status
|
683
|
+
|
684
|
+
# @!attribute tags
|
685
|
+
# @return [Array<Player::Tag>] the tags of the player
|
686
|
+
has_many :tags, class_name: "LWS::DigitalSignage::Player::Tag"
|
687
|
+
|
688
|
+
# @!attribute created_at [r]
|
689
|
+
# @return [String] the timestamp of when the player was created
|
690
|
+
attribute :created_at
|
691
|
+
|
692
|
+
# @!attribute updated_at [r]
|
693
|
+
# @return [String] the timestamp of when the player was last updated
|
694
|
+
attribute :updated_at
|
695
|
+
end
|
696
|
+
|
697
|
+
# = The player component class
|
698
|
+
class Player::Component < LWS::Generic::Model
|
699
|
+
use_api LWS::DigitalSignage.api
|
700
|
+
uri "player/components/(:id)"
|
701
|
+
|
702
|
+
# @!attribute id [r]
|
703
|
+
# @return [Fixnum] the (unique) ID of the player component
|
704
|
+
attribute :id
|
705
|
+
|
706
|
+
# @!attribute description
|
707
|
+
# @return [String, nil] the description of the player component
|
708
|
+
attribute :description
|
709
|
+
|
710
|
+
# @!attribute models
|
711
|
+
# @return [Array<Player::Model>] the player models that use the component
|
712
|
+
has_many :models, class_name: "LWS::DigitalSignage::Player::Model",
|
713
|
+
uri: "player/components/:component_id/models"
|
714
|
+
|
715
|
+
# @!attribute name
|
716
|
+
# @return [String] the name of the player component
|
717
|
+
attribute :name
|
718
|
+
|
719
|
+
# @!attribute parts
|
720
|
+
# @return [Array<Player::Component::Part>] the parts the component is made out of
|
721
|
+
has_many :parts, class_name: "LWS::DigitalSignage::Player::Component::Part",
|
722
|
+
uri: "player/components/:component_id/parts"
|
723
|
+
|
724
|
+
# @!attribute slug [r]
|
725
|
+
# @return [String] the slug(ified name) of the player component
|
726
|
+
attribute :slug
|
727
|
+
|
728
|
+
# @!attribute supplier
|
729
|
+
# @return [LWS::Auth::Company] the supplier of the component part
|
730
|
+
belongs_to :supplier, class_name: "LWS::Auth::Company",
|
731
|
+
foreign_key: "supplier_id",
|
732
|
+
uri: "companies/:id"
|
733
|
+
|
734
|
+
# @!attribute supplier_id
|
735
|
+
# @return [Fixnum] the ID of the supplier of the component part
|
736
|
+
attribute :supplier_id
|
737
|
+
|
738
|
+
# @!attribute created_at [r]
|
739
|
+
# @return [String] the timestamp of when the player component was created
|
740
|
+
attribute :created_at
|
741
|
+
|
742
|
+
# @!attribute updated_at [r]
|
743
|
+
# @return [String] the timestamp of when the player component was last updated
|
744
|
+
attribute :updated_at
|
745
|
+
end
|
746
|
+
|
747
|
+
# = The player component part class
|
748
|
+
#
|
749
|
+
# @note
|
750
|
+
# This class is only used within the context of the {Player::Component}
|
751
|
+
# class.
|
752
|
+
class Player::Component::Part < LWS::Generic::Model
|
753
|
+
use_api LWS::DigitalSignage.api
|
754
|
+
uri "players/components/:component_id/parts/(:id)"
|
755
|
+
|
756
|
+
# @!attribute id [r]
|
757
|
+
# @return [Fixnum] the (unique) ID of the player component part
|
758
|
+
attribute :id
|
759
|
+
|
760
|
+
# @!attribute component
|
761
|
+
# @return [Player::Component] the player component that uses the part
|
762
|
+
belongs_to :component, class_name: "LWS::DigitalSignage::Player::Component",
|
763
|
+
uri: "player/components/:id"
|
764
|
+
|
765
|
+
# @!attribute component_id
|
766
|
+
# @return [Fixnum] the ID of the player component that uses the part
|
767
|
+
attribute :component_id
|
768
|
+
|
769
|
+
# @!attribute player
|
770
|
+
# @return [Player, nil] the player the component part is used in
|
771
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
772
|
+
|
773
|
+
# @!attribute player_id
|
774
|
+
# @return [Fixnum, nil] the ID of the player the component part is used in
|
775
|
+
attribute :player_id
|
776
|
+
|
777
|
+
# @!attribute serial_number
|
778
|
+
# @return [String] the serial number of the player component part
|
779
|
+
attribute :serial_number
|
780
|
+
|
781
|
+
# @!attribute created_at [r]
|
782
|
+
# @return [String] the timestamp of when the player component part was created
|
783
|
+
attribute :created_at
|
784
|
+
|
785
|
+
# @!attribute updated_at [r]
|
786
|
+
# @return [String] the timestamp of when the player component part was last updated
|
787
|
+
attribute :updated_at
|
788
|
+
end
|
789
|
+
|
790
|
+
# = The player configuration class
|
791
|
+
class Player::Configuration < LWS::Generic::Model
|
792
|
+
use_api LWS::DigitalSignage.api
|
793
|
+
uri "player/configurations/(:id)"
|
794
|
+
|
795
|
+
# @!attribute id [r]
|
796
|
+
# @return [Fixnum] the (unique) ID of the player configuration
|
797
|
+
attribute :id
|
798
|
+
|
799
|
+
# @!attribute company
|
800
|
+
# @return [LWS::Auth::Company] the company the player configuration belongs to
|
801
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
802
|
+
|
803
|
+
# @!attribute company_id
|
804
|
+
# @return [Fixnum] the ID of the company the player configuration belongs to
|
805
|
+
attribute :company_id
|
806
|
+
|
807
|
+
# @!attribute description
|
808
|
+
# @return [String, nil] the description of the player configuration
|
809
|
+
attribute :description
|
810
|
+
|
811
|
+
# @!attribute name
|
812
|
+
# @return [String] the name of the player configuration
|
813
|
+
attribute :name
|
814
|
+
|
815
|
+
# @!attribute players
|
816
|
+
# @return [Array<Player>] the players the configuration is used for
|
817
|
+
has_many :players, class_name: "LWS::DigitalSignage::Player",
|
818
|
+
uri: "player/configurations/:configuration_id/players"
|
819
|
+
|
820
|
+
# @!attribute predefined_configuration
|
821
|
+
# @return [Player::PredefinedConfiguration, nil] the predefined
|
822
|
+
# configuration that is used as a bases for the configuration
|
823
|
+
belongs_to :predefined_configuration, class_name: "LWS::DigitalSignage::Player::PredefinedConfiguration",
|
824
|
+
uri: "player/predefined_configurations/:id"
|
825
|
+
|
826
|
+
# @!attribute predefined_configuration_id
|
827
|
+
# @return [Fixnum, nil] the ID of the predefined configuration that is used
|
828
|
+
# as a basis for the player configuration
|
829
|
+
attribute :predefined_configuration_id
|
830
|
+
|
831
|
+
# @!attribute settings
|
832
|
+
# @return [Player::Configuration::Setting] the settings of the player configuration
|
833
|
+
has_many :settings, class_name: "LWS::DigitalSignage::Player::Configuration::Setting",
|
834
|
+
uri: "player/configurations/:configuration_id/settings"
|
835
|
+
|
836
|
+
# @!attribute created_at [r]
|
837
|
+
# @return [String] the timestamp of when the player configuration was created
|
838
|
+
attribute :created_at
|
839
|
+
|
840
|
+
# @!attribute updated_at [r]
|
841
|
+
# @return [String] the timestamp of when the player configuration was last updated
|
842
|
+
attribute :updated_at
|
843
|
+
end
|
844
|
+
|
845
|
+
# = The player configuration setting class
|
846
|
+
#
|
847
|
+
# @note
|
848
|
+
# This class is only used within the context of the {Player::Configuration}
|
849
|
+
# class.
|
850
|
+
class Player::Configuration::Setting < LWS::Generic::Model
|
851
|
+
use_api LWS::DigitalSignage.api
|
852
|
+
uri "player/configurations/:configuration_id/settings/(:id)"
|
853
|
+
|
854
|
+
# @!attribute id [r]
|
855
|
+
# @return [Fixnum] the (unique) ID of the player configuration setting
|
856
|
+
attribute :id
|
857
|
+
|
858
|
+
# @!attribute configuration
|
859
|
+
# @return [Player::Configuration] the player configuration the setting
|
860
|
+
# is defined in
|
861
|
+
belongs_to :configuration, class_name: "LWS::DigitalSignage::Player::Configuration",
|
862
|
+
uri: "player/configurations/:id"
|
863
|
+
|
864
|
+
# @!attribute configuration_id
|
865
|
+
# @return [Fixnum] the ID of the player configuration the setting is defined in
|
866
|
+
attribute :configuration_id
|
867
|
+
|
868
|
+
# @!attribute key
|
869
|
+
# @return [String] the key of the player configuration setting
|
870
|
+
attribute :key
|
871
|
+
|
872
|
+
# @!attribute protected_value
|
873
|
+
# @return [Boolean] whether the value of the player configuration setting
|
874
|
+
# should return a protected representation of the value
|
875
|
+
attribute :protected_value
|
876
|
+
|
877
|
+
# @!attribute value
|
878
|
+
# @return [String, nil] the value of the player configuration setting
|
879
|
+
attribute :value
|
880
|
+
|
881
|
+
# @!attribute created_at [r]
|
882
|
+
# @return [String] the timestamp of when the player configuration setting was created
|
883
|
+
attribute :created_at
|
884
|
+
|
885
|
+
# @!attribute updated_at [r]
|
886
|
+
# @return [String] the timestamp of when the player configuration setting was last updated
|
887
|
+
attribute :updated_at
|
888
|
+
end
|
889
|
+
|
890
|
+
# = The player feedback class
|
891
|
+
#
|
892
|
+
# @note
|
893
|
+
# This class is only used within the context of the {Player} class.
|
894
|
+
class Player::Feedback < LWS::Generic::Model
|
895
|
+
use_api LWS::DigitalSignage.api
|
896
|
+
uri "players/:player_id/feedbacks/(:id)"
|
897
|
+
|
898
|
+
# @!attribute id [r]
|
899
|
+
# @return [Fixnum] the (unique) ID of the player feedback
|
900
|
+
attribute :id
|
901
|
+
|
902
|
+
# @!attribute player
|
903
|
+
# @return [Player] the player the feedback is originating from
|
904
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
905
|
+
|
906
|
+
# @!attribute player_id
|
907
|
+
# @return [Fixnum] the ID of the player the feedback is originating from
|
908
|
+
attribute :player_id
|
909
|
+
|
910
|
+
# @!attribute release
|
911
|
+
# @return [Player::Os::Branch::Release] the player OS branch release the
|
912
|
+
# feedback is related to
|
913
|
+
# FIXME: Missing branch_id field in LWS
|
914
|
+
belongs_to :release, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
915
|
+
uri: "player/os/branches/:branch_id/releases/:id"
|
916
|
+
|
917
|
+
# @!attribute release_id
|
918
|
+
# @return [Fixnum] the ID of the player OS branch release the feedback
|
919
|
+
# is related to
|
920
|
+
|
921
|
+
# @!attribute results
|
922
|
+
# @return [Array<Player::Feedback::Result>] the results of the player feedback
|
923
|
+
# FIXME: Chained associations don't work yet in Spyke (#89)
|
924
|
+
has_many :results, class_name: "LWS::DigitalSignage::Player::Feedback::Result",
|
925
|
+
uri: "players/:player_id/feedbacks/:feedback_id/results"
|
926
|
+
|
927
|
+
# @!attribute created_at [r]
|
928
|
+
# @return [String] the timestamp of when the player feedback was created
|
929
|
+
attribute :created_at
|
930
|
+
|
931
|
+
# @!attribute updated_at [r]
|
932
|
+
# @return [String] the timestamp of when the player feedback was last updated
|
933
|
+
attribute :updated_at
|
934
|
+
end
|
935
|
+
|
936
|
+
# = The player feedback result class
|
937
|
+
#
|
938
|
+
# @note
|
939
|
+
# This class is only used within the context of the {Player::Feedback}
|
940
|
+
# class.
|
941
|
+
class Player::Feedback::Result < LWS::Generic::Model
|
942
|
+
use_api LWS::DigitalSignage.api
|
943
|
+
uri "players/:player_id/feedbacks/:feedback_id/results/(:id)"
|
944
|
+
|
945
|
+
# @!attribute id [r]
|
946
|
+
# @return [Fixnum] the (unique) ID of the player feedback result
|
947
|
+
attribute :id
|
948
|
+
|
949
|
+
# @!attribute feedback
|
950
|
+
# @return [Player::Feedback] the player feedback the result is a part of
|
951
|
+
belongs_to :feedback, class_name: "LWS::DigitalSignage::Player::Feedback",
|
952
|
+
uri: "players/:player_id/feedbacks/:id"
|
953
|
+
|
954
|
+
# @!attribute feedback_id
|
955
|
+
# @return [Player::Feedback] the ID of the player feedback the result is a part of
|
956
|
+
attribute :feedback_id
|
957
|
+
|
958
|
+
# @!attribute key
|
959
|
+
# @return [String] the key of the player feedback result
|
960
|
+
attribute :key
|
961
|
+
|
962
|
+
# @!attribute player
|
963
|
+
# @return [Player] the player the feedback result is for
|
964
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
965
|
+
|
966
|
+
# @!attribute player_id
|
967
|
+
# @return [Fixnum] the ID of the player the feedback result is for
|
968
|
+
attribute :player_id
|
969
|
+
|
970
|
+
# @!attribute value
|
971
|
+
# @return [String] the value of the player feedback result
|
972
|
+
attribute :value
|
973
|
+
|
974
|
+
# @!attribute created_at [r]
|
975
|
+
# @return [String] the timestamp of when the player feedback result was created
|
976
|
+
attribute :created_at
|
977
|
+
|
978
|
+
# @!attribute updated_at [r]
|
979
|
+
# @return [String] the timestamp of when the player feedback result was last updated
|
980
|
+
attribute :updated_at
|
981
|
+
end
|
982
|
+
|
983
|
+
# = The player log class
|
984
|
+
#
|
985
|
+
# @note
|
986
|
+
# This class is only used within the context of the {Player} class.
|
987
|
+
class Player::Log < LWS::Generic::Model
|
988
|
+
use_api LWS::DigitalSignage.api
|
989
|
+
uri "players/:player_id/logs/(:id)"
|
990
|
+
|
991
|
+
# @!attribute id [r]
|
992
|
+
# @return [Fixnum] the (unique) ID of the player log
|
993
|
+
attribute :id
|
994
|
+
|
995
|
+
# @!attribute log_object
|
996
|
+
# @return [String] the URL of the player log object
|
997
|
+
attribute :log_object
|
998
|
+
|
999
|
+
# @!attribute player
|
1000
|
+
# @return [Player] the player the log is produced by
|
1001
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1002
|
+
|
1003
|
+
# @!attribute player_id
|
1004
|
+
# @return [Fixnum] the ID of the player the log is produced by
|
1005
|
+
attribute :player_id
|
1006
|
+
|
1007
|
+
# @!attribute processed
|
1008
|
+
# @return [Boolean] whether the player log has been processed
|
1009
|
+
attribute :processed
|
1010
|
+
|
1011
|
+
# @!attribute created_at [r]
|
1012
|
+
# @return [String] the timestamp of when the player log was created
|
1013
|
+
attribute :created_at
|
1014
|
+
|
1015
|
+
# @!attribute updated_at [r]
|
1016
|
+
# @return [String] the timestamp of when the player log was last updated
|
1017
|
+
attribute :updated_at
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
# = The player model
|
1021
|
+
class Player::Model < LWS::Generic::Model
|
1022
|
+
use_api LWS::DigitalSignage.api
|
1023
|
+
uri "player/models/(:id)"
|
1024
|
+
|
1025
|
+
# @!attribute id [r]
|
1026
|
+
# @return [Fixnum] the (unique) ID of the player model
|
1027
|
+
attribute :id
|
1028
|
+
|
1029
|
+
# @!attribute branches
|
1030
|
+
# @return [Array<Player::Os::Branch>] the player OS branches allowed for
|
1031
|
+
# the player model
|
1032
|
+
has_many :branches, class_name: "LWS::DigitalSignage::Player::Os::Branch",
|
1033
|
+
uri: "player/models/:model_id/branches"
|
1034
|
+
|
1035
|
+
# @!attribute capabilities
|
1036
|
+
# @return [Array<Player::Model::Capability>] the capabilities of the
|
1037
|
+
# player model
|
1038
|
+
has_many :capabilities, class_name: "LWS::DigitalSignage::Player::Model::Capability",
|
1039
|
+
uri: "player/models/:model_id/capabilities"
|
1040
|
+
|
1041
|
+
# @!attribute components
|
1042
|
+
# @return [Array<Player::Component>] the player components that are
|
1043
|
+
# used in the player model
|
1044
|
+
has_many :components, class_name: "LWS::DigitalSignage::Player::Component",
|
1045
|
+
uri: "player/models/:model_id/components"
|
1046
|
+
|
1047
|
+
# @!attribute mbf_hours
|
1048
|
+
# @return [Fixnum] the MBF (mean time between failures) in hours of
|
1049
|
+
# the player mode
|
1050
|
+
attribute :mbf_hours
|
1051
|
+
|
1052
|
+
# @!attribute name
|
1053
|
+
# @return [String] the name of the player model
|
1054
|
+
attribute :name
|
1055
|
+
|
1056
|
+
# @!attribute players
|
1057
|
+
# @return [Array<Player>] the player that have the player model
|
1058
|
+
has_many :players, class_name: "LWS::DigitalSignage::Player",
|
1059
|
+
uri: "player/models/:model_id/players"
|
1060
|
+
|
1061
|
+
# @!attribute release_channels
|
1062
|
+
# @return [Array<Player::Os::ReleaseChannel>] the player OS release
|
1063
|
+
# channels used for the player model
|
1064
|
+
has_many :release_channels, class_name: "LWS::DigitalSignage::Player::Os::ReleaseChannel",
|
1065
|
+
uri: "player/models/:model_id/release_channels"
|
1066
|
+
|
1067
|
+
# @!attribute resolutions
|
1068
|
+
# @return [Array<Display::Resolution>] the display resolutions
|
1069
|
+
# supported by the player model
|
1070
|
+
has_many :resolutions, class_name: "LWS::DigitalSignage::Display::Resolution",
|
1071
|
+
uri: "player/models/:model_id/resolutions"
|
1072
|
+
|
1073
|
+
# @!attribute slug [r]
|
1074
|
+
# @return [String] the slug(ified name) of the player model
|
1075
|
+
attribute :slug
|
1076
|
+
|
1077
|
+
# @!attribute support_end
|
1078
|
+
# @return [String] the end date of support for the model
|
1079
|
+
attribute :support_end
|
1080
|
+
|
1081
|
+
# @!attribute support_eol
|
1082
|
+
# @return [String] the date when the model is considered end-of-life in
|
1083
|
+
# terms of support
|
1084
|
+
attribute :support_eol
|
1085
|
+
|
1086
|
+
# @!attribute support_starts
|
1087
|
+
# @return [String] the start date of support for the model
|
1088
|
+
attribute :support_starts
|
1089
|
+
|
1090
|
+
# @!attribute temperature_critical
|
1091
|
+
# @return [Fixnum, nil] the critical temperature threshold (°C) for the
|
1092
|
+
# player model
|
1093
|
+
attribute :temperature_critical
|
1094
|
+
|
1095
|
+
# @!attribute temperature_warning
|
1096
|
+
# @return [Fixnum, nil] the warning temperature threshold (°C) for the
|
1097
|
+
# player model
|
1098
|
+
attribute :temperature_warning
|
1099
|
+
|
1100
|
+
# @!attribute created_at [r]
|
1101
|
+
# @return [String] the timestamp of when the player model was created
|
1102
|
+
attribute :created_at
|
1103
|
+
|
1104
|
+
# @!attribute updated_at [r]
|
1105
|
+
# @return [String] the timestamp of when the player model was last updated
|
1106
|
+
attribute :updated_at
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
# = The player model capability class
|
1110
|
+
#
|
1111
|
+
# @note
|
1112
|
+
# This class is only used within the context of the {Player::Model}
|
1113
|
+
# class.
|
1114
|
+
class Player::Model::Capability < LWS::Generic::Model
|
1115
|
+
use_api LWS::DigitalSignage.api
|
1116
|
+
uri "player/models/:model_id/capabilities/(:id)"
|
1117
|
+
|
1118
|
+
# @!attribute id [r]
|
1119
|
+
# @return [Fixnum] the (unique) ID of the player model capability
|
1120
|
+
attribute :id
|
1121
|
+
|
1122
|
+
# @!attribute key
|
1123
|
+
# @return [String] the key of the player model capability
|
1124
|
+
attribute :key
|
1125
|
+
|
1126
|
+
# @!attribute model
|
1127
|
+
# @return [Player::Model] the player model that has the capability
|
1128
|
+
belongs_to :model, class_name: "LWS::DigitalSignage::Player::Model",
|
1129
|
+
uri: "player/models/:id"
|
1130
|
+
|
1131
|
+
# @!attribute model_id
|
1132
|
+
# @return [Fixnum] the ID of the player model that has the capability
|
1133
|
+
attribute :model_id
|
1134
|
+
|
1135
|
+
# @!attribute value
|
1136
|
+
# @return [String] the value of the player model capability
|
1137
|
+
attribute :value
|
1138
|
+
|
1139
|
+
# @!attribute created_at [r]
|
1140
|
+
# @return [String] the timestamp of when the player model capability was created
|
1141
|
+
attribute :created_at
|
1142
|
+
|
1143
|
+
# @!attribute updated_at [r]
|
1144
|
+
# @return [String] the timestamp of when the player model capability was last updated
|
1145
|
+
attribute :updated_at
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# = The player notification
|
1149
|
+
#
|
1150
|
+
# @note
|
1151
|
+
# This class is only used within the context of the {Player} class.
|
1152
|
+
class Player::Notification < LWS::Generic::Model
|
1153
|
+
use_api LWS::DigitalSignage.api
|
1154
|
+
uri "players/:player_id/notifications/(:id)"
|
1155
|
+
|
1156
|
+
# @!attribute id [r]
|
1157
|
+
# @return [Fixnum] the (unique) ID of the player notification
|
1158
|
+
attribute :id
|
1159
|
+
|
1160
|
+
# @!attribute key
|
1161
|
+
# @return [String] the key of the player notification
|
1162
|
+
attribute :key
|
1163
|
+
|
1164
|
+
# @!attribute player
|
1165
|
+
# @return [Player] the player the notification is sent by
|
1166
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1167
|
+
|
1168
|
+
# @!attribute player_id
|
1169
|
+
# @return [Fixnum] the ID of the player the notification is sent by
|
1170
|
+
attribute :player_id
|
1171
|
+
|
1172
|
+
# @!attribute protected_value
|
1173
|
+
# @return [Boolean] whether the value of the player nofication should
|
1174
|
+
# return a protected representation of the value
|
1175
|
+
attribute :protected_value
|
1176
|
+
|
1177
|
+
# @!attribute repeated
|
1178
|
+
# @return [Fixnum, nil] the number of times the notification was repeated
|
1179
|
+
attribute :repeated
|
1180
|
+
|
1181
|
+
# @!attribute value
|
1182
|
+
# @return [String] the value of the player notification
|
1183
|
+
attribute :value
|
1184
|
+
|
1185
|
+
# @!attribute created_at [r]
|
1186
|
+
# @return [String] the timestamp of when the player notification was created
|
1187
|
+
attribute :created_at
|
1188
|
+
|
1189
|
+
# @!attribute updated_at [r]
|
1190
|
+
# @return [String] the timestamp of when the player notification was last updated
|
1191
|
+
attribute :updated_at
|
1192
|
+
end
|
1193
|
+
|
1194
|
+
# = The player OS module
|
1195
|
+
module Player::Os; end
|
1196
|
+
|
1197
|
+
# = The player OS branch class
|
1198
|
+
class Player::Os::Branch < LWS::Generic::Model
|
1199
|
+
use_api LWS::DigitalSignage.api
|
1200
|
+
uri "player/os/branches/(:id)"
|
1201
|
+
|
1202
|
+
# @!attribute id [r]
|
1203
|
+
# @return [Fixnum] the (unique) ID of the player OS branch
|
1204
|
+
attribute :id
|
1205
|
+
|
1206
|
+
# @!attribute models
|
1207
|
+
# @return [Array<Player::Model>] the player models that allow the player
|
1208
|
+
# OS branch to be used
|
1209
|
+
has_many :models, class_name: "LWS::DigitalSignage::Player::Model"
|
1210
|
+
|
1211
|
+
# @!attribute name
|
1212
|
+
# @return [String] the name of the player OS branch
|
1213
|
+
attribute :name
|
1214
|
+
|
1215
|
+
# @!attribute release_channel
|
1216
|
+
# @return [Player::Os::Branch::ReleaseChannel] the player OS release
|
1217
|
+
# channel the branch is for
|
1218
|
+
belongs_to :release_channel, class_name: "LWS::DigitalSignage::Player::Os::ReleaseChannel",
|
1219
|
+
uri: "player/os/release_channels/:id"
|
1220
|
+
|
1221
|
+
# @!attribute release_channel_id
|
1222
|
+
# @return [Fixnum] the ID of the player OS release channel the branch
|
1223
|
+
# is for
|
1224
|
+
attribute :release_channel_id
|
1225
|
+
|
1226
|
+
# @!attribute releases
|
1227
|
+
# @return [Array<Player::Os::Branch::Release>] the releases that are part
|
1228
|
+
# of the branch
|
1229
|
+
has_many :releases, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1230
|
+
uri: "player/os/branches/:branch_id/releases"
|
1231
|
+
|
1232
|
+
# @!attribute slug [r]
|
1233
|
+
# @return [String] the slug(ified name) of the player OS branch
|
1234
|
+
attribute :slug
|
1235
|
+
|
1236
|
+
# @!attribute created_at [r]
|
1237
|
+
# @return [String] the timestamp of when the player OS branch was created
|
1238
|
+
attribute :created_at
|
1239
|
+
|
1240
|
+
# @!attribute updated_at [r]
|
1241
|
+
# @return [String] the timestamp of when the player OS branch was last updated
|
1242
|
+
attribute :updated_at
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
# = The player OS branch release class
|
1246
|
+
#
|
1247
|
+
# @note
|
1248
|
+
# This class is only used within the context of the {Player::Os::Branch}
|
1249
|
+
# class.
|
1250
|
+
class Player::Os::Branch::Release < LWS::Generic::Model
|
1251
|
+
use_api LWS::DigitalSignage.api
|
1252
|
+
uri "player/os/branches/:branch_id/releases/(:id)"
|
1253
|
+
|
1254
|
+
# @!attribute id [r]
|
1255
|
+
# @return [Fixnum] the (unique) ID of the player OS branch release
|
1256
|
+
attribute :id
|
1257
|
+
|
1258
|
+
# @!attribute branch
|
1259
|
+
# @return [Player::Os::Branch] the player OS branch the release is for
|
1260
|
+
belongs_to :branch, class_name: "LWS::DigitalSignage::Player::Os::Branch",
|
1261
|
+
uri: "player/os/branches/:id"
|
1262
|
+
|
1263
|
+
# @!attribute branch_id
|
1264
|
+
# @return [Fixnum] the ID of the player OS branch the release is for
|
1265
|
+
attribute :branch_id
|
1266
|
+
|
1267
|
+
# @!attribute commit_date
|
1268
|
+
# @return [String] the date/time of the release (commit)
|
1269
|
+
attribute :commit_date
|
1270
|
+
|
1271
|
+
# @!attribute commit_hash
|
1272
|
+
# @return [String] the SHA256 commit hash of the release (commit)
|
1273
|
+
attribute :commit_hash
|
1274
|
+
|
1275
|
+
# @!attribute commit_message
|
1276
|
+
# @return [String] the message of the release (commit)
|
1277
|
+
attribute :commit_message
|
1278
|
+
|
1279
|
+
# @!attribute package_versions
|
1280
|
+
# @return [Array<Player::Os::Package::Version>] the player OS package
|
1281
|
+
# versions in this release
|
1282
|
+
# FIXME: Chained associations don't work yet in Spyke (#89)
|
1283
|
+
has_many :package_versions, class_name: "LWS::DigitalSignage::Player::Os::Package::Version",
|
1284
|
+
uri: "player/os/branches/:branch_id/releases/:release_id/package_versions"
|
1285
|
+
|
1286
|
+
# @!attribute package_version_changes
|
1287
|
+
# @return [Array<Player::Os::Package::VersionChange>] the player OS package
|
1288
|
+
# version changes in this release
|
1289
|
+
# FIXME: Chained associations don't work yet in Spyke (#89)
|
1290
|
+
has_many :package_version_changes, class_name: "LWS::DigitalSignage::Player::Os::Package::VersionChange",
|
1291
|
+
uri: "player/os/branches/:branch_id/releases/:release_id/package_version_changes"
|
1292
|
+
|
1293
|
+
# @!attribute parent
|
1294
|
+
# @return [Player::Os::Branch::Release, nil] the parent of the player OS
|
1295
|
+
# branch release
|
1296
|
+
belongs_to :parent, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1297
|
+
foreign_key: :parent_id,
|
1298
|
+
uri: "player/os/branches/:branch_id/releases/:id"
|
1299
|
+
|
1300
|
+
# @!attribute parent_id
|
1301
|
+
# @return [Fixnum, nil] the ID of the parent of the player OS branch release
|
1302
|
+
attribute :parent_id
|
1303
|
+
|
1304
|
+
# @!attribute promoted_release
|
1305
|
+
# @return [Player::Os::Branch::Release, nil] the player OS branch
|
1306
|
+
# release that the release is a promotion of
|
1307
|
+
belongs_to :promoted_release, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1308
|
+
foreign_key: :promoted_release_id,
|
1309
|
+
uri: "player/os/branches/:branch_id/releases/:id"
|
1310
|
+
|
1311
|
+
# @!attribute promoted_release_id
|
1312
|
+
# @return [Fixnum, nil] the ID of the player OS branch release that the
|
1313
|
+
# release is a promotion of
|
1314
|
+
attribute :promoted_release_id
|
1315
|
+
|
1316
|
+
# @!attribute promoting_releases
|
1317
|
+
# @return [Array<Player::Os::Branch::Release>] the player OS branch releases
|
1318
|
+
# that promote the release
|
1319
|
+
has_many :promoting_release, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release"
|
1320
|
+
|
1321
|
+
# @!attribute version
|
1322
|
+
# @return [String] the version of the release
|
1323
|
+
attribute :version
|
1324
|
+
|
1325
|
+
# @!attribute created_at [r]
|
1326
|
+
# @return [String] the timestamp of when the player OS branch release was created
|
1327
|
+
attribute :created_at
|
1328
|
+
|
1329
|
+
# @!attribute updated_at [r]
|
1330
|
+
# @return [String] the timestamp of when the player OS branch release was last updated
|
1331
|
+
attribute :updated_at
|
1332
|
+
end
|
1333
|
+
|
1334
|
+
# = The player OS package class
|
1335
|
+
class Player::Os::Package < LWS::Generic::Model
|
1336
|
+
use_api LWS::DigitalSignage.api
|
1337
|
+
uri "player/os/packages/(:id)"
|
1338
|
+
|
1339
|
+
# @!attribute id [r]
|
1340
|
+
# @return [Fixnum] the (unique) ID of the player OS package
|
1341
|
+
attribute :id
|
1342
|
+
|
1343
|
+
# @!attribute name
|
1344
|
+
# @return [String] the name of the player OS package
|
1345
|
+
attribute :name
|
1346
|
+
|
1347
|
+
# @!attribute version_changes
|
1348
|
+
# @return [Array<Player::Os::Package::VersionChange>] the version
|
1349
|
+
# changes of the player OS package present in branches
|
1350
|
+
has_many :version_changes, class_name: "LWS::DigitalSignage::Player::Os::Package::VersionChange",
|
1351
|
+
uri: "player/os/packages/:package_id/version_changes"
|
1352
|
+
|
1353
|
+
# @!attribute versions
|
1354
|
+
# @return [Array<Player::Os::Package::Version>] the versions of the
|
1355
|
+
# player OS package present in branches
|
1356
|
+
has_many :versions, class_name: "LWS::DigitalSignage::Player::Os::Package::Version",
|
1357
|
+
uri: "player/os/packages/:package_id/versions"
|
1358
|
+
|
1359
|
+
# @!attribute created_at [r]
|
1360
|
+
# @return [String] the timestamp of when the player OS package was created
|
1361
|
+
attribute :created_at
|
1362
|
+
|
1363
|
+
# @!attribute updated_at [r]
|
1364
|
+
# @return [String] the timestamp of when the player OS package was last updated
|
1365
|
+
attribute :updated_at
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
# = The player OS package version class
|
1369
|
+
#
|
1370
|
+
# @note
|
1371
|
+
# This class is only used within the context of the {Player::Os::Package}
|
1372
|
+
# class.
|
1373
|
+
class Player::Os::Package::Version < LWS::Generic::Model
|
1374
|
+
use_api LWS::DigitalSignage.api
|
1375
|
+
uri "player/os/packages/:package_id/versions/(:id)"
|
1376
|
+
|
1377
|
+
# @!attribute id [r]
|
1378
|
+
# @return [Fixnum] the (unique) ID of the player OS package version
|
1379
|
+
attribute :id
|
1380
|
+
|
1381
|
+
# @!attribute number
|
1382
|
+
# @return [String] the number of the player OS package version
|
1383
|
+
attribute :number
|
1384
|
+
|
1385
|
+
# @!attribute package
|
1386
|
+
# @return [Player::Os::Package] the player OS package the version is of
|
1387
|
+
belongs_to :package, class_name: "LWS::DigitalSignage::Player::Os::Package",
|
1388
|
+
uri: "player/os/packages/:id"
|
1389
|
+
|
1390
|
+
# @!attribute package_id
|
1391
|
+
# @return [Fixnum] the ID the player OS package the version is of
|
1392
|
+
attribute :package_id
|
1393
|
+
|
1394
|
+
# @!attribute branch_releases
|
1395
|
+
# @return [Array<Player::Os::Branch::Release>] the branch releases the
|
1396
|
+
# player OS package version is a part of
|
1397
|
+
# FIXME: Missing branch_id in LWS
|
1398
|
+
has_many :branch_releases, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1399
|
+
foreign_key: :branch_release_id,
|
1400
|
+
uri: "player/os/branches/:branch_id/releases/:id"
|
1401
|
+
|
1402
|
+
# @!attribute created_at [r]
|
1403
|
+
# @return [String] the timestamp of when the player OS package version was created
|
1404
|
+
attribute :created_at
|
1405
|
+
|
1406
|
+
# @!attribute updated_at [r]
|
1407
|
+
# @return [String] the timestamp of when the player OS package version was last updated
|
1408
|
+
attribute :updated_at
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# = The player OS package version change class
|
1412
|
+
#
|
1413
|
+
# @note
|
1414
|
+
# This class is only used within the context of the {Player::Os::Package}
|
1415
|
+
# class.
|
1416
|
+
class Player::Os::Package::VersionChange < LWS::Generic::Model
|
1417
|
+
use_api LWS::DigitalSignage.api
|
1418
|
+
uri "player/os/packages/:package_id/version_changes/(:id)"
|
1419
|
+
|
1420
|
+
# @!attribute id [r]
|
1421
|
+
# @return [Fixnum] the (unique) ID of the player OS package version change
|
1422
|
+
attribute :id
|
1423
|
+
|
1424
|
+
# @!attribute branch_release
|
1425
|
+
# @return [Player::Os::Branch::Release] the branch release the player OS
|
1426
|
+
# package version change is included in
|
1427
|
+
# FIXME: Missing branch_id in LWS
|
1428
|
+
belongs_to :branch_release, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1429
|
+
foreign_key: :branch_release_id,
|
1430
|
+
uri: "player/os/branches/:branch_id/releases/:id"
|
1431
|
+
|
1432
|
+
# @!attribute branch_release_id
|
1433
|
+
# @return [Fixnum] the ID of the branch release the player OS package
|
1434
|
+
# version change is included in
|
1435
|
+
attribute :branch_release_id
|
1436
|
+
|
1437
|
+
# @!attribute from_number
|
1438
|
+
# @note Either the from (version) number or the to (version) number
|
1439
|
+
# needs to be set.
|
1440
|
+
# @return [String, nil] the number the player OS package version was before
|
1441
|
+
# the change
|
1442
|
+
attribute :from_number
|
1443
|
+
|
1444
|
+
# @!attribute from_version
|
1445
|
+
# @return [Player::Os::Package::Version, nil] the version the player OS
|
1446
|
+
# package was before the change
|
1447
|
+
belongs_to :from_version, class_name: "LWS::DigitalSignage::Player::Os::Package::Version",
|
1448
|
+
foreign_key: :from_version_id,
|
1449
|
+
uri: "player/os/packages/:package_id/versions/:id"
|
1450
|
+
|
1451
|
+
# @!attribute from_version_id
|
1452
|
+
# @return [Fixnum, nil] the ID of the number the player OS package
|
1453
|
+
# version was before the change
|
1454
|
+
attribute :from_version_id
|
1455
|
+
|
1456
|
+
# @!attribute log
|
1457
|
+
# @return [String] the log of the player OS package version change
|
1458
|
+
attribute :log
|
1459
|
+
|
1460
|
+
# @!attribute package
|
1461
|
+
# @return [Player::Os::Package] the player OS package the version change is for
|
1462
|
+
belongs_to :package, class_name: "LWS::DigitalSignage::Player::Os::Package",
|
1463
|
+
uri: "player/os/packages/:id"
|
1464
|
+
|
1465
|
+
# @!attribute package_id
|
1466
|
+
# @return [Fixnum] the ID the player OS package the version change is of
|
1467
|
+
attribute :package_id
|
1468
|
+
|
1469
|
+
# @!attribute state
|
1470
|
+
# @return ["waiting", "processing", "done", "error"] the processing
|
1471
|
+
# state of the player OS version change
|
1472
|
+
attribute :state
|
1473
|
+
|
1474
|
+
# @!attribute to_number
|
1475
|
+
# @note Either the from (version) number or the to (version) number
|
1476
|
+
# needs to be set.
|
1477
|
+
# @return [String, nil] the number of the player OS package version was
|
1478
|
+
# after the change
|
1479
|
+
attribute :to_number
|
1480
|
+
|
1481
|
+
# @!attribute to_version
|
1482
|
+
# @return [Player::Os::Package::Version, nil] the version the player OS
|
1483
|
+
# package was after the change
|
1484
|
+
belongs_to :to_version, class_name: "LWS::DigitalSignage::Player::Os::Package::Version",
|
1485
|
+
foreign_key: :to_version_id,
|
1486
|
+
uri: "player/os/packages/:package_id/versions/:id"
|
1487
|
+
|
1488
|
+
# @!attribute to_version_id
|
1489
|
+
# @return [Fixnum, nil] the ID of the version the player OS package was
|
1490
|
+
# after the change
|
1491
|
+
attribute :to_version_id
|
1492
|
+
|
1493
|
+
# @!attribute created_at [r]
|
1494
|
+
# @return [String] the timestamp of when the player OS package version change was created
|
1495
|
+
attribute :created_at
|
1496
|
+
|
1497
|
+
# @!attribute updated_at [r]
|
1498
|
+
# @return [String] the timestamp of when the player OS package version change was last updated
|
1499
|
+
attribute :updated_at
|
1500
|
+
end
|
1501
|
+
|
1502
|
+
# = The player OS release channel class
|
1503
|
+
class Player::Os::ReleaseChannel < LWS::Generic::Model
|
1504
|
+
use_api LWS::DigitalSignage.api
|
1505
|
+
uri "player/os/release_channels/(:id)"
|
1506
|
+
|
1507
|
+
# @!attribute id [r]
|
1508
|
+
# @return [Fixnum] the (unique) ID of the player OS release channel
|
1509
|
+
attribute :id
|
1510
|
+
|
1511
|
+
# @!attribute branches
|
1512
|
+
# @return [Array<Player::Os::Branch>] the branches that belong to the
|
1513
|
+
# player OS release channel
|
1514
|
+
has_many :branches, class_name: "LWS::DigitalSignage::Player::Os::Branch",
|
1515
|
+
uri: "player/os/release_channels/:release_channel_id/branches"
|
1516
|
+
|
1517
|
+
# @!attribute name
|
1518
|
+
# @return [String] the name of the player OS release channel
|
1519
|
+
attribute :name
|
1520
|
+
|
1521
|
+
# @!attribute players
|
1522
|
+
# @return [Array<Player>] the players that use the player OS release channel
|
1523
|
+
has_many :players, class_name: "LWS::DigitalSignage::Player",
|
1524
|
+
uri: "player/os/release_channels/:release_channel_id/players"
|
1525
|
+
|
1526
|
+
# @!attribute slug [r]
|
1527
|
+
# @return [String] the slug(ified name) of the player OS release channel
|
1528
|
+
attribute :slug
|
1529
|
+
|
1530
|
+
# @!attribute created_at [r]
|
1531
|
+
# @return [String] the timestamp of when the player OS release channel was created
|
1532
|
+
attribute :created_at
|
1533
|
+
|
1534
|
+
# @!attribute updated_at [r]
|
1535
|
+
# @return [String] the timestamp of when the player OS release channel was last updated
|
1536
|
+
attribute :updated_at
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# = The predefined player configuration
|
1540
|
+
class Player::PredefinedConfiguration < LWS::Generic::Model
|
1541
|
+
use_api LWS::DigitalSignage.api
|
1542
|
+
uri "player/predefined_configurations/(:id)"
|
1543
|
+
|
1544
|
+
# @!attribute id [r]
|
1545
|
+
# @return [Fixnum] the (unique) ID of the predefined player configuration
|
1546
|
+
attribute :id
|
1547
|
+
|
1548
|
+
# @!attribute company
|
1549
|
+
# @return [LWS::Auth::Company] the company the predefined player configuration belongs to
|
1550
|
+
belongs_to :company, class_name: "LWS::Auth::Company"
|
1551
|
+
|
1552
|
+
# @!attribute company_id
|
1553
|
+
# @return [Fixnum] the ID of the company the predefined player configuration belongs to
|
1554
|
+
attribute :compandy_id
|
1555
|
+
|
1556
|
+
# @!attribute configurations
|
1557
|
+
# @return [Array<Player::Configuration>] the player configurations that use
|
1558
|
+
# the predefined player configuration as a basis
|
1559
|
+
has_many :configurations, class_name: "LWS::DigitalSignage::Player::Configuration",
|
1560
|
+
uri: "player/predefined_configurations/:predefined_configuration_id/configurations"
|
1561
|
+
|
1562
|
+
# @!attribute description
|
1563
|
+
# @return [String] the description of the predefined player configuration
|
1564
|
+
attribute :description
|
1565
|
+
|
1566
|
+
# @!attribute name
|
1567
|
+
# @return [String] the name of the predefined player configuration
|
1568
|
+
attribute :name
|
1569
|
+
|
1570
|
+
# @!attribute settings
|
1571
|
+
# @return [Player::PredefinedConfiguration::Setting] the settings of the
|
1572
|
+
# predefined player configuration
|
1573
|
+
has_many :settings, class_name: "LWS::DigitalSignage::Player::PredefinedConfiguration::Setting",
|
1574
|
+
uri: "player/predefined_configurations/:predefined_configuration_id/settings"
|
1575
|
+
|
1576
|
+
# @!attribute created_at [r]
|
1577
|
+
# @return [String] the timestamp of when the predefined player configuration was created
|
1578
|
+
attribute :created_at
|
1579
|
+
|
1580
|
+
# @!attribute updated_at [r]
|
1581
|
+
# @return [String] the timestamp of when the predefined player configuration was last updated
|
1582
|
+
attribute :updated_at
|
1583
|
+
end
|
1584
|
+
|
1585
|
+
# = The predefined player configuration setting class
|
1586
|
+
#
|
1587
|
+
# @note
|
1588
|
+
# This class is only used within the context of the {Player::PredefinedConfiguration}
|
1589
|
+
# class.
|
1590
|
+
class Player::PredefinedConfiguration::Setting < LWS::Generic::Model
|
1591
|
+
use_api LWS::DigitalSignage.api
|
1592
|
+
uri "player/predefined_configurations/:configuration_id/settings/(:id)"
|
1593
|
+
|
1594
|
+
# @!attribute id [r]
|
1595
|
+
# @return [Fixnum] the (unique) ID of the predefined player configuration setting
|
1596
|
+
attribute :id
|
1597
|
+
|
1598
|
+
# @!attribute key
|
1599
|
+
# @return [String] the key of the predefined player configuration setting
|
1600
|
+
attribute :key
|
1601
|
+
|
1602
|
+
# @!attribute predefined_configuration
|
1603
|
+
# @return [Player::PredefinedConfiguration] the predefined player
|
1604
|
+
# configuration the setting is defined in
|
1605
|
+
belongs_to :predefined_configuration, class_name: "LWS::DigitalSignage::Player::PredefinedConfiguration",
|
1606
|
+
uri: "player/predefined_configurations/:id"
|
1607
|
+
|
1608
|
+
# @!attribute predefined_configuration_id
|
1609
|
+
# @return [Fixnum] the ID of the predefined player configuration the setting is defined in
|
1610
|
+
attribute :predefined_configuration_id
|
1611
|
+
|
1612
|
+
# @!attribute protected_value
|
1613
|
+
# @return [Boolean] whether the value of the predefined player configuration setting
|
1614
|
+
# should return a protected representation of the value
|
1615
|
+
attribute :protected_value
|
1616
|
+
|
1617
|
+
# @!attribute value
|
1618
|
+
# @return [String, nil] the value of the predefined player configuration setting
|
1619
|
+
attribute :value
|
1620
|
+
|
1621
|
+
# @!attribute created_at [r]
|
1622
|
+
# @return [String] the timestamp of when the predefined player configuration setting was created
|
1623
|
+
attribute :created_at
|
1624
|
+
|
1625
|
+
# @!attribute updated_at [r]
|
1626
|
+
# @return [String] the timestamp of when the predefined player configuration setting was last updated
|
1627
|
+
attribute :updated_at
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
# = The player request class
|
1631
|
+
#
|
1632
|
+
# @note
|
1633
|
+
# This class is only used within the context of the {Player} class.
|
1634
|
+
class Player::Request < LWS::Generic::Model
|
1635
|
+
use_api LWS::DigitalSignage.api
|
1636
|
+
uri "players/:player_id/requests/(:id)"
|
1637
|
+
|
1638
|
+
# @!attribute id [r]
|
1639
|
+
# @return [Fixnum] the (unique) ID of the player request
|
1640
|
+
attribute :id
|
1641
|
+
|
1642
|
+
# @!attribute action
|
1643
|
+
# @return ["unknown", "send_logs", "clear_logs", "clear_content",
|
1644
|
+
# "clear_layouts", "send_screenshot", "reboot", "retrieve_playlist",
|
1645
|
+
# "os_switch_branch", "os_deploy", "os_pull", "restart_lc_session",
|
1646
|
+
# "send_feedback", "apply_configuration"] the player request action
|
1647
|
+
attribute :action
|
1648
|
+
|
1649
|
+
# @!attribute argument
|
1650
|
+
# @return [String, nil] the optional argument for the player request
|
1651
|
+
attribute :argument
|
1652
|
+
|
1653
|
+
# @!attribute feedback
|
1654
|
+
# This field should be set once the action has been processed (see
|
1655
|
+
# {#processed}) and the action is +"send_feedback"+.
|
1656
|
+
#
|
1657
|
+
# @return [Player::Feedback, nil] the player feedback as a response to the
|
1658
|
+
# action request +"send_status"+
|
1659
|
+
belongs_to :feedback, class_name: "LWS::DigitalSignage::Player::Feedback",
|
1660
|
+
uri: "players/:player_id/feedbacks/:id"
|
1661
|
+
|
1662
|
+
# @!attribute feedback_id
|
1663
|
+
# @return [Fixnum, nil] the ID of the player feedback as a response to the
|
1664
|
+
# action request +"send_status"+
|
1665
|
+
attribute :feedback_id
|
1666
|
+
|
1667
|
+
# @!attribute log
|
1668
|
+
# This field should be set once the action has been processed (see
|
1669
|
+
# {#processed}) and the action is +"send_logs"+.
|
1670
|
+
#
|
1671
|
+
# @return [Player::Log, nil] the player log as a response to the action
|
1672
|
+
# request +"send_logs"+
|
1673
|
+
belongs_to :log, class_name: "LWS::DigitalSignage::Player::Log",
|
1674
|
+
uri: "players/:player_id/logs/:id"
|
1675
|
+
|
1676
|
+
# @!attribute log_id
|
1677
|
+
# @return [Fixnum, nil] the ID of the player log as a response to the action
|
1678
|
+
# request +"send_logs"+
|
1679
|
+
attribute :log_id
|
1680
|
+
|
1681
|
+
# @!attribute player
|
1682
|
+
# @return [Player] the player the request is sent to
|
1683
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1684
|
+
|
1685
|
+
# @!attribute player_id
|
1686
|
+
# @return [Fixnum] the ID of the player the request is sent to
|
1687
|
+
attribute :player_id
|
1688
|
+
|
1689
|
+
# @!attribute processed
|
1690
|
+
# @return [Boolean] whether the request has been processed by the player
|
1691
|
+
attribute :processed
|
1692
|
+
|
1693
|
+
# @!attribute response
|
1694
|
+
# @return [String, nil] the player request response text (if the response
|
1695
|
+
# is not a specific object)
|
1696
|
+
attribute :response
|
1697
|
+
|
1698
|
+
# @!attribute screenshot
|
1699
|
+
# This field should be set once the action has been processed (see
|
1700
|
+
# {#processed}) and the action is +"send_screenshot"+.
|
1701
|
+
#
|
1702
|
+
# @return [Player::Screenshot, nil] the player screenshot as a response to
|
1703
|
+
# the action request +"send_screenshot"+
|
1704
|
+
belongs_to :screenshot, class_name: "LWS::DigitalSignage::Player::Screenshot",
|
1705
|
+
uri: "players/:player_id/screenshots/:id"
|
1706
|
+
|
1707
|
+
# @!attribute screenshot_id
|
1708
|
+
# @return [Fixnum, nil] the ID of the player screenshot as a response to
|
1709
|
+
# the action request +"send_screenshot"+
|
1710
|
+
attribute :screenshot_id
|
1711
|
+
|
1712
|
+
# @!attribute created_at [r]
|
1713
|
+
# @return [String] the timestamp of when the player request was created
|
1714
|
+
attribute :created_at
|
1715
|
+
|
1716
|
+
# @!attribute updated_at [r]
|
1717
|
+
# @return [String] the timestamp of when the player request was last updated
|
1718
|
+
attribute :updated_at
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
# = The player screenshot class
|
1722
|
+
#
|
1723
|
+
# @note
|
1724
|
+
# This class is only used within the context of the {Player} class.
|
1725
|
+
class Player::Screenshot < LWS::Generic::Model
|
1726
|
+
use_api LWS::DigitalSignage.api
|
1727
|
+
uri "players/:player_id/screenshots/(:id)"
|
1728
|
+
|
1729
|
+
# @!attribute id [r]
|
1730
|
+
# @return [Fixnum] the (unique) ID of the player screenshot
|
1731
|
+
attribute :id
|
1732
|
+
|
1733
|
+
# @!attribute player
|
1734
|
+
# @return [Player] the player the screenshot is made by
|
1735
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1736
|
+
|
1737
|
+
# @!attribute player_id
|
1738
|
+
# @return [Fixnum] the ID of the player the screenshot is made by
|
1739
|
+
attribute :player_id
|
1740
|
+
|
1741
|
+
# @!attribute screenshot_object
|
1742
|
+
# @return [String] the URL of the player screenshot object
|
1743
|
+
attribute :screenshot_object
|
1744
|
+
|
1745
|
+
# @!attribute created_at [r]
|
1746
|
+
# @return [String] the timestamp of when the player screenshot was created
|
1747
|
+
attribute :created_at
|
1748
|
+
|
1749
|
+
# @!attribute updated_at [r]
|
1750
|
+
# @return [String] the timestamp of when the player screenshot was last updated
|
1751
|
+
attribute :updated_at
|
1752
|
+
end
|
1753
|
+
|
1754
|
+
# = The player tag class
|
1755
|
+
#
|
1756
|
+
# @note
|
1757
|
+
# This class is only used within the context of the {Player} class.
|
1758
|
+
class Player::Tag < LWS::Generic::Model
|
1759
|
+
use_api LWS::DigitalSignage.api
|
1760
|
+
uri "players/:player_id/tags/(:id)"
|
1761
|
+
|
1762
|
+
# @!attribute id [r]
|
1763
|
+
# @return [Fixnum] the (unique) ID of the player tag
|
1764
|
+
attribute :id
|
1765
|
+
|
1766
|
+
# @!attribute key
|
1767
|
+
# @return [String] the key of the player tag
|
1768
|
+
attribute :key
|
1769
|
+
|
1770
|
+
# @!attribute player
|
1771
|
+
# @return [Player] the player associated with the tag
|
1772
|
+
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1773
|
+
|
1774
|
+
# @!attribute player_id
|
1775
|
+
# @return [Fixnum] the ID of the player associated with the tag
|
1776
|
+
attribute :player_id
|
1777
|
+
|
1778
|
+
# @!attribute protected_value
|
1779
|
+
# @return [Boolean] whether the value of the player tag should
|
1780
|
+
# return a protected representation of the value
|
1781
|
+
attribute :protected_value
|
1782
|
+
|
1783
|
+
# @!attribute value
|
1784
|
+
# @return [String, nil] the value of the player tag
|
1785
|
+
attribute :value
|
1786
|
+
|
1787
|
+
# @!attribute created_at [r]
|
1788
|
+
# @return [String] the timestamp of when the player was created
|
1789
|
+
attribute :created_at
|
1790
|
+
|
1791
|
+
# @!attribute updated_at [r]
|
1792
|
+
# @return [String] the timestamp of when the player was last updated
|
1793
|
+
attribute :updated_at
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
end
|