losant_rest 1.23.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +2 -2
  3. data/.ruby-version +1 -1
  4. data/docs/_schemas.md +2088 -34
  5. data/docs/application.md +21 -21
  6. data/docs/applicationApiToken.md +1 -1
  7. data/docs/applicationApiTokens.md +1 -1
  8. data/docs/applicationCertificate.md +3 -3
  9. data/docs/applicationCertificateAuthorities.md +2 -2
  10. data/docs/applicationCertificateAuthority.md +3 -3
  11. data/docs/applicationCertificates.md +2 -2
  12. data/docs/applicationDashboard.md +4 -4
  13. data/docs/applicationDashboards.md +2 -2
  14. data/docs/applicationJobLog.md +1 -1
  15. data/docs/applicationJobLogs.md +1 -1
  16. data/docs/applicationKey.md +3 -3
  17. data/docs/applicationKeys.md +2 -2
  18. data/docs/applicationTemplate.md +1 -1
  19. data/docs/applicationTemplates.md +3 -3
  20. data/docs/applications.md +4 -4
  21. data/docs/auditLog.md +1 -1
  22. data/docs/auditLogs.md +1 -1
  23. data/docs/credential.md +4 -4
  24. data/docs/credentials.md +2 -2
  25. data/docs/dashboard.md +3 -3
  26. data/docs/dashboards.md +2 -2
  27. data/docs/data.md +3 -3
  28. data/docs/dataTable.md +5 -5
  29. data/docs/dataTableRow.md +3 -3
  30. data/docs/dataTableRows.md +6 -6
  31. data/docs/dataTables.md +2 -2
  32. data/docs/device.md +14 -14
  33. data/docs/deviceAttribute.md +3 -3
  34. data/docs/deviceAttributes.md +2 -2
  35. data/docs/deviceRecipe.md +4 -4
  36. data/docs/deviceRecipes.md +2 -2
  37. data/docs/devices.md +14 -14
  38. data/docs/edgeDeployment.md +1 -1
  39. data/docs/edgeDeployments.md +4 -4
  40. data/docs/embeddedDeployment.md +1 -1
  41. data/docs/embeddedDeployments.md +5 -5
  42. data/docs/event.md +3 -3
  43. data/docs/events.md +6 -6
  44. data/docs/experience.md +2 -2
  45. data/docs/experienceDomain.md +3 -3
  46. data/docs/experienceDomains.md +2 -2
  47. data/docs/experienceEndpoint.md +4 -4
  48. data/docs/experienceEndpoints.md +3 -3
  49. data/docs/experienceGroup.md +3 -3
  50. data/docs/experienceGroups.md +2 -2
  51. data/docs/experienceSlug.md +3 -3
  52. data/docs/experienceSlugs.md +2 -2
  53. data/docs/experienceUser.md +3 -3
  54. data/docs/experienceUsers.md +2 -2
  55. data/docs/experienceVersion.md +3 -3
  56. data/docs/experienceVersions.md +2 -2
  57. data/docs/experienceView.md +4 -4
  58. data/docs/experienceViews.md +2 -2
  59. data/docs/file.md +5 -5
  60. data/docs/files.md +2 -2
  61. data/docs/flow.md +11 -11
  62. data/docs/flowVersion.md +6 -6
  63. data/docs/flowVersions.md +3 -3
  64. data/docs/flows.md +5 -5
  65. data/docs/instance.md +8 -8
  66. data/docs/instanceApiToken.md +1 -1
  67. data/docs/instanceApiTokens.md +1 -1
  68. data/docs/instanceAuditLog.md +1 -1
  69. data/docs/instanceAuditLogs.md +1 -1
  70. data/docs/instanceCustomNode.md +5 -5
  71. data/docs/instanceCustomNodes.md +2 -2
  72. data/docs/instanceMember.md +1 -1
  73. data/docs/instanceMembers.md +1 -1
  74. data/docs/instanceNotificationRule.md +5 -5
  75. data/docs/instanceNotificationRules.md +2 -2
  76. data/docs/instanceOrg.md +7 -7
  77. data/docs/instanceOrgInvite.md +1 -1
  78. data/docs/instanceOrgInvites.md +1 -1
  79. data/docs/instanceOrgMember.md +1 -1
  80. data/docs/instanceOrgMembers.md +1 -1
  81. data/docs/instanceOrgs.md +2 -2
  82. data/docs/instanceSandbox.md +7 -7
  83. data/docs/instanceSandboxes.md +1 -1
  84. data/docs/instances.md +1 -1
  85. data/docs/integration.md +3 -3
  86. data/docs/integrations.md +2 -2
  87. data/docs/me.md +20 -20
  88. data/docs/notebook.md +9 -9
  89. data/docs/notebooks.md +2 -2
  90. data/docs/org.md +13 -13
  91. data/docs/orgs.md +2 -2
  92. data/docs/privateFile.md +5 -5
  93. data/docs/privateFiles.md +2 -2
  94. data/docs/resourceJob.md +6 -6
  95. data/docs/resourceJobs.md +2 -2
  96. data/docs/userApiToken.md +3 -3
  97. data/docs/userApiTokens.md +2 -2
  98. data/docs/userOauthToken.md +125 -0
  99. data/docs/userOauthTokens.md +87 -0
  100. data/docs/webhook.md +3 -3
  101. data/docs/webhooks.md +2 -2
  102. data/lib/platform_rest/application.rb +20 -20
  103. data/lib/platform_rest/application_api_token.rb +1 -1
  104. data/lib/platform_rest/application_api_tokens.rb +1 -1
  105. data/lib/platform_rest/application_certificate.rb +3 -3
  106. data/lib/platform_rest/application_certificate_authorities.rb +2 -2
  107. data/lib/platform_rest/application_certificate_authority.rb +3 -3
  108. data/lib/platform_rest/application_certificates.rb +2 -2
  109. data/lib/platform_rest/application_dashboard.rb +4 -4
  110. data/lib/platform_rest/application_dashboards.rb +2 -2
  111. data/lib/platform_rest/application_job_log.rb +1 -1
  112. data/lib/platform_rest/application_job_logs.rb +1 -1
  113. data/lib/platform_rest/application_key.rb +3 -3
  114. data/lib/platform_rest/application_keys.rb +2 -2
  115. data/lib/platform_rest/application_template.rb +1 -1
  116. data/lib/platform_rest/application_templates.rb +3 -3
  117. data/lib/platform_rest/applications.rb +3 -3
  118. data/lib/platform_rest/audit_log.rb +1 -1
  119. data/lib/platform_rest/audit_logs.rb +1 -1
  120. data/lib/platform_rest/client.rb +10 -2
  121. data/lib/platform_rest/credential.rb +4 -4
  122. data/lib/platform_rest/credentials.rb +2 -2
  123. data/lib/platform_rest/dashboard.rb +3 -3
  124. data/lib/platform_rest/dashboards.rb +2 -2
  125. data/lib/platform_rest/data.rb +3 -3
  126. data/lib/platform_rest/data_table.rb +5 -5
  127. data/lib/platform_rest/data_table_row.rb +3 -3
  128. data/lib/platform_rest/data_table_rows.rb +6 -6
  129. data/lib/platform_rest/data_tables.rb +2 -2
  130. data/lib/platform_rest/device.rb +14 -14
  131. data/lib/platform_rest/device_attribute.rb +3 -3
  132. data/lib/platform_rest/device_attributes.rb +2 -2
  133. data/lib/platform_rest/device_recipe.rb +4 -4
  134. data/lib/platform_rest/device_recipes.rb +2 -2
  135. data/lib/platform_rest/devices.rb +14 -14
  136. data/lib/platform_rest/edge_deployment.rb +1 -1
  137. data/lib/platform_rest/edge_deployments.rb +4 -4
  138. data/lib/platform_rest/embedded_deployment.rb +1 -1
  139. data/lib/platform_rest/embedded_deployments.rb +5 -5
  140. data/lib/platform_rest/event.rb +3 -3
  141. data/lib/platform_rest/events.rb +6 -6
  142. data/lib/platform_rest/experience.rb +2 -2
  143. data/lib/platform_rest/experience_domain.rb +3 -3
  144. data/lib/platform_rest/experience_domains.rb +2 -2
  145. data/lib/platform_rest/experience_endpoint.rb +4 -4
  146. data/lib/platform_rest/experience_endpoints.rb +3 -3
  147. data/lib/platform_rest/experience_group.rb +3 -3
  148. data/lib/platform_rest/experience_groups.rb +2 -2
  149. data/lib/platform_rest/experience_slug.rb +3 -3
  150. data/lib/platform_rest/experience_slugs.rb +2 -2
  151. data/lib/platform_rest/experience_user.rb +3 -3
  152. data/lib/platform_rest/experience_users.rb +2 -2
  153. data/lib/platform_rest/experience_version.rb +3 -3
  154. data/lib/platform_rest/experience_versions.rb +2 -2
  155. data/lib/platform_rest/experience_view.rb +4 -4
  156. data/lib/platform_rest/experience_views.rb +2 -2
  157. data/lib/platform_rest/file.rb +4 -4
  158. data/lib/platform_rest/files.rb +2 -2
  159. data/lib/platform_rest/flow.rb +11 -11
  160. data/lib/platform_rest/flow_version.rb +6 -6
  161. data/lib/platform_rest/flow_versions.rb +3 -3
  162. data/lib/platform_rest/flows.rb +5 -5
  163. data/lib/platform_rest/instance.rb +8 -8
  164. data/lib/platform_rest/instance_api_token.rb +1 -1
  165. data/lib/platform_rest/instance_api_tokens.rb +1 -1
  166. data/lib/platform_rest/instance_audit_log.rb +1 -1
  167. data/lib/platform_rest/instance_audit_logs.rb +1 -1
  168. data/lib/platform_rest/instance_custom_node.rb +5 -5
  169. data/lib/platform_rest/instance_custom_nodes.rb +2 -2
  170. data/lib/platform_rest/instance_member.rb +1 -1
  171. data/lib/platform_rest/instance_members.rb +1 -1
  172. data/lib/platform_rest/instance_notification_rule.rb +5 -5
  173. data/lib/platform_rest/instance_notification_rules.rb +2 -2
  174. data/lib/platform_rest/instance_org.rb +7 -7
  175. data/lib/platform_rest/instance_org_invite.rb +1 -1
  176. data/lib/platform_rest/instance_org_invites.rb +1 -1
  177. data/lib/platform_rest/instance_org_member.rb +1 -1
  178. data/lib/platform_rest/instance_org_members.rb +1 -1
  179. data/lib/platform_rest/instance_orgs.rb +2 -2
  180. data/lib/platform_rest/instance_sandbox.rb +7 -7
  181. data/lib/platform_rest/instance_sandboxes.rb +1 -1
  182. data/lib/platform_rest/instances.rb +1 -1
  183. data/lib/platform_rest/integration.rb +3 -3
  184. data/lib/platform_rest/integrations.rb +2 -2
  185. data/lib/platform_rest/me.rb +20 -20
  186. data/lib/platform_rest/notebook.rb +8 -8
  187. data/lib/platform_rest/notebooks.rb +2 -2
  188. data/lib/platform_rest/org.rb +13 -13
  189. data/lib/platform_rest/orgs.rb +2 -2
  190. data/lib/platform_rest/private_file.rb +4 -4
  191. data/lib/platform_rest/private_files.rb +2 -2
  192. data/lib/platform_rest/resource_job.rb +6 -6
  193. data/lib/platform_rest/resource_jobs.rb +2 -2
  194. data/lib/platform_rest/user_api_token.rb +3 -3
  195. data/lib/platform_rest/user_api_tokens.rb +2 -2
  196. data/lib/platform_rest/user_oauth_token.rb +170 -0
  197. data/lib/platform_rest/user_oauth_tokens.rb +132 -0
  198. data/lib/platform_rest/version.rb +1 -1
  199. data/lib/platform_rest/webhook.rb +3 -3
  200. data/lib/platform_rest/webhooks.rb +2 -2
  201. data/lib/platform_rest.rb +2 -0
  202. data/losant_rest.gemspec +6 -5
  203. data/schemas/advancedApplicationKeyQuery.json +9 -0
  204. data/schemas/advancedDeviceQuery.json +9 -0
  205. data/schemas/advancedEventQuery.json +9 -0
  206. data/schemas/advancedExperienceGroupQuery.json +9 -0
  207. data/schemas/advancedExperienceUserQuery.json +9 -0
  208. data/schemas/advancedInstanceOrgQuery.json +9 -0
  209. data/schemas/apiToken.json +100 -0
  210. data/schemas/apiTokenPatch.json +100 -0
  211. data/schemas/apiTokenPost.json +118 -1
  212. data/schemas/apiTokens.json +100 -0
  213. data/schemas/applicationCertificate.json +5 -0
  214. data/schemas/applicationCertificates.json +5 -0
  215. data/schemas/applicationDashboardPost.json +4 -0
  216. data/schemas/credential.json +43 -1
  217. data/schemas/credentialPatch.json +14 -0
  218. data/schemas/credentialPost.json +20 -1
  219. data/schemas/credentials.json +43 -1
  220. data/schemas/dashboard.json +4 -0
  221. data/schemas/dashboardPatch.json +4 -0
  222. data/schemas/dashboardPost.json +4 -0
  223. data/schemas/dashboards.json +4 -0
  224. data/schemas/devicesDataExport.json +9 -0
  225. data/schemas/devicesDeleteOrRestorePost.json +9 -0
  226. data/schemas/devicesExportPayloadCountPost.json +9 -0
  227. data/schemas/devicesExportPost.json +9 -0
  228. data/schemas/devicesPatch.json +9 -0
  229. data/schemas/devicesRemoveDataPost.json +9 -0
  230. data/schemas/eventsExport.json +9 -0
  231. data/schemas/githubLogin.json +18 -1
  232. data/schemas/instanceOrgMemberPatch.json +2 -2
  233. data/schemas/instanceOrgMemberPost.json +4 -4
  234. data/schemas/instanceOrgPost.json +4 -4
  235. data/schemas/lastValueQuery.json +9 -0
  236. data/schemas/multiDeviceCommand.json +9 -0
  237. data/schemas/oauthClient.json +107 -0
  238. data/schemas/oauthClientPost.json +89 -0
  239. data/schemas/oauthDcrError.json +23 -0
  240. data/schemas/oauthError.json +31 -0
  241. data/schemas/org.json +2 -2
  242. data/schemas/orgInvite.json +2 -2
  243. data/schemas/orgInviteCollection.json +2 -2
  244. data/schemas/orgInvitePost.json +2 -2
  245. data/schemas/orgInvites.json +2 -2
  246. data/schemas/orgMemberPatch.json +2 -2
  247. data/schemas/orgRoleInfo.json +2 -2
  248. data/schemas/orgs.json +2 -2
  249. data/schemas/samlResponse.json +18 -1
  250. data/schemas/timeSeriesQuery.json +9 -0
  251. data/schemas/userCredentials.json +18 -1
  252. data/schemas/userOauthToken.json +207 -0
  253. data/schemas/userOauthTokenPatch.json +123 -0
  254. data/schemas/userOauthTokenPost.json +197 -0
  255. data/schemas/userOauthTokens.json +248 -0
  256. data/schemas/userPost.json +18 -1
  257. data/test/basic_test.rb +1 -1
  258. data/test/test_helper.rb +2 -1
  259. metadata +38 -15
