-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
570 lines (512 loc) · 18.8 KB
/
index.html
File metadata and controls
570 lines (512 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Disruptive - Disruptive</title>
<link rel="stylesheet" type="text/css" href="https://vegather.github.io/Disruptive/all.css" media="all" />
</head>
<body>
<header>
<a href="https://vegather.github.io/Disruptive/">
<strong>
Disruptive
</strong>
<span>Documentation</span>
</a>
</header>
<!--
<form class="search">
<input type="search" placeholder="Search" />
</form>
-->
<nav>
<div class="wrapper">
<h2>On This Page</h2>
<ol><li><a href="#classes">Classes</a></li><li><a href="#structures">Structures</a></li><li><a href="#enumerations">Enumerations</a></li><li><a href="#protocols">Protocols</a></li><li><a href="#functions">Functions</a></li></ol>
</div>
</nav>
<main>
<article>
<section id="classes">
<h2>Classes</h2>
<dl>
<dt class="class">
<a href="https://vegather.github.io/Disruptive/BasicAuthAuthenticator" title="class - BasicAuthAuthenticator">
BasicAuthAuthenticator
</a>
</dt>
<dd>
<p>An <code>Authenticator</code> that logs in a service account using basic auth.</p>
</dd>
<dt class="class">
<a href="https://vegather.github.io/Disruptive/OAuth2Authenticator" title="class - OAuth2Authenticator">
OAuth2Authenticator
</a>
</dt>
<dd>
<p>An <code>Authenticator</code> that logs in a service account using OAuth2 with a JWT Bearer Token as an authorization grant.
This is a more secure flow than the basic auth counter-part, and is the recommended way to authenticate
a service account in a production environment.</p>
</dd>
<dt class="class">
<a href="https://vegather.github.io/Disruptive/DeviceEventStream" title="class - DeviceEventStream">
DeviceEventStream
</a>
</dt>
<dd>
<p>Represent an event stream for a device, and is implemented using <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>.</p>
</dd>
</dl>
</section>
<section id="structures">
<h2>Structures</h2>
<dl>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Disruptive" title="structure - Disruptive">
Disruptive
</a>
</dt>
<dd>
<p>This is the core of the <code>Disruptive</code> Swift API, and implements the majority of the Disruptive Technologies REST API endpoints.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ServiceAccountCredentials" title="structure - ServiceAccountCredentials">
ServiceAccountCredentials
</a>
</dt>
<dd>
<p>A set of <code>ServiceAccountCredentials</code> is used to authenticate against the Disruptive Technologies API.
It can be created in <a href="https://studio.disruptive-technologies.com">DT Studio</a> by clicking
the <code>Service Account</code> tab under <code>API Integrations</code> in the side menu, and creating a new key.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Auth" title="structure - Auth">
Auth
</a>
</dt>
<dd>
<p>Encapsulates authentication details like access token and expiration date.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/TouchEvent" title="structure - TouchEvent">
TouchEvent
</a>
</dt>
<dd>
<p>An event that is sent whenever a device is touched. This event is sent for almost all the
available device types (except a few like the counting sensors).</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/TemperatureEvent" title="structure - TemperatureEvent">
TemperatureEvent
</a>
</dt>
<dd>
<p>A temperature event that is sent for temperature sensors every heartbeat, and whenever the sensor is touched.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/TemperatureEvent_TemperatureSample" title="structure - TemperatureEvent.TemperatureSample">
TemperatureEvent.TemperatureSample
</a>
</dt>
<dd>
<p>Represents a temperature value sampled within a single heartbeat.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ObjectPresentEvent" title="structure - ObjectPresentEvent">
ObjectPresentEvent
</a>
</dt>
<dd>
<p>An event that is sent whenever an object is close to a proximity sensor or not.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/HumidityEvent" title="structure - HumidityEvent">
HumidityEvent
</a>
</dt>
<dd>
<p>A humidity event that is sent for humidity sensors every heartbeat, and whenever the
sensor is touched. This event contains both the measured temperature as well as the relative humidity.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ObjectPresentCountEvent" title="structure - ObjectPresentCountEvent">
ObjectPresentCountEvent
</a>
</dt>
<dd>
<p>An event that includes the accumulated count of proximity state changes for a
Counting Proximity sensor. These events are sent every heartbeat, and <em>not</em> when
the sensor is touched or when the state is switched (to save battery life).</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/TouchCountEvent" title="structure - TouchCountEvent">
TouchCountEvent
</a>
</dt>
<dd>
<p>An event that includes the accumulated count of touches for a Counting Touch sensor.
These events are sent every heartbeat, and <em>not</em> when the sensor is touched (to save battery life).</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/WaterPresentEvent" title="structure - WaterPresentEvent">
WaterPresentEvent
</a>
</dt>
<dd>
<p>An event that indicates whether or not water is present to a Water Detector sensor.
This event is sent every heartbeat, and when the sensor is touched.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/NetworkStatusEvent" title="structure - NetworkStatusEvent">
NetworkStatusEvent
</a>
</dt>
<dd>
<p>A network status event describes which Cloud Connectors a sensor is connected to, and how strong
that connection is. A network status event is sent on every heartbeat, as well as when a sensor is touched.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/NetworkStatusEvent_CloudConnector" title="structure - NetworkStatusEvent.CloudConnector">
NetworkStatusEvent.CloudConnector
</a>
</dt>
<dd>
<p>A Cloud Connector that picked a network status event for a sensor.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/BatteryStatusEvent" title="structure - BatteryStatusEvent">
BatteryStatusEvent
</a>
</dt>
<dd>
<p>A battery status event is sent quite rarely since the battery life of the sensors lasts up to 15 years. It indicates how much battery life is left in the sensor.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/LabelsChangedEvent" title="structure - LabelsChangedEvent">
LabelsChangedEvent
</a>
</dt>
<dd>
<p>Labels changed events are sent when the labels for a device are changed (added, deleted, or modified).</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ConnectionStatusEvent" title="structure - ConnectionStatusEvent">
ConnectionStatusEvent
</a>
</dt>
<dd>
<p>Indicates the current connectivity of a Cloud Connector. This is sent when there is a
change in the connectivity of a Cloud Connector.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/EthernetStatusEvent" title="structure - EthernetStatusEvent">
EthernetStatusEvent
</a>
</dt>
<dd>
<p>Details about the current ethernet connection status of a Cloud Connector.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/EthernetStatusEvent_ErrorMessage" title="structure - EthernetStatusEvent.ErrorMessage">
EthernetStatusEvent.ErrorMessage
</a>
</dt>
<dd>
<p>Indicates an error related to connecting to the local network.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/CellularStatusEvent" title="structure - CellularStatusEvent">
CellularStatusEvent
</a>
</dt>
<dd>
<p>Details about the current cellular connection status of a Cloud Connector.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/CellularStatusEvent_ErrorMessage" title="structure - CellularStatusEvent.ErrorMessage">
CellularStatusEvent.ErrorMessage
</a>
</dt>
<dd>
<p>Indicates an error related to connecting to the cellular network.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/DataConnector" title="structure - DataConnector">
DataConnector
</a>
</dt>
<dd>
<p>A Data Connector is a mechanism to send device events in real-time from Disruptive Technologies' backend
to an external service. It can be set up to send specific types of events to a configurable endpoint through an
HTTP POST request.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/DataConnector_Metrics" title="structure - DataConnector.Metrics">
DataConnector.Metrics
</a>
</dt>
<dd>
<p>Represents the metrics such as success-rate and latency for the past 3 hours of a Data Connector.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Device" title="structure - Device">
Device
</a>
</dt>
<dd>
<p>Represents a Sensor or Cloud Connector from Disruptive Technologies.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Device_ReportedEvents" title="structure - Device.ReportedEvents">
Device.ReportedEvents
</a>
</dt>
<dd>
<p>Represents the latest known reported values for a <code>Device</code>. Any of the event types that is not available for that particular device type, or that have not yet received an event, will be <code>nil</code>.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Events" title="structure - Events">
Events
</a>
</dt>
<dd>
<p>Contains an array of events for each type of event for a specific <code>Device</code>. Detailed documentation for each event type can be found on Disruptive Technologies' <a href="https://developer.disruptive-technologies.com/docs/concepts/events">developer website</a>.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Member" title="structure - Member">
Member
</a>
</dt>
<dd>
<p>A <code>Member</code> assigns a specific role to an account within a project
or an organization. The account can be either a user or a service account.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Organization" title="structure - Organization">
Organization
</a>
</dt>
<dd>
<p>Represents an organization registered with Disruptive Technologies.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Project" title="structure - Project">
Project
</a>
</dt>
<dd>
<p>Represents a project within an <code>Organization</code>.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/Role" title="structure - Role">
Role
</a>
</dt>
<dd>
<p>Represents a role that a user can have within a project or an organization.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ServiceAccount" title="structure - ServiceAccount">
ServiceAccount
</a>
</dt>
<dd>
<p>All programmatic interaction with the Disruptive Technologies API is done via a logged-in Service Account.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ServiceAccount_Key" title="structure - ServiceAccount.Key">
ServiceAccount.Key
</a>
</dt>
<dd>
<p>A key that can be used to authenticate a Service Account.</p>
</dd>
<dt class="structure">
<a href="https://vegather.github.io/Disruptive/ServiceAccount_KeySecret" title="structure - ServiceAccount.KeySecret">
ServiceAccount.KeySecret
</a>
</dt>
<dd>
<p>A secret along with the corresponding key used to authenticate a Service Account.
This is the response value for when a new key is created for a Service Account.</p>
</dd>
</dl>
</section>
<section id="enumerations">
<h2>Enumerations</h2>
<dl>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/LogLevel" title="enumeration - LogLevel">
LogLevel
</a>
</dt>
<dd>
<p>The severity of the log. Might be used to prefix
the log message with a symbol to make it easily
distinguishable.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/DisruptiveError" title="enumeration - DisruptiveError">
DisruptiveError
</a>
</dt>
<dd>
<p>An enumeration of all the possible errors that could occur by calling one of the endpoints.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/EventType" title="enumeration - EventType">
EventType
</a>
</dt>
<dd>
<p>An enumeration of all the possible types of events that a device can emit.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/ObjectPresentEvent_State" title="enumeration - ObjectPresentEvent.State">
ObjectPresentEvent.State
</a>
</dt>
<dd>
<p>The proximity state of a sensor.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/WaterPresentEvent_State" title="enumeration - WaterPresentEvent.State">
WaterPresentEvent.State
</a>
</dt>
<dd>
<p>The water presence state of a sensor.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/NetworkStatusEvent_TransmissionMode" title="enumeration - NetworkStatusEvent.TransmissionMode">
NetworkStatusEvent.TransmissionMode
</a>
</dt>
<dd>
<p>The transmission mode the sensor is currently in. The sensor will automatically switch
transmission modes when the sensor has low connectivity to a Cloud Connector.
See the <a href="https://support.disruptive-technologies.com/hc/en-us/articles/360003182914-What-is-Boost-high-power-boost-mode-">Help Center</a> for more details.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/ConnectionStatusEvent_Connection" title="enumeration - ConnectionStatusEvent.Connection">
ConnectionStatusEvent.Connection
</a>
</dt>
<dd>
<p>Indicates the current connectivity of a Cloud Connector.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/ConnectionStatusEvent_Available" title="enumeration - ConnectionStatusEvent.Available">
ConnectionStatusEvent.Available
</a>
</dt>
<dd>
<p>Indicates a connectivity that is available for a Cloud Connector.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/DataConnector_Status" title="enumeration - DataConnector.Status">
DataConnector.Status
</a>
</dt>
<dd>
<p>The current status of a Data Connector. This will indicate whether or
not the Data Connector is currently sending out events.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/DataConnector_PushType" title="enumeration - DataConnector.PushType">
DataConnector.PushType
</a>
</dt>
<dd>
<p>The mechanism used by a Data Connector to push device events to an external service.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/Device_DeviceType" title="enumeration - Device.DeviceType">
Device.DeviceType
</a>
</dt>
<dd>
<p>Represents the type of a <code>Device</code>.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/Member_Status" title="enumeration - Member.Status">
Member.Status
</a>
</dt>
<dd>
<p>Indicates the current status of the membership.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/Member_AccountType" title="enumeration - Member.AccountType">
Member.AccountType
</a>
</dt>
<dd>
<p>The type of account the membership represents.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/Permission" title="enumeration - Permission">
Permission
</a>
</dt>
<dd>
<p>A permission is a specific action that an authenticated account is allowed to do within
a specific project or organization.</p>
</dd>
<dt class="enumeration">
<a href="https://vegather.github.io/Disruptive/Role_RoleType" title="enumeration - Role.RoleType">
Role.RoleType
</a>
</dt>
<dd>
<p>The level of access that is given to a role.</p>
</dd>
</dl>
</section>
<section id="protocols">
<h2>Protocols</h2>
<dl>
<dt class="protocol">
<a href="https://vegather.github.io/Disruptive/Authenticator" title="protocol - Authenticator">
Authenticator
</a>
</dt>
<dd>
<p>Defines the interface required to authenticate the <code>Disruptive</code> struct.</p>
</dd>
<dt class="protocol">
<a href="https://vegather.github.io/Disruptive/PublishableEvent" title="protocol - PublishableEvent">
PublishableEvent
</a>
</dt>
<dd>
<p>Used by event types (such as <code>TouchEvent</code>) to indicate that
they can be published to the device emulator.</p>
</dd>
</dl>
</section>
<section id="functions">
<h2>Functions</h2>
<dl>
<dt class="function">
<a href="https://vegather.github.io/Disruptive/DTLog(__level_filePath_functionName_lineNumber_)" title="function - DTLog(_:level:filePath:functionName:lineNumber:)">
DTLog(_:level:filePath:functionName:lineNumber:)
</a>
</dt>
<dd>
<p>Provides a nicely formatted log output with the file, function, and line number the
log statement came from. Also includes a timestamp with millisecond accuracy.</p>
</dd>
</dl>
</section>
</article>
</main>
<footer>
<p>
Generated on <time datetime="2021-08-20T12:27:59+0000">August 20, 2021</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-rc.1</span>.
</p>
</footer>
</body>
</html>