losant_rest 1.0.4 → 1.0.5
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 +132 -12
- data/docs/device.md +3 -3
- data/docs/flow.md +1 -1
- data/lib/losant_rest/client.rb +2 -2
- data/lib/losant_rest/version.rb +1 -1
- data/schemas/deviceCommand.json +20 -2
- data/schemas/deviceCommands.json +20 -2
- data/schemas/deviceStateOrStates.json +40 -4
- data/schemas/deviceStates.json +20 -2
- data/schemas/multiDeviceCommand.json +20 -2
- data/schemas/webhook.json +3 -0
- data/schemas/webhookPatch.json +3 -0
- data/schemas/webhookPost.json +3 -0
- data/schemas/webhooks.json +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9f63e144f5c8d3f2b77eef7a561a7df05c96a60
|
|
4
|
+
data.tar.gz: f00576df31b359a9ff094e903b9479cc8e9cd6f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 436d742c5224a575abe2e1cd16f394ed12e9111b6fabcb7b0980e12900aa2cbf5a23d68ba0f320bea96f977087b5968ce24fe3a45d9ba517bdc7380320f0327b
|
|
7
|
+
data.tar.gz: 7ee47ea16f3c96b0fcd659245cc05ca7ea989294b774b151bcd1339284c61b54d778d6a0574a0749f56572b2f241ca7b29908dd099e1500e2640e2db721dfc0a
|
data/docs/_schemas.md
CHANGED
|
@@ -1808,8 +1808,26 @@ Schema for a command for a single Device
|
|
|
1808
1808
|
"type": "object",
|
|
1809
1809
|
"properties": {
|
|
1810
1810
|
"time": {
|
|
1811
|
-
"
|
|
1812
|
-
|
|
1811
|
+
"oneOf": [
|
|
1812
|
+
{
|
|
1813
|
+
"type": "string"
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
"type": "number"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"type": "object",
|
|
1820
|
+
"properties": {
|
|
1821
|
+
"$date": {
|
|
1822
|
+
"type": "string"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"additionalProperties": false,
|
|
1826
|
+
"required": [
|
|
1827
|
+
"$date"
|
|
1828
|
+
]
|
|
1829
|
+
}
|
|
1830
|
+
]
|
|
1813
1831
|
},
|
|
1814
1832
|
"name": {
|
|
1815
1833
|
"type": "string",
|
|
@@ -1858,8 +1876,26 @@ Schema for an array of Device Commands
|
|
|
1858
1876
|
"type": "object",
|
|
1859
1877
|
"properties": {
|
|
1860
1878
|
"time": {
|
|
1861
|
-
"
|
|
1862
|
-
|
|
1879
|
+
"oneOf": [
|
|
1880
|
+
{
|
|
1881
|
+
"type": "string"
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"type": "number"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"type": "object",
|
|
1888
|
+
"properties": {
|
|
1889
|
+
"$date": {
|
|
1890
|
+
"type": "string"
|
|
1891
|
+
}
|
|
1892
|
+
},
|
|
1893
|
+
"additionalProperties": false,
|
|
1894
|
+
"required": [
|
|
1895
|
+
"$date"
|
|
1896
|
+
]
|
|
1897
|
+
}
|
|
1898
|
+
]
|
|
1863
1899
|
},
|
|
1864
1900
|
"name": {
|
|
1865
1901
|
"type": "string",
|
|
@@ -2920,8 +2956,26 @@ Schema for a single device state or an array of device states
|
|
|
2920
2956
|
"type": "object",
|
|
2921
2957
|
"properties": {
|
|
2922
2958
|
"time": {
|
|
2923
|
-
"
|
|
2924
|
-
|
|
2959
|
+
"oneOf": [
|
|
2960
|
+
{
|
|
2961
|
+
"type": "string"
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
"type": "number"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"type": "object",
|
|
2968
|
+
"properties": {
|
|
2969
|
+
"$date": {
|
|
2970
|
+
"type": "string"
|
|
2971
|
+
}
|
|
2972
|
+
},
|
|
2973
|
+
"additionalProperties": false,
|
|
2974
|
+
"required": [
|
|
2975
|
+
"$date"
|
|
2976
|
+
]
|
|
2977
|
+
}
|
|
2978
|
+
]
|
|
2925
2979
|
},
|
|
2926
2980
|
"relayId": {
|
|
2927
2981
|
"type": "string"
|
|
@@ -2956,8 +3010,26 @@ Schema for a single device state or an array of device states
|
|
|
2956
3010
|
"type": "object",
|
|
2957
3011
|
"properties": {
|
|
2958
3012
|
"time": {
|
|
2959
|
-
"
|
|
2960
|
-
|
|
3013
|
+
"oneOf": [
|
|
3014
|
+
{
|
|
3015
|
+
"type": "string"
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"type": "number"
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"type": "object",
|
|
3022
|
+
"properties": {
|
|
3023
|
+
"$date": {
|
|
3024
|
+
"type": "string"
|
|
3025
|
+
}
|
|
3026
|
+
},
|
|
3027
|
+
"additionalProperties": false,
|
|
3028
|
+
"required": [
|
|
3029
|
+
"$date"
|
|
3030
|
+
]
|
|
3031
|
+
}
|
|
3032
|
+
]
|
|
2961
3033
|
},
|
|
2962
3034
|
"relayId": {
|
|
2963
3035
|
"type": "string"
|
|
@@ -3015,8 +3087,26 @@ Schema for an array of Device states
|
|
|
3015
3087
|
"type": "object",
|
|
3016
3088
|
"properties": {
|
|
3017
3089
|
"time": {
|
|
3018
|
-
"
|
|
3019
|
-
|
|
3090
|
+
"oneOf": [
|
|
3091
|
+
{
|
|
3092
|
+
"type": "string"
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"type": "number"
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"type": "object",
|
|
3099
|
+
"properties": {
|
|
3100
|
+
"$date": {
|
|
3101
|
+
"type": "string"
|
|
3102
|
+
}
|
|
3103
|
+
},
|
|
3104
|
+
"additionalProperties": false,
|
|
3105
|
+
"required": [
|
|
3106
|
+
"$date"
|
|
3107
|
+
]
|
|
3108
|
+
}
|
|
3109
|
+
]
|
|
3020
3110
|
},
|
|
3021
3111
|
"relayId": {
|
|
3022
3112
|
"type": "string"
|
|
@@ -5161,8 +5251,26 @@ Schema for the body of a request to send a command to multiple Devices
|
|
|
5161
5251
|
"type": "object",
|
|
5162
5252
|
"properties": {
|
|
5163
5253
|
"time": {
|
|
5164
|
-
"
|
|
5165
|
-
|
|
5254
|
+
"oneOf": [
|
|
5255
|
+
{
|
|
5256
|
+
"type": "string"
|
|
5257
|
+
},
|
|
5258
|
+
{
|
|
5259
|
+
"type": "number"
|
|
5260
|
+
},
|
|
5261
|
+
{
|
|
5262
|
+
"type": "object",
|
|
5263
|
+
"properties": {
|
|
5264
|
+
"$date": {
|
|
5265
|
+
"type": "string"
|
|
5266
|
+
}
|
|
5267
|
+
},
|
|
5268
|
+
"additionalProperties": false,
|
|
5269
|
+
"required": [
|
|
5270
|
+
"$date"
|
|
5271
|
+
]
|
|
5272
|
+
}
|
|
5273
|
+
]
|
|
5166
5274
|
},
|
|
5167
5275
|
"name": {
|
|
5168
5276
|
"type": "string",
|
|
@@ -7446,6 +7554,9 @@ Schema for a single Webhook
|
|
|
7446
7554
|
"verificationCode": {
|
|
7447
7555
|
"type": "string",
|
|
7448
7556
|
"maxLength": 32767
|
|
7557
|
+
},
|
|
7558
|
+
"waitForReply": {
|
|
7559
|
+
"type": "boolean"
|
|
7449
7560
|
}
|
|
7450
7561
|
}
|
|
7451
7562
|
}
|
|
@@ -7500,6 +7611,9 @@ Schema for the body of a Webhook modification request
|
|
|
7500
7611
|
"verificationCode": {
|
|
7501
7612
|
"type": "string",
|
|
7502
7613
|
"maxLength": 32767
|
|
7614
|
+
},
|
|
7615
|
+
"waitForReply": {
|
|
7616
|
+
"type": "boolean"
|
|
7503
7617
|
}
|
|
7504
7618
|
},
|
|
7505
7619
|
"additionalProperties": false
|
|
@@ -7549,6 +7663,9 @@ Schema for the body of a Webhook creation request
|
|
|
7549
7663
|
"verificationCode": {
|
|
7550
7664
|
"type": "string",
|
|
7551
7665
|
"maxLength": 32767
|
|
7666
|
+
},
|
|
7667
|
+
"waitForReply": {
|
|
7668
|
+
"type": "boolean"
|
|
7552
7669
|
}
|
|
7553
7670
|
},
|
|
7554
7671
|
"required": [
|
|
@@ -7631,6 +7748,9 @@ Schema for a collection of Webhooks
|
|
|
7631
7748
|
"verificationCode": {
|
|
7632
7749
|
"type": "string",
|
|
7633
7750
|
"maxLength": 32767
|
|
7751
|
+
},
|
|
7752
|
+
"waitForReply": {
|
|
7753
|
+
"type": "boolean"
|
|
7634
7754
|
}
|
|
7635
7755
|
}
|
|
7636
7756
|
}
|
data/docs/device.md
CHANGED
|
@@ -142,7 +142,7 @@ puts result
|
|
|
142
142
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
143
143
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
|
144
144
|
| limit | string | N | Max command entries to return (ordered by time descending) | 1 | 10 |
|
|
145
|
-
| since | string | N | Look for command entries since this time (ms since epoch) |
|
|
145
|
+
| since | string | N | Look for command entries since this time (ms since epoch) | | 1465790400000 |
|
|
146
146
|
|
|
147
147
|
#### Successful Responses
|
|
148
148
|
|
|
@@ -178,7 +178,7 @@ puts result
|
|
|
178
178
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
179
179
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
|
180
180
|
| limit | string | N | Max log entries to return (ordered by time descending) | 1 | 10 |
|
|
181
|
-
| since | string | N | Look for log entries since this time (ms since epoch) |
|
|
181
|
+
| since | string | N | Look for log entries since this time (ms since epoch) | | 1465790400000 |
|
|
182
182
|
|
|
183
183
|
#### Successful Responses
|
|
184
184
|
|
|
@@ -214,7 +214,7 @@ puts result
|
|
|
214
214
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
215
215
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
|
216
216
|
| limit | string | N | Max state entries to return (ordered by time descending) | 1 | 10 |
|
|
217
|
-
| since | string | N | Look for state entries since this time (ms since epoch) |
|
|
217
|
+
| since | string | N | Look for state entries since this time (ms since epoch) | | 1465790400000 |
|
|
218
218
|
|
|
219
219
|
#### Successful Responses
|
|
220
220
|
|
data/docs/flow.md
CHANGED
|
@@ -103,7 +103,7 @@ puts result
|
|
|
103
103
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
104
104
|
| flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 |
|
|
105
105
|
| limit | string | N | Max log entries to return (ordered by time descending) | 1 | 10 |
|
|
106
|
-
| since | string | N | Look for log entries since this time (ms since epoch) |
|
|
106
|
+
| since | string | N | Look for log entries since this time (ms since epoch) | | 1465790400000 |
|
|
107
107
|
|
|
108
108
|
#### Successful Responses
|
|
109
109
|
|
data/lib/losant_rest/client.rb
CHANGED
|
@@ -5,7 +5,7 @@ module LosantRest
|
|
|
5
5
|
#
|
|
6
6
|
# User API for accessing Losant data
|
|
7
7
|
#
|
|
8
|
-
# Built For Version 1.4.
|
|
8
|
+
# Built For Version 1.4.10
|
|
9
9
|
class Client
|
|
10
10
|
attr_accessor :auth_token, :url
|
|
11
11
|
|
|
@@ -128,7 +128,7 @@ module LosantRest
|
|
|
128
128
|
|
|
129
129
|
headers["Accept"] = "application/json"
|
|
130
130
|
headers["Content-Type"] = "application/json"
|
|
131
|
-
headers["Accept-Version"] = "^1.4.
|
|
131
|
+
headers["Accept-Version"] = "^1.4.10"
|
|
132
132
|
headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
|
|
133
133
|
path = self.url + options.fetch(:path, "")
|
|
134
134
|
|
data/lib/losant_rest/version.rb
CHANGED
data/schemas/deviceCommand.json
CHANGED
|
@@ -3,8 +3,26 @@
|
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
5
|
"time": {
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "number"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"$date": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": [
|
|
22
|
+
"$date"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
8
26
|
},
|
|
9
27
|
"name": {
|
|
10
28
|
"type": "string",
|
data/schemas/deviceCommands.json
CHANGED
|
@@ -7,8 +7,26 @@
|
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"time": {
|
|
10
|
-
"
|
|
11
|
-
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "number"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"$date": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"$date"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
12
30
|
},
|
|
13
31
|
"name": {
|
|
14
32
|
"type": "string",
|
|
@@ -7,8 +7,26 @@
|
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"time": {
|
|
10
|
-
"
|
|
11
|
-
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "number"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"$date": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"$date"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
12
30
|
},
|
|
13
31
|
"relayId": {
|
|
14
32
|
"type": "string"
|
|
@@ -43,8 +61,26 @@
|
|
|
43
61
|
"type": "object",
|
|
44
62
|
"properties": {
|
|
45
63
|
"time": {
|
|
46
|
-
"
|
|
47
|
-
|
|
64
|
+
"oneOf": [
|
|
65
|
+
{
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "number"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"$date": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": [
|
|
80
|
+
"$date"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
48
84
|
},
|
|
49
85
|
"relayId": {
|
|
50
86
|
"type": "string"
|
data/schemas/deviceStates.json
CHANGED
|
@@ -7,8 +7,26 @@
|
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"time": {
|
|
10
|
-
"
|
|
11
|
-
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "number"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"$date": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"$date"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
12
30
|
},
|
|
13
31
|
"relayId": {
|
|
14
32
|
"type": "string"
|
|
@@ -3,8 +3,26 @@
|
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
5
|
"time": {
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "number"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"$date": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": [
|
|
22
|
+
"$date"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
8
26
|
},
|
|
9
27
|
"name": {
|
|
10
28
|
"type": "string",
|
data/schemas/webhook.json
CHANGED
data/schemas/webhookPatch.json
CHANGED
data/schemas/webhookPost.json
CHANGED
data/schemas/webhooks.json
CHANGED
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.5
|
|
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-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|