@@ -0,0 +1,248 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "User OAuth Token",
9
+ "description": "Schema for a single OAuth Token",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "oauthTokenId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 255
24
+ },
25
+ "description": {
26
+ "type": "string",
27
+ "maxLength": 32767
28
+ },
29
+ "creationDate": {
30
+ "type": "string",
31
+ "format": "date-time"
32
+ },
33
+ "lastUpdated": {
34
+ "type": "string",
35
+ "format": "date-time"
36
+ },
37
+ "expirationDate": {
38
+ "type": "string",
39
+ "format": "date-time"
40
+ },
41
+ "defaultRole": {
42
+ "type": "string",
43
+ "enum": [
44
+ "admin",
45
+ "edit",
46
+ "collaborate",
47
+ "view",
48
+ "none"
49
+ ]
50
+ },
51
+ "orgRoles": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "orgId": {
57
+ "oneOf": [
58
+ {
59
+ "type": "string",
60
+ "pattern": "^[A-Fa-f\\d]{24}$"
61
+ },
62
+ {
63
+ "type": "string",
64
+ "enum": [
65
+ "sandbox"
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ "role": {
71
+ "type": "string",
72
+ "enum": [
73
+ "admin",
74
+ "edit",
75
+ "collaborate",
76
+ "view",
77
+ "none"
78
+ ]
79
+ },
80
+ "applicationRoles": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "properties": {
85
+ "resourceId": {
86
+ "type": "string",
87
+ "pattern": "^[A-Fa-f\\d]{24}$"
88
+ },
89
+ "role": {
90
+ "type": "string",
91
+ "enum": [
92
+ "collaborate",
93
+ "view",
94
+ "none"
95
+ ]
96
+ }
97
+ },
98
+ "required": [
99
+ "resourceId",
100
+ "role"
101
+ ],
102
+ "additionalProperties": false
103
+ },
104
+ "maxItems": 100
105
+ },
106
+ "dashboardRoles": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "object",
110
+ "properties": {
111
+ "resourceId": {
112
+ "type": "string",
113
+ "pattern": "^[A-Fa-f\\d]{24}$"
114
+ },
115
+ "role": {
116
+ "type": "string",
117
+ "enum": [
118
+ "collaborate",
119
+ "view",
120
+ "none"
121
+ ]
122
+ }
123
+ },
124
+ "required": [
125
+ "resourceId",
126
+ "role"
127
+ ],
128
+ "additionalProperties": false
129
+ },
130
+ "maxItems": 100
131
+ }
132
+ },
133
+ "required": [
134
+ "orgId",
135
+ "role"
136
+ ],
137
+ "additionalProperties": false
138
+ },
139
+ "maxItems": 25
140
+ },
141
+ "scope": {
142
+ "type": "array",
143
+ "uniqueItems": true,
144
+ "items": {
145
+ "type": "string",
146
+ "description": "OAuth-supported user-context API scope. See the `scopes_supported` field of the OAuth authorization server metadata document at /.well-known/oauth-authorization-server for the authoritative list.",
147
+ "enum": [
148
+ "all.Application.read",
149
+ "all.Application.bounded",
150
+ "only.Organization.read",
151
+ "only.Organization.bounded",
152
+ "all.Organization.read",
153
+ "all.Organization.bounded",
154
+ "only.User.read"
155
+ ]
156
+ },
157
+ "description": "API scopes for this OAuth client"
158
+ },
159
+ "status": {
160
+ "type": "string",
161
+ "enum": [
162
+ "active",
163
+ "inactive"
164
+ ]
165
+ },
166
+ "oauth": {
167
+ "type": "object",
168
+ "properties": {
169
+ "client_id": {
170
+ "type": "string",
171
+ "minLength": 24,
172
+ "maxLength": 1024,
173
+ "description": "The registered OAuth client ID (ObjectId or HTTPS URL for CIMD)"
174
+ },
175
+ "client_name": {
176
+ "type": "string",
177
+ "maxLength": 255,
178
+ "description": "Human-readable name of the OAuth client (from client registration)"
179
+ },
180
+ "client_uri": {
181
+ "type": "string",
182
+ "maxLength": 1024,
183
+ "description": "Informational URL for the OAuth client's homepage (from client registration)"
184
+ },
185
+ "logo_uri": {
186
+ "type": "string",
187
+ "maxLength": 32768,
188
+ "description": "Logo URL for the OAuth client (http(s) URL or data: URI, from client registration)"
189
+ },
190
+ "redirect_uri": {
191
+ "type": "string",
192
+ "format": "uri",
193
+ "maxLength": 1024
194
+ },
195
+ "resource": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string",
199
+ "format": "uri",
200
+ "maxLength": 1024
201
+ },
202
+ "description": "Resource indicator(s) per RFC 8707 — audience(s) this token is bound to"
203
+ },
204
+ "authorizationStatus": {
205
+ "type": "string",
206
+ "enum": [
207
+ "pending",
208
+ "authorized"
209
+ ]
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "count": {
217
+ "type": "integer"
218
+ },
219
+ "totalCount": {
220
+ "type": "integer"
221
+ },
222
+ "perPage": {
223
+ "type": "integer"
224
+ },
225
+ "page": {
226
+ "type": "integer"
227
+ },
228
+ "filter": {
229
+ "type": "string"
230
+ },
231
+ "filterField": {
232
+ "type": "string"
233
+ },
234
+ "sortField": {
235
+ "type": "string"
236
+ },
237
+ "sortDirection": {
238
+ "type": "string",
239
+ "enum": [
240
+ "asc",
241
+ "desc",
242
+ "ASC",
243
+ "DESC",
244
+ ""
245
+ ]
246
+ }
247
+ }
248
+ }
@@ -85,6 +85,7 @@
85
85
  "type": "string",
