losant_rest 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/_schemas.md +1002 -0
- data/docs/auth.md +32 -0
- data/docs/solution.md +115 -0
- data/docs/solutionUser.md +121 -0
- data/docs/solutionUsers.md +84 -0
- data/docs/solutions.md +79 -0
- data/lib/losant_rest/auth.rb +39 -0
- data/lib/losant_rest/client.rb +18 -2
- data/lib/losant_rest/solution.rb +134 -0
- data/lib/losant_rest/solution_user.rb +140 -0
- data/lib/losant_rest/solution_users.rb +104 -0
- data/lib/losant_rest/solutions.rb +100 -0
- data/lib/losant_rest/version.rb +1 -1
- data/lib/losant_rest.rb +4 -0
- data/schemas/authedSolutionUser.json +18 -0
- data/schemas/org.json +3 -0
- data/schemas/orgs.json +3 -0
- data/schemas/solution.json +74 -0
- data/schemas/solutionPatch.json +48 -0
- data/schemas/solutionPost.json +52 -0
- data/schemas/solutionUser.json +94 -0
- data/schemas/solutionUserCredentials.json +30 -0
- data/schemas/solutionUserPatch.json +64 -0
- data/schemas/solutionUserPost.json +70 -0
- data/schemas/solutionUsers.json +140 -0
- data/schemas/solutions.json +116 -0
- metadata +20 -2
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"email": {
|
6
|
+
"type": "string",
|
7
|
+
"format": "email",
|
8
|
+
"maxLength": 1024
|
9
|
+
},
|
10
|
+
"firstName": {
|
11
|
+
"type": "string",
|
12
|
+
"minLength": 1,
|
13
|
+
"maxLength": 1024
|
14
|
+
},
|
15
|
+
"lastName": {
|
16
|
+
"type": "string",
|
17
|
+
"minLength": 1,
|
18
|
+
"maxLength": 1024
|
19
|
+
},
|
20
|
+
"companyName": {
|
21
|
+
"type": "string",
|
22
|
+
"maxLength": 1024
|
23
|
+
},
|
24
|
+
"phoneNumber": {
|
25
|
+
"type": "string",
|
26
|
+
"maxLength": 1024
|
27
|
+
},
|
28
|
+
"location": {
|
29
|
+
"type": "string",
|
30
|
+
"maxLength": 1024
|
31
|
+
},
|
32
|
+
"url": {
|
33
|
+
"type": "string",
|
34
|
+
"maxLength": 1024
|
35
|
+
},
|
36
|
+
"forcePasswordResetOnNextLogin": {
|
37
|
+
"type": "boolean"
|
38
|
+
},
|
39
|
+
"password": {
|
40
|
+
"type": "string",
|
41
|
+
"minLength": 8,
|
42
|
+
"maxLength": 2048
|
43
|
+
},
|
44
|
+
"twoFactorAuthKey": {
|
45
|
+
"type": "string",
|
46
|
+
"minLength": 52,
|
47
|
+
"maxLength": 52
|
48
|
+
},
|
49
|
+
"accessRestrictions": {
|
50
|
+
"type": "object",
|
51
|
+
"properties": {
|
52
|
+
"dashboardIds": {
|
53
|
+
"type": "array",
|
54
|
+
"items": {
|
55
|
+
"type": "string",
|
56
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"additionalProperties": false
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"additionalProperties": false
|
64
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"email": {
|
6
|
+
"type": "string",
|
7
|
+
"format": "email",
|
8
|
+
"maxLength": 1024
|
9
|
+
},
|
10
|
+
"firstName": {
|
11
|
+
"type": "string",
|
12
|
+
"minLength": 1,
|
13
|
+
"maxLength": 1024
|
14
|
+
},
|
15
|
+
"lastName": {
|
16
|
+
"type": "string",
|
17
|
+
"minLength": 1,
|
18
|
+
"maxLength": 1024
|
19
|
+
},
|
20
|
+
"companyName": {
|
21
|
+
"type": "string",
|
22
|
+
"maxLength": 1024
|
23
|
+
},
|
24
|
+
"phoneNumber": {
|
25
|
+
"type": "string",
|
26
|
+
"maxLength": 1024
|
27
|
+
},
|
28
|
+
"location": {
|
29
|
+
"type": "string",
|
30
|
+
"maxLength": 1024
|
31
|
+
},
|
32
|
+
"url": {
|
33
|
+
"type": "string",
|
34
|
+
"maxLength": 1024
|
35
|
+
},
|
36
|
+
"forcePasswordResetOnNextLogin": {
|
37
|
+
"type": "boolean"
|
38
|
+
},
|
39
|
+
"password": {
|
40
|
+
"type": "string",
|
41
|
+
"minLength": 8,
|
42
|
+
"maxLength": 2048
|
43
|
+
},
|
44
|
+
"twoFactorAuthKey": {
|
45
|
+
"type": "string",
|
46
|
+
"minLength": 52,
|
47
|
+
"maxLength": 52
|
48
|
+
},
|
49
|
+
"accessRestrictions": {
|
50
|
+
"type": "object",
|
51
|
+
"properties": {
|
52
|
+
"dashboardIds": {
|
53
|
+
"type": "array",
|
54
|
+
"items": {
|
55
|
+
"type": "string",
|
56
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"additionalProperties": false
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"required": [
|
64
|
+
"email",
|
65
|
+
"firstName",
|
66
|
+
"lastName",
|
67
|
+
"password"
|
68
|
+
],
|
69
|
+
"additionalProperties": false
|
70
|
+
}
|
@@ -0,0 +1,140 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"items": {
|
6
|
+
"type": "array",
|
7
|
+
"items": {
|
8
|
+
"title": "Solution User",
|
9
|
+
"description": "Schema for a single Solution User",
|
10
|
+
"type": "object",
|
11
|
+
"properties": {
|
12
|
+
"id": {
|
13
|
+
"type": "string",
|
14
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
15
|
+
},
|
16
|
+
"solutionUserId": {
|
17
|
+
"type": "string",
|
18
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
19
|
+
},
|
20
|
+
"solutionId": {
|
21
|
+
"type": "string",
|
22
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
23
|
+
},
|
24
|
+
"orgId": {
|
25
|
+
"type": "string",
|
26
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
27
|
+
},
|
28
|
+
"creationDate": {
|
29
|
+
"type": "string",
|
30
|
+
"format": "date-time"
|
31
|
+
},
|
32
|
+
"lastUpdated": {
|
33
|
+
"type": "string",
|
34
|
+
"format": "date-time"
|
35
|
+
},
|
36
|
+
"passwordLastUpdated": {
|
37
|
+
"type": "string",
|
38
|
+
"format": "date-time"
|
39
|
+
},
|
40
|
+
"lastLogin": {
|
41
|
+
"type": "string",
|
42
|
+
"format": "date-time"
|
43
|
+
},
|
44
|
+
"email": {
|
45
|
+
"type": "string",
|
46
|
+
"format": "email",
|
47
|
+
"maxLength": 1024
|
48
|
+
},
|
49
|
+
"firstName": {
|
50
|
+
"type": "string",
|
51
|
+
"minLength": 1,
|
52
|
+
"maxLength": 1024
|
53
|
+
},
|
54
|
+
"lastName": {
|
55
|
+
"type": "string",
|
56
|
+
"minLength": 1,
|
57
|
+
"maxLength": 1024
|
58
|
+
},
|
59
|
+
"companyName": {
|
60
|
+
"type": "string",
|
61
|
+
"maxLength": 1024
|
62
|
+
},
|
63
|
+
"phoneNumber": {
|
64
|
+
"type": "string",
|
65
|
+
"maxLength": 1024
|
66
|
+
},
|
67
|
+
"location": {
|
68
|
+
"type": "string",
|
69
|
+
"maxLength": 1024
|
70
|
+
},
|
71
|
+
"url": {
|
72
|
+
"type": "string",
|
73
|
+
"maxLength": 1024
|
74
|
+
},
|
75
|
+
"forcePasswordResetOnNextLogin": {
|
76
|
+
"type": "boolean"
|
77
|
+
},
|
78
|
+
"fullName": {
|
79
|
+
"type": "string"
|
80
|
+
},
|
81
|
+
"twoFactorAuthEnabled": {
|
82
|
+
"type": "boolean"
|
83
|
+
},
|
84
|
+
"avatarUrl": {
|
85
|
+
"type": "string",
|
86
|
+
"format": "url"
|
87
|
+
},
|
88
|
+
"accessRestrictions": {
|
89
|
+
"type": "object",
|
90
|
+
"properties": {
|
91
|
+
"dashboardIds": {
|
92
|
+
"type": "array",
|
93
|
+
"items": {
|
94
|
+
"type": "string",
|
95
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"count": {
|
104
|
+
"type": "integer"
|
105
|
+
},
|
106
|
+
"totalCount": {
|
107
|
+
"type": "integer"
|
108
|
+
},
|
109
|
+
"perPage": {
|
110
|
+
"type": "integer"
|
111
|
+
},
|
112
|
+
"page": {
|
113
|
+
"type": "integer"
|
114
|
+
},
|
115
|
+
"filter": {
|
116
|
+
"type": "string"
|
117
|
+
},
|
118
|
+
"filterField": {
|
119
|
+
"type": "string"
|
120
|
+
},
|
121
|
+
"sortField": {
|
122
|
+
"type": "string"
|
123
|
+
},
|
124
|
+
"sortDirection": {
|
125
|
+
"type": "string",
|
126
|
+
"enum": [
|
127
|
+
"asc",
|
128
|
+
"desc"
|
129
|
+
]
|
130
|
+
},
|
131
|
+
"orgId": {
|
132
|
+
"type": "string",
|
133
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
134
|
+
},
|
135
|
+
"solutionId": {
|
136
|
+
"type": "string",
|
137
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"items": {
|
6
|
+
"type": "array",
|
7
|
+
"items": {
|
8
|
+
"title": "Solution",
|
9
|
+
"description": "Schema for a single Solution",
|
10
|
+
"type": "object",
|
11
|
+
"properties": {
|
12
|
+
"id": {
|
13
|
+
"type": "string",
|
14
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
15
|
+
},
|
16
|
+
"solutionId": {
|
17
|
+
"type": "string",
|
18
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
19
|
+
},
|
20
|
+
"orgId": {
|
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
|
+
"slug": {
|
42
|
+
"type": "string",
|
43
|
+
"pattern": "^[0-9a-z_-]{1,255}$"
|
44
|
+
},
|
45
|
+
"allowSelfDeletion": {
|
46
|
+
"type": "boolean"
|
47
|
+
},
|
48
|
+
"allowSelfEmailChange": {
|
49
|
+
"type": "boolean"
|
50
|
+
},
|
51
|
+
"passwordReset": {
|
52
|
+
"type": "object",
|
53
|
+
"properties": {
|
54
|
+
"allowPasswordReset": {
|
55
|
+
"type": "boolean"
|
56
|
+
},
|
57
|
+
"emailSubject": {
|
58
|
+
"type": "string",
|
59
|
+
"maxLength": 255
|
60
|
+
},
|
61
|
+
"emailBody": {
|
62
|
+
"type": "string",
|
63
|
+
"maxLength": 32767
|
64
|
+
},
|
65
|
+
"emailFrom": {
|
66
|
+
"type": "string",
|
67
|
+
"format": "email",
|
68
|
+
"maxLength": 1024
|
69
|
+
}
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"summary": {
|
73
|
+
"type": "object",
|
74
|
+
"properties": {
|
75
|
+
"solutionUserCount": {
|
76
|
+
"type": "number"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"count": {
|
84
|
+
"type": "integer"
|
85
|
+
},
|
86
|
+
"totalCount": {
|
87
|
+
"type": "integer"
|
88
|
+
},
|
89
|
+
"perPage": {
|
90
|
+
"type": "integer"
|
91
|
+
},
|
92
|
+
"page": {
|
93
|
+
"type": "integer"
|
94
|
+
},
|
95
|
+
"filter": {
|
96
|
+
"type": "string"
|
97
|
+
},
|
98
|
+
"filterField": {
|
99
|
+
"type": "string"
|
100
|
+
},
|
101
|
+
"sortField": {
|
102
|
+
"type": "string"
|
103
|
+
},
|
104
|
+
"sortDirection": {
|
105
|
+
"type": "string",
|
106
|
+
"enum": [
|
107
|
+
"asc",
|
108
|
+
"desc"
|
109
|
+
]
|
110
|
+
},
|
111
|
+
"orgId": {
|
112
|
+
"type": "string",
|
113
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
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.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Kuehl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -102,6 +102,10 @@ files:
|
|
102
102
|
- docs/me.md
|
103
103
|
- docs/org.md
|
104
104
|
- docs/orgs.md
|
105
|
+
- docs/solution.md
|
106
|
+
- docs/solutionUser.md
|
107
|
+
- docs/solutionUsers.md
|
108
|
+
- docs/solutions.md
|
105
109
|
- docs/webhook.md
|
106
110
|
- docs/webhooks.md
|
107
111
|
- examples/auth.rb
|
@@ -130,6 +134,10 @@ files:
|
|
130
134
|
- lib/losant_rest/me.rb
|
131
135
|
- lib/losant_rest/org.rb
|
132
136
|
- lib/losant_rest/orgs.rb
|
137
|
+
- lib/losant_rest/solution.rb
|
138
|
+
- lib/losant_rest/solution_user.rb
|
139
|
+
- lib/losant_rest/solution_users.rb
|
140
|
+
- lib/losant_rest/solutions.rb
|
133
141
|
- lib/losant_rest/utils.rb
|
134
142
|
- lib/losant_rest/version.rb
|
135
143
|
- lib/losant_rest/webhook.rb
|
@@ -148,6 +156,7 @@ files:
|
|
148
156
|
- schemas/applicationPost.json
|
149
157
|
- schemas/applications.json
|
150
158
|
- schemas/authedDevice.json
|
159
|
+
- schemas/authedSolutionUser.json
|
151
160
|
- schemas/authedUser.json
|
152
161
|
- schemas/dashboard.json
|
153
162
|
- schemas/dashboardPatch.json
|
@@ -199,6 +208,15 @@ files:
|
|
199
208
|
- schemas/orgs.json
|
200
209
|
- schemas/recentItem.json
|
201
210
|
- schemas/recentItemList.json
|
211
|
+
- schemas/solution.json
|
212
|
+
- schemas/solutionPatch.json
|
213
|
+
- schemas/solutionPost.json
|
214
|
+
- schemas/solutionUser.json
|
215
|
+
- schemas/solutionUserCredentials.json
|
216
|
+
- schemas/solutionUserPatch.json
|
217
|
+
- schemas/solutionUserPost.json
|
218
|
+
- schemas/solutionUsers.json
|
219
|
+
- schemas/solutions.json
|
202
220
|
- schemas/success.json
|
203
221
|
- schemas/timeSeriesData.json
|
204
222
|
- schemas/timeSeriesQuery.json
|