losant_rest 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -0
  3. data/docs/_schemas.md +997 -157
  4. data/docs/dataTable.md +214 -0
  5. data/docs/dataTableRow.md +136 -0
  6. data/docs/dataTableRows.md +139 -0
  7. data/docs/dataTables.md +91 -0
  8. data/docs/flow.md +41 -1
  9. data/lib/losant_rest/client.rb +18 -2
  10. data/lib/losant_rest/data_table.rb +272 -0
  11. data/lib/losant_rest/data_table_row.rb +180 -0
  12. data/lib/losant_rest/data_table_rows.rb +192 -0
  13. data/lib/losant_rest/data_tables.rb +136 -0
  14. data/lib/losant_rest/flow.rb +47 -1
  15. data/lib/losant_rest/version.rb +1 -1
  16. data/lib/losant_rest.rb +4 -0
  17. data/schemas/application.json +3 -0
  18. data/schemas/applicationApiTokenPost.json +16 -0
  19. data/schemas/applications.json +3 -0
  20. data/schemas/auditLog.json +1 -0
  21. data/schemas/auditLogFilter.json +1 -0
  22. data/schemas/auditLogs.json +1 -0
  23. data/schemas/dataTable.json +79 -0
  24. data/schemas/dataTableColumn.json +39 -0
  25. data/schemas/dataTablePatch.json +16 -0
  26. data/schemas/dataTablePost.json +63 -0
  27. data/schemas/dataTableQuery.json +86 -0
  28. data/schemas/dataTableRow.json +28 -0
  29. data/schemas/dataTableRowInsertUpdate.json +15 -0
  30. data/schemas/dataTableRows.json +68 -0
  31. data/schemas/dataTables.json +121 -0
  32. data/schemas/flow.json +1 -0
  33. data/schemas/flowPatch.json +1 -0
  34. data/schemas/flowPost.json +1 -0
  35. data/schemas/flowVersion.json +1 -0
  36. data/schemas/flowVersionPost.json +1 -0
  37. data/schemas/flowVersions.json +1 -0
  38. data/schemas/flows.json +1 -0
  39. data/schemas/me.json +14 -0
  40. data/schemas/org.json +14 -0
  41. data/schemas/orgs.json +14 -0
  42. data/schemas/payloadCounts.json +8 -0
  43. metadata +19 -2
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Data Table Row",
9
+ "description": "Schema for a single Data Table Row",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "createdAt": {
17
+ "type": "string",
18
+ "format": "date-time"
19
+ },
20
+ "updatedAt": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ }
24
+ },
25
+ "patternProperties": {
26
+ "^[0-9a-zA-Z_-]{1,255}$": {
27
+ "type": [
28
+ "string",
29
+ "number",
30
+ "boolean",
31
+ "null"
32
+ ]
33
+ }
34
+ }
35
+ }
36
+ },
37
+ "count": {
38
+ "type": "integer"
39
+ },
40
+ "totalCount": {
41
+ "type": "integer"
42
+ },
43
+ "limit": {
44
+ "type": "integer"
45
+ },
46
+ "offset": {
47
+ "type": "integer"
48
+ },
49
+ "sortColumn": {
50
+ "type": "string"
51
+ },
52
+ "sortDirection": {
53
+ "type": "string",
54
+ "enum": [
55
+ "asc",
56
+ "desc"
57
+ ]
58
+ },
59
+ "dataTableId": {
60
+ "type": "string",
61
+ "pattern": "^[A-Fa-f\\d]{24}$"
62
+ },
63
+ "applicationId": {
64
+ "type": "string",
65
+ "pattern": "^[A-Fa-f\\d]{24}$"
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Data Table",
9
+ "description": "Schema for a single Data Table",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "dataTableId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "applicationId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Fa-f\\d]{24}$"
23
+ },
24
+ "creationDate": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "lastUpdated": {
29
+ "type": "string",
30
+ "format": "date-time"
31
+ },
32
+ "name": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 255
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "maxLength": 32767
40
+ },
41
+ "columns": {
42
+ "type": "array",
43
+ "items": {
44
+ "title": "Data Table Column",
45
+ "description": "Schema for a single Data Table Column",
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string",
50
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
51
+ },
52
+ "dataType": {
53
+ "type": "string",
54
+ "enum": [
55
+ "string",
56
+ "number",
57
+ "boolean"
58
+ ]
59
+ },
60
+ "constraint": {
61
+ "type": "string",
62
+ "enum": [
63
+ "unique",
64
+ "required",
65
+ "optional"
66
+ ]
67
+ },
68
+ "defaultValue": {
69
+ "type": [
70
+ "string",
71
+ "number",
72
+ "boolean"
73
+ ]
74
+ }
75
+ },
76
+ "required": [
77
+ "name",
78
+ "dataType",
79
+ "constraint"
80
+ ],
81
+ "additionalProperties": false
82
+ },
83
+ "maxItems": 50
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "count": {
89
+ "type": "integer"
90
+ },
91
+ "totalCount": {
92
+ "type": "integer"
93
+ },
94
+ "perPage": {
95
+ "type": "integer"
96
+ },
97
+ "page": {
98
+ "type": "integer"
99
+ },
100
+ "filter": {
101
+ "type": "string"
102
+ },
103
+ "filterField": {
104
+ "type": "string"
105
+ },
106
+ "sortField": {
107
+ "type": "string"
108
+ },
109
+ "sortDirection": {
110
+ "type": "string",
111
+ "enum": [
112
+ "asc",
113
+ "desc"
114
+ ]
115
+ },
116
+ "applicationId": {
117
+ "type": "string",
118
+ "pattern": "^[A-Fa-f\\d]{24}$"
119
+ }
120
+ }
121
+ }
data/schemas/flow.json CHANGED
@@ -50,6 +50,7 @@
50
50
  "type": {
51
51
  "type": "string",
52
52
  "enum": [
53
+ "dataTable",
53
54
  "deviceId",
54
55
  "deviceIdConnect",
55
56
  "deviceIdDisconnect",
@@ -37,6 +37,7 @@
37
37
  "type": {
38
38
  "type": "string",
39
39
  "enum": [
40
+ "dataTable",
40
41
  "deviceId",
41
42
  "deviceIdConnect",
42
43
  "deviceIdDisconnect",
@@ -26,6 +26,7 @@
26
26
  "type": {
27
27
  "type": "string",
28
28
  "enum": [
29
+ "dataTable",
29
30
  "deviceId",
30
31
  "deviceIdConnect",
31
32
  "deviceIdDisconnect",
@@ -50,6 +50,7 @@
50
50
  "type": {
51
51
  "type": "string",
52
52
  "enum": [
53
+ "dataTable",
53
54
  "deviceId",
54
55
  "deviceIdConnect",
55
56
  "deviceIdDisconnect",
@@ -26,6 +26,7 @@
26
26
  "type": {
27
27
  "type": "string",
28
28
  "enum": [
29
+ "dataTable",
29
30
  "deviceId",
30
31
  "deviceIdConnect",
31
32
  "deviceIdDisconnect",
@@ -57,6 +57,7 @@
57
57
  "type": {
58
58
  "type": "string",
59
59
  "enum": [
60
+ "dataTable",
60
61
  "deviceId",
61
62
  "deviceIdConnect",
62
63
  "deviceIdDisconnect",
data/schemas/flows.json CHANGED
@@ -57,6 +57,7 @@
57
57
  "type": {
58
58
  "type": "string",
59
59
  "enum": [
60
+ "dataTable",
60
61
  "deviceId",
61
62
  "deviceIdConnect",
62
63
  "deviceIdDisconnect",
data/schemas/me.json CHANGED
@@ -89,6 +89,9 @@
89
89
  "dashboard": {
90
90
  "type": "number"
91
91
  },
92
+ "datatable": {
93
+ "type": "number"
94
+ },
92
95
  "device": {
93
96
  "type": "number"
94
97
  },
@@ -249,6 +252,9 @@
249
252
  "dashCount": {
250
253
  "type": "number"
251
254
  },
255
+ "dataTableCount": {
256
+ "type": "number"
257
+ },
252
258
  "deviceCount": {
253
259
  "type": "number"
254
260
  },
@@ -291,6 +297,14 @@
291
297
  }
292
298
  }
293
299
  },
300
+ "dataTable": {
301
+ "type": "object",
302
+ "patternProperties": {
303
+ ".*": {
304
+ "type": "number"
305
+ }
306
+ }
307
+ },
294
308
  "deviceState": {
295
309
  "type": "object",
296
310
  "patternProperties": {
data/schemas/org.json CHANGED
@@ -82,6 +82,9 @@
82
82
  "dashboard": {
83
83
  "type": "number"
84
84
  },
85
+ "datatable": {
86
+ "type": "number"
87
+ },
85
88
  "device": {
86
89
  "type": "number"
87
90
  },
@@ -134,6 +137,9 @@
134
137
  "dashCount": {
135
138
  "type": "number"
136
139
  },
140
+ "dataTableCount": {
141
+ "type": "number"
142
+ },
137
143
  "deviceCount": {
138
144
  "type": "number"
139
145
  },
@@ -179,6 +185,14 @@
179
185
  }
180
186
  }
181
187
  },
188
+ "dataTable": {
189
+ "type": "object",
190
+ "patternProperties": {
191
+ ".*": {
192
+ "type": "number"
193
+ }
194
+ }
195
+ },
182
196
  "deviceState": {
183
197
  "type": "object",
184
198
  "patternProperties": {
data/schemas/orgs.json CHANGED
@@ -89,6 +89,9 @@
89
89
  "dashboard": {
90
90
  "type": "number"
91
91
  },
92
+ "datatable": {
93
+ "type": "number"
94
+ },
92
95
  "device": {
93
96
  "type": "number"
94
97
  },
@@ -141,6 +144,9 @@
141
144
  "dashCount": {
142
145
  "type": "number"
143
146
  },
147
+ "dataTableCount": {
148
+ "type": "number"
149
+ },
144
150
  "deviceCount": {
145
151
  "type": "number"
146
152
  },
@@ -186,6 +192,14 @@
186
192
  }
187
193
  }
188
194
  },
195
+ "dataTable": {
196
+ "type": "object",
197
+ "patternProperties": {
198
+ ".*": {
199
+ "type": "number"
200
+ }
201
+ }
202
+ },
189
203
  "deviceState": {
190
204
  "type": "object",
191
205
  "patternProperties": {
@@ -18,6 +18,14 @@
18
18
  }
19
19
  }
20
20
  },
21
+ "dataTable": {
22
+ "type": "object",
23
+ "patternProperties": {
24
+ ".*": {
25
+ "type": "number"
26
+ }
27
+ }
28
+ },
21
29
  "deviceState": {
22
30
  "type": "object",
23
31
  "patternProperties": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-18 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -93,6 +93,10 @@ files:
93
93
  - docs/dashboard.md
94
94
  - docs/dashboards.md
95
95
  - docs/data.md
96
+ - docs/dataTable.md
97
+ - docs/dataTableRow.md
98
+ - docs/dataTableRows.md
99
+ - docs/dataTables.md
96
100
  - docs/device.md
97
101
  - docs/deviceRecipe.md
98
102
  - docs/deviceRecipes.md
@@ -137,6 +141,10 @@ files:
137
141
  - lib/losant_rest/dashboard.rb
138
142
  - lib/losant_rest/dashboards.rb
139
143
  - lib/losant_rest/data.rb
144
+ - lib/losant_rest/data_table.rb
145
+ - lib/losant_rest/data_table_row.rb
146
+ - lib/losant_rest/data_table_rows.rb
147
+ - lib/losant_rest/data_tables.rb
140
148
  - lib/losant_rest/device.rb
141
149
  - lib/losant_rest/device_recipe.rb
142
150
  - lib/losant_rest/device_recipes.rb
@@ -192,6 +200,15 @@ files:
192
200
  - schemas/dashboardPatch.json
193
201
  - schemas/dashboardPost.json
194
202
  - schemas/dashboards.json
203
+ - schemas/dataTable.json
204
+ - schemas/dataTableColumn.json
205
+ - schemas/dataTablePatch.json
206
+ - schemas/dataTablePost.json
207
+ - schemas/dataTableQuery.json
208
+ - schemas/dataTableRow.json
209
+ - schemas/dataTableRowInsertUpdate.json
210
+ - schemas/dataTableRows.json
211
+ - schemas/dataTables.json
195
212
  - schemas/device.json
196
213
  - schemas/deviceCommand.json
197
214
  - schemas/deviceCommands.json