86
86
  "enum": [
87
87
  "all.Application",
88
+ "all.Application.bounded",
88
89
  "all.Application.read",
89
90
  "all.Application.cli",
90
91
  "all.Device",
@@ -254,7 +255,6 @@
254
255
  "devices.delete",
255
256
  "devices.restore",
256
257
  "devices.removeData",
257
- "devices.detailedSummary",
258
258
  "devices.deviceNames",
259
259
  "devices.export",
260
260
  "devices.get",
@@ -412,7 +412,11 @@
412
412
  "type": "string",
413
413
  "enum": [
414
414
  "all.Organization",
415
+ "all.Organization.bounded",
415
416
  "all.Organization.read",
417
+ "only.Organization",
418
+ "only.Organization.bounded",
419
+ "only.Organization.read",
416
420
  "applications.*",
417
421
  "auditLog.*",
418
422
  "auditLogs.*",
@@ -455,6 +459,7 @@
455
459
  "type": "string",
456
460
  "enum": [
457
461
  "all.Instance",
462
+ "all.Instance.bounded",
458
463
  "all.Instance.read",
459
464
  "instance.*",
460
465
  "instance.get",
@@ -543,8 +548,12 @@
543
548
  "type": "string",
544
549
  "enum": [
545
550
  "all.User",
551
+ "all.User.bounded",
546
552
  "all.User.read",
547
553
  "all.User.cli",
554
+ "only.User",
555
+ "only.User.bounded",
556
+ "only.User.read",
548
557
  "userApiToken.*",
549
558
  "userApiToken.get",
550
559
  "userApiToken.patch",
@@ -552,6 +561,13 @@
552
561
  "userApiTokens.*",
553
562
  "userApiTokens.get",
554
563
  "userApiTokens.post",
564
+ "userOauthToken.*",
565
+ "userOauthToken.get",
566
+ "userOauthToken.patch",
567
+ "userOauthToken.delete",
568
+ "userOauthTokens.*",
569
+ "userOauthTokens.get",
570
+ "userOauthTokens.post",
555
571
  "applicationTemplate.*",
556
572
  "applicationTemplate.get",
557
573
  "applicationTemplates.*",
@@ -581,6 +597,7 @@
581
597
  "me.invite",
582
598
  "me.invites",
583
599
  "me.respondToInvite",
600
+ "me.refreshToken",
584
601
  "orgs.*",
585
602
  "orgs.get",
586
603
  "orgs.post"
data/test/basic_test.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + "/test_helper")
2
2
 
3
- class BasicTest < MiniTest::Test
3
+ class BasicTest < Minitest::Test
4
4
  describe "test basic functionality" do
5
5
 
6
6
  it "should correctly make an auth call" do
data/test/test_helper.rb CHANGED
@@ -1,13 +1,14 @@
1
1
  require "rubygems"
2
2
 
3
3
  gem "minitest"
4
+
4
5
  require "minitest/autorun"
5
6
  require "minitest/spec"
6
7
  require "minitest/mock"
7
8
  require "webmock/minitest"
8
9
  require "platform_rest"
9
10
 
10
- class MiniTest::Test
11
+ class Minitest::Test
11
12
  def setup
12
13
  WebMock.disable_net_connect!
13
14
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-03-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: httparty
@@ -16,56 +15,70 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.0
18
+ version: 0.24.2
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 0.21.0
25
+ version: 0.24.2
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: minitest
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '5.9'
32
+ version: 6.0.1
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '5.9'
39
+ version: 6.0.1
40
+ - !ruby/object:Gem::Dependency
41
+ name: minitest-mock
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.27'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.27'
41
54
  - !ruby/object:Gem::Dependency
42
55
  name: rake
43
56
  requirement: !ruby/object:Gem::Requirement
44
57
  requirements:
45
58
  - - "~>"
46
59
  - !ruby/object:Gem::Version
47
- version: '12'
60
+ version: '13'
48
61
  type: :development
49
62
  prerelease: false
50
63
  version_requirements: !ruby/object:Gem::Requirement
51
64
  requirements:
52
65
  - - "~>"
53
66
  - !ruby/object:Gem::Version
54
- version: '12'
67
+ version: '13'
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: webmock
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
72
  - - "~>"
60
73
  - !ruby/object:Gem::Version
61
- version: '2.3'
74
+ version: 3.26.1
62
75
  type: :development
63
76
  prerelease: false
64
77
  version_requirements: !ruby/object:Gem::Requirement
65
78
  requirements:
66
79
  - - "~>"
67
80
  - !ruby/object:Gem::Version
68
- version: '2.3'
81
+ version: 3.26.1
69
82
  description: Easily use the Losant IoT Platform through its REST API with Ruby
70
83
  email:
71
84
  - hello@losant.com
@@ -177,6 +190,8 @@ files:
177
190
  - docs/resourceJobs.md
178
191
  - docs/userApiToken.md
179
192
  - docs/userApiTokens.md
193
+ - docs/userOauthToken.md
194
+ - docs/userOauthTokens.md
180
195
  - docs/webhook.md
181
196
  - docs/webhooks.md
182
197
  - examples/auth.rb
@@ -279,6 +294,8 @@ files:
279
294
  - lib/platform_rest/resource_jobs.rb
280
295
  - lib/platform_rest/user_api_token.rb
281
296
  - lib/platform_rest/user_api_tokens.rb
297
+ - lib/platform_rest/user_oauth_token.rb
298
+ - lib/platform_rest/user_oauth_tokens.rb
282
299
  - lib/platform_rest/utils.rb
283
300
  - lib/platform_rest/version.rb
284
301
  - lib/platform_rest/webhook.rb
@@ -554,6 +571,10 @@ files:
554
571
  - schemas/notificationRulePatch.json
555
572
  - schemas/notificationRulePost.json
556
573
  - schemas/notificationRules.json
574
+ - schemas/oauthClient.json
575
+ - schemas/oauthClientPost.json
576
+ - schemas/oauthDcrError.json
577
+ - schemas/oauthError.json
557
578
  - schemas/org.json
558
579
  - schemas/orgInvite.json
559
580
  - schemas/orgInviteAction.json
@@ -602,6 +623,10 @@ files:
602
623
  - schemas/timeSeriesQuery.json
603
624
  - schemas/twoFactorAuthInfo.json
604
625
  - schemas/userCredentials.json
626
+ - schemas/userOauthToken.json
627
+ - schemas/userOauthTokenPatch.json
628
+ - schemas/userOauthTokenPost.json
629
+ - schemas/userOauthTokens.json
605
630
  - schemas/userPost.json
606
631
  - schemas/validateContextError.json
607
632
  - schemas/validateContextSuccess.json
@@ -617,7 +642,6 @@ homepage: https://github.com/Losant/losant-rest-ruby
617
642
  licenses:
618
643
  - MIT
619
644
  metadata: {}
620
- post_install_message:
621
645
  rdoc_options: []
622
646
  require_paths:
623
647
  - lib
@@ -625,15 +649,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
625
649
  requirements:
626
650
  - - ">="
627
651
  - !ruby/object:Gem::Version
628
- version: '2.3'
652
+ version: '3.2'
629
653
  required_rubygems_version: !ruby/object:Gem::Requirement
630
654
  requirements:
631
655
  - - ">="
632
656
  - !ruby/object:Gem::Version
633
657
  version: '0'
634
658
  requirements: []
635
- rubygems_version: 3.0.3.1
636
- signing_key:
659
+ rubygems_version: 4.0.3
637
660
  specification_version: 4
638
661
  summary: Provides a simple ruby wrapper around the Losant REST API
639
662
  test_files: