losant_rest 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47ea8f796b42c4b171270bac5ffe9dbcf56f5df9
4
- data.tar.gz: 573c095284e1b7f017221892560810daa43f478a
3
+ metadata.gz: c33dbd646eaa7d7af7aeb773c318d0f61fdd277d
4
+ data.tar.gz: 20c1b33756d66c92cd791ba4a5b7614a2a34ca47
5
5
  SHA512:
6
- metadata.gz: ecb7bdbf1e281f4b7891e103a8670c0ac4dfe79ceb2f869b9013aebc5ddd31b4e1536dfb4d32d36352d173f80c951b1e38dcf8d93189dbb2a3aa3e316befa1c3
7
- data.tar.gz: 5d3297f1c9421e5d201cdf81fc1225a86e9b510253ea40c84e2414d42fbb8a4db44b0633992e7554e7924dbe28500a902cf4e1ff053e62e81fd846c60faad1fd
6
+ metadata.gz: 7ffab9d59e6a5407d004c3e94cbbbf739c17e778f9340787aacdb50feb28381dbbdea99163c9047b2184adb7f2d6859d978f33932a8cc5521abc72b55e758264
7
+ data.tar.gz: c303d8317b8a62627dd720bfef5ff4b71940ec96792a185e0942400b81a250cbd829343812b90da85e0a3407f5bd893ed7feb80705404b8473255d70ea6e9183
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 2.4
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.0
4
- - 2.3.3
5
- - 2.2.6
6
- - 2.1.10
3
+ - 2.5
4
+ - 2.4
5
+ - 2.3
6
+ - 2.2
7
+ - 2.1
data/README.md CHANGED
@@ -176,6 +176,12 @@ Each of the following is a method on the client object, and returns a wrapper fo
176
176
  * [experience_views](docs/experienceViews.md)
177
177
  Contains all the actions that can be performed against the collection of [Experience Views](https://docs.losant.com/experiences/views/) belonging to an Application - such as listing views or creating a new view.
178
178
 
179
+ * [file](docs/file.md)
180
+ Contains all the actions that can be performed against a single [File](https://docs.losant.com/applications/files/), such as moving, renaming, or deleting.
181
+
182
+ * [files](docs/files.md)
183
+ Contains all the actions that can be performed against the collection of [Files](https://docs.losant.com/applications/files/) belonging to an Application - such as listing files or uploading a new file.
184
+
179
185
  * [flow](docs/flow.md)
180
186
  Contains all the actions that can be performed against a single [Workflow](https://docs.losant.com/workflows/overview/), such as enabling or disabling a workflow, or triggering a virtual button in the workflow.
181
187
 
data/docs/_schemas.md CHANGED
@@ -423,6 +423,9 @@ Schema for a single Application
423
423
  "experienceViewCount": {
424
424
  "type": "number"
425
425
  },
426
+ "fileCount": {
427
+ "type": "number"
428
+ },
426
429
  "flowCount": {
427
430
  "type": "number"
428
431
  },
@@ -1770,6 +1773,9 @@ Schema for a collection of Applications
1770
1773
  "experienceViewCount": {
1771
1774
  "type": "number"
1772
1775
  },
1776
+ "fileCount": {
1777
+ "type": "number"
1778
+ },
1773
1779
  "flowCount": {
1774
1780
  "type": "number"
1775
1781
  },
@@ -2908,10 +2914,11 @@ Schema for a single Dashboard
2908
2914
  "type": {
2909
2915
  "type": "string",
2910
2916
  "enum": [
2911
- "deviceId",
2912
2917
  "deviceAttribute",
2913
- "string",
2914
- "number"
2918
+ "deviceId",
2919
+ "deviceTag",
2920
+ "number",
2921
+ "string"
2915
2922
  ]
2916
2923
  },
2917
2924
  "applicationId": {
@@ -2919,9 +2926,29 @@ Schema for a single Dashboard
2919
2926
  "pattern": "^[A-Fa-f\\d]{24}$"
2920
2927
  },
2921
2928
  "defaultValue": {
2922
- "type": [
2923
- "string",
2924
- "number"
2929
+ "oneOf": [
2930
+ {
2931
+ "type": "string",
2932
+ "maxLength": 32767
2933
+ },
2934
+ {
2935
+ "type": "number"
2936
+ },
2937
+ {
2938
+ "type": "object",
2939
+ "properties": {
2940
+ "key": {
2941
+ "type": "string",
2942
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
2943
+ },
2944
+ "value": {
2945
+ "type": "string",
2946
+ "minLength": 1,
2947
+ "maxLength": 255
2948
+ }
2949
+ },
2950
+ "additionalProperties": false
2951
+ }
2925
2952
  ]
2926
2953
  },
2927
2954
  "validationEnabled": {
@@ -2945,7 +2972,8 @@ Schema for a single Dashboard
2945
2972
  "items": {
2946
2973
  "type": "string",
2947
2974
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
2948
- }
2975
+ },
2976
+ "maxItems": 100
2949
2977
  },
2950
2978
  "deviceIds": {
2951
2979
  "type": "array",
@@ -2984,7 +3012,8 @@ Schema for a single Dashboard
2984
3012
  "defaultValue"
2985
3013
  ],
2986
3014
  "additionalProperties": false
2987
- }
3015
+ },
3016
+ "maxItems": 100
2988
3017
  }
2989
3018
  }
2990
3019
  }
@@ -3031,9 +3060,29 @@ Schema for a dashboard context instance
3031
3060
  "type": "object",
3032
3061
  "patternProperties": {
3033
3062
  "^[0-9a-zA-Z_-]{1,255}$": {
3034
- "type": [
3035
- "string",
3036
- "number"
3063
+ "oneOf": [
3064
+ {
3065
+ "type": "string",
3066
+ "maxLength": 32767
3067
+ },
3068
+ {
3069
+ "type": "number"
3070
+ },
3071
+ {
3072
+ "type": "object",
3073
+ "properties": {
3074
+ "key": {
3075
+ "type": "string",
3076
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3077
+ },
3078
+ "value": {
3079
+ "type": "string",
3080
+ "minLength": 1,
3081
+ "maxLength": 255
3082
+ }
3083
+ },
3084
+ "additionalProperties": false
3085
+ }
3037
3086
  ]
3038
3087
  }
3039
3088
  },
@@ -3196,10 +3245,11 @@ Schema for the body of a Dashboard modification request
3196
3245
  "type": {
3197
3246
  "type": "string",
3198
3247
  "enum": [
3199
- "deviceId",
3200
3248
  "deviceAttribute",
3201
- "string",
3202
- "number"
3249
+ "deviceId",
3250
+ "deviceTag",
3251
+ "number",
3252
+ "string"
3203
3253
  ]
3204
3254
  },
3205
3255
  "applicationId": {
@@ -3207,9 +3257,29 @@ Schema for the body of a Dashboard modification request
3207
3257
  "pattern": "^[A-Fa-f\\d]{24}$"
3208
3258
  },
3209
3259
  "defaultValue": {
3210
- "type": [
3211
- "string",
3212
- "number"
3260
+ "oneOf": [
3261
+ {
3262
+ "type": "string",
3263
+ "maxLength": 32767
3264
+ },
3265
+ {
3266
+ "type": "number"
3267
+ },
3268
+ {
3269
+ "type": "object",
3270
+ "properties": {
3271
+ "key": {
3272
+ "type": "string",
3273
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3274
+ },
3275
+ "value": {
3276
+ "type": "string",
3277
+ "minLength": 1,
3278
+ "maxLength": 255
3279
+ }
3280
+ },
3281
+ "additionalProperties": false
3282
+ }
3213
3283
  ]
3214
3284
  },
3215
3285
  "validationEnabled": {
@@ -3233,7 +3303,8 @@ Schema for the body of a Dashboard modification request
3233
3303
  "items": {
3234
3304
  "type": "string",
3235
3305
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3236
- }
3306
+ },
3307
+ "maxItems": 100
3237
3308
  },
3238
3309
  "deviceIds": {
3239
3310
  "type": "array",
@@ -3272,7 +3343,8 @@ Schema for the body of a Dashboard modification request
3272
3343
  "defaultValue"
3273
3344
  ],
3274
3345
  "additionalProperties": false
3275
- }
3346
+ },
3347
+ "maxItems": 100
3276
3348
  }
3277
3349
  },
3278
3350
  "additionalProperties": false
@@ -3440,10 +3512,11 @@ Schema for the body of a Dashboard creation request
3440
3512
  "type": {
3441
3513
  "type": "string",
3442
3514
  "enum": [
3443
- "deviceId",
3444
3515
  "deviceAttribute",
3445
- "string",
3446
- "number"
3516
+ "deviceId",
3517
+ "deviceTag",
3518
+ "number",
3519
+ "string"
3447
3520
  ]
3448
3521
  },
3449
3522
  "applicationId": {
@@ -3451,9 +3524,29 @@ Schema for the body of a Dashboard creation request
3451
3524
  "pattern": "^[A-Fa-f\\d]{24}$"
3452
3525
  },
3453
3526
  "defaultValue": {
3454
- "type": [
3455
- "string",
3456
- "number"
3527
+ "oneOf": [
3528
+ {
3529
+ "type": "string",
3530
+ "maxLength": 32767
3531
+ },
3532
+ {
3533
+ "type": "number"
3534
+ },
3535
+ {
3536
+ "type": "object",
3537
+ "properties": {
3538
+ "key": {
3539
+ "type": "string",
3540
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3541
+ },
3542
+ "value": {
3543
+ "type": "string",
3544
+ "minLength": 1,
3545
+ "maxLength": 255
3546
+ }
3547
+ },
3548
+ "additionalProperties": false
3549
+ }
3457
3550
  ]
3458
3551
  },
3459
3552
  "validationEnabled": {
@@ -3477,7 +3570,8 @@ Schema for the body of a Dashboard creation request
3477
3570
  "items": {
3478
3571
  "type": "string",
3479
3572
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3480
- }
3573
+ },
3574
+ "maxItems": 100
3481
3575
  },
3482
3576
  "deviceIds": {
3483
3577
  "type": "array",
@@ -3516,7 +3610,8 @@ Schema for the body of a Dashboard creation request
3516
3610
  "defaultValue"
3517
3611
  ],
3518
3612
  "additionalProperties": false
3519
- }
3613
+ },
3614
+ "maxItems": 100
3520
3615
  }
3521
3616
  },
3522
3617
  "additionalProperties": false,
@@ -3712,10 +3807,11 @@ Schema for a collection of Dashboards
3712
3807
  "type": {
3713
3808
  "type": "string",
3714
3809
  "enum": [
3715
- "deviceId",
3716
3810
  "deviceAttribute",
3717
- "string",
3718
- "number"
3811
+ "deviceId",
3812
+ "deviceTag",
3813
+ "number",
3814
+ "string"
3719
3815
  ]
3720
3816
  },
3721
3817
  "applicationId": {
@@ -3723,9 +3819,29 @@ Schema for a collection of Dashboards
3723
3819
  "pattern": "^[A-Fa-f\\d]{24}$"
3724
3820
  },
3725
3821
  "defaultValue": {
3726
- "type": [
3727
- "string",
3728
- "number"
3822
+ "oneOf": [
3823
+ {
3824
+ "type": "string",
3825
+ "maxLength": 32767
3826
+ },
3827
+ {
3828
+ "type": "number"
3829
+ },
3830
+ {
3831
+ "type": "object",
3832
+ "properties": {
3833
+ "key": {
3834
+ "type": "string",
3835
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3836
+ },
3837
+ "value": {
3838
+ "type": "string",
3839
+ "minLength": 1,
3840
+ "maxLength": 255
3841
+ }
3842
+ },
3843
+ "additionalProperties": false
3844
+ }
3729
3845
  ]
3730
3846
  },
3731
3847
  "validationEnabled": {
@@ -3749,7 +3865,8 @@ Schema for a collection of Dashboards
3749
3865
  "items": {
3750
3866
  "type": "string",
3751
3867
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
3752
- }
3868
+ },
3869
+ "maxItems": 100
3753
3870
  },
3754
3871
  "deviceIds": {
3755
3872
  "type": "array",
@@ -3788,7 +3905,8 @@ Schema for a collection of Dashboards
3788
3905
  "defaultValue"
3789
3906
  ],
3790
3907
  "additionalProperties": false
3791
- }
3908
+ },
3909
+ "maxItems": 100
3792
3910
  }
3793
3911
  }
3794
3912
  }
@@ -9633,11 +9751,11 @@ Schema for a single file
9633
9751
  "name": {
9634
9752
  "type": "string",
9635
9753
  "minLength": 1,
9636
- "maxLength": 2048
9754
+ "maxLength": 1024
9637
9755
  },
9638
9756
  "parentDirectory": {
9639
9757
  "type": "string",
9640
- "maxLength": 2048
9758
+ "maxLength": 1024
9641
9759
  },
9642
9760
  "type": {
9643
9761
  "type": "string",
@@ -9663,6 +9781,13 @@ Schema for a single file
9663
9781
  "type": "number"
9664
9782
  }
9665
9783
  }
9784
+ },
9785
+ "moveIntoId": {
9786
+ "type": "string",
9787
+ "pattern": "^[A-Fa-f\\d]{24}$"
9788
+ },
9789
+ "url": {
9790
+ "type": "string"
9666
9791
  }
9667
9792
  }
9668
9793
  }
@@ -9749,11 +9874,11 @@ Schema to create a single file or directory
9749
9874
  "name": {
9750
9875
  "type": "string",
9751
9876
  "minLength": 1,
9752
- "maxLength": 2048
9877
+ "maxLength": 1024
9753
9878
  },
9754
9879
  "parentDirectory": {
9755
9880
  "type": "string",
9756
- "maxLength": 2048
9881
+ "maxLength": 1024
9757
9882
  },
9758
9883
  "type": {
9759
9884
  "type": "string",
@@ -9849,11 +9974,11 @@ Schema to upload the file to s3
9849
9974
  "name": {
9850
9975
  "type": "string",
9851
9976
  "minLength": 1,
9852
- "maxLength": 2048
9977
+ "maxLength": 1024
9853
9978
  },
9854
9979
  "parentDirectory": {
9855
9980
  "type": "string",
9856
- "maxLength": 2048
9981
+ "maxLength": 1024
9857
9982
  },
9858
9983
  "type": {
9859
9984
  "type": "string",
@@ -10006,11 +10131,11 @@ Schema for a collection of files
10006
10131
  "name": {
10007
10132
  "type": "string",
10008
10133
  "minLength": 1,
10009
- "maxLength": 2048
10134
+ "maxLength": 1024
10010
10135
  },
10011
10136
  "parentDirectory": {
10012
10137
  "type": "string",
10013
- "maxLength": 2048
10138
+ "maxLength": 1024
10014
10139
  },
10015
10140
  "type": {
10016
10141
  "type": "string",
@@ -10036,6 +10161,13 @@ Schema for a collection of files
10036
10161
  "type": "number"
10037
10162
  }
10038
10163
  }
10164
+ },
10165
+ "moveIntoId": {
10166
+ "type": "string",
10167
+ "pattern": "^[A-Fa-f\\d]{24}$"
10168
+ },
10169
+ "url": {
10170
+ "type": "string"
10039
10171
  }
10040
10172
  }
10041
10173
  }
@@ -10197,6 +10329,7 @@ Schema for a single Workflow
10197
10329
  "mqttTopic",
10198
10330
  "request",
10199
10331
  "timer",
10332
+ "udp",
10200
10333
  "virtualButton",
10201
10334
  "webhook"
10202
10335
  ]
@@ -10471,6 +10604,7 @@ Schema for the body of a Workflow modification request
10471
10604
  "mqttTopic",
10472
10605
  "request",
10473
10606
  "timer",
10607
+ "udp",
10474
10608
  "virtualButton",
10475
10609
  "webhook"
10476
10610
  ]
@@ -10633,6 +10767,7 @@ Schema for the body of a Workflow creation request
10633
10767
  "mqttTopic",
10634
10768
  "request",
10635
10769
  "timer",
10770
+ "udp",
10636
10771
  "virtualButton",
10637
10772
  "webhook"
10638
10773
  ]
@@ -10933,6 +11068,7 @@ Schema for a single Workflow Version
10933
11068
  "mqttTopic",
10934
11069
  "request",
10935
11070
  "timer",
11071
+ "udp",
10936
11072
  "virtualButton",
10937
11073
  "webhook"
10938
11074
  ]
@@ -11136,6 +11272,7 @@ Schema for the body of a Workflow Version creation request
11136
11272
  "mqttTopic",
11137
11273
  "request",
11138
11274
  "timer",
11275
+ "udp",
11139
11276
  "virtualButton",
11140
11277
  "webhook"
11141
11278
  ]
@@ -11332,6 +11469,7 @@ Schema for a collection of Workflow Versions
11332
11469
  "mqttTopic",
11333
11470
  "request",
11334
11471
  "timer",
11472
+ "udp",
11335
11473
  "virtualButton",
11336
11474
  "webhook"
11337
11475
  ]
@@ -11595,6 +11733,7 @@ Schema for a collection of Workflows
11595
11733
  "mqttTopic",
11596
11734
  "request",
11597
11735
  "timer",
11736
+ "udp",
11598
11737
  "virtualButton",
11599
11738
  "webhook"
11600
11739
  ]
@@ -13037,6 +13176,9 @@ Schema for information about the currently authenticated user
13037
13176
  "experienceview": {
13038
13177
  "type": "number"
13039
13178
  },
13179
+ "file": {
13180
+ "type": "number"
13181
+ },
13040
13182
  "flow": {
13041
13183
  "type": "number"
13042
13184
  },
@@ -13206,6 +13348,9 @@ Schema for information about the currently authenticated user
13206
13348
  "experienceViewCount": {
13207
13349
  "type": "number"
13208
13350
  },
13351
+ "fileCount": {
13352
+ "type": "number"
13353
+ },
13209
13354
  "flowCount": {
13210
13355
  "type": "number"
13211
13356
  },
@@ -13661,6 +13806,9 @@ Schema for a single Organization
13661
13806
  "experienceview": {
13662
13807
  "type": "number"
13663
13808
  },
13809
+ "file": {
13810
+ "type": "number"
13811
+ },
13664
13812
  "flow": {
13665
13813
  "type": "number"
13666
13814
  },
@@ -13722,6 +13870,9 @@ Schema for a single Organization
13722
13870
  "experienceViewCount": {
13723
13871
  "type": "number"
13724
13872
  },
13873
+ "fileCount": {
13874
+ "type": "number"
13875
+ },
13725
13876
  "flowCount": {
13726
13877
  "type": "number"
13727
13878
  },
@@ -14432,6 +14583,9 @@ Schema for a collection of Organizations
14432
14583
  "experienceview": {
14433
14584
  "type": "number"
14434
14585
  },
14586
+ "file": {
14587
+ "type": "number"
14588
+ },
14435
14589
  "flow": {
14436
14590
  "type": "number"
14437
14591
  },
@@ -14493,6 +14647,9 @@ Schema for a collection of Organizations
14493
14647
  "experienceViewCount": {
14494
14648
  "type": "number"
14495
14649
  },
14650
+ "fileCount": {
14651
+ "type": "number"
14652
+ },
14496
14653
  "flowCount": {
14497
14654
  "type": "number"
14498
14655
  },
@@ -16313,6 +16470,14 @@ Schema for the body of a time series query request
16313
16470
  },
16314
16471
  "limit": {
16315
16472
  "type": "number"
16473
+ },
16474
+ "order": {
16475
+ "type": "string",
16476
+ "enum": [
16477
+ "asc",
16478
+ "desc"
16479
+ ],
16480
+ "default": "asc"
16316
16481
  }
16317
16482
  },
16318
16483
  "additionalProperties": false
data/docs/files.md CHANGED
@@ -39,7 +39,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
39
39
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | myFile |
40
40
  | type | string | N | Limit by the type (file or directory) of the file | | file |
41
41
  | status | string | N | Limit the result to only files of this status. Accepted values are: completed, pending | | completed |
42
- | directory | string | N | Get files that are inside of this directory | / | /a/path/ |
42
+ | directory | string | N | Get files that are inside of this directory | | /a/path/ |
43
43
 
44
44
  #### Successful Responses
45
45
 
@@ -27,7 +27,7 @@ module LosantRest
27
27
  #
28
28
  # User API for accessing Losant data
29
29
  #
30
- # Built For Version 1.10.2
30
+ # Built For Version 1.11.0
31
31
  class Client
32
32
  attr_accessor :auth_token, :url
33
33
 
@@ -246,7 +246,7 @@ module LosantRest
246
246
 
247
247
  headers["Accept"] = "application/json"
248
248
  headers["Content-Type"] = "application/json"
249
- headers["Accept-Version"] = "^1.10.2"
249
+ headers["Accept-Version"] = "^1.11.0"
250
250
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
251
251
  path = self.url + options.fetch(:path, "")
252
252
 
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module LosantRest
24
- VERSION = "1.5.2"
24
+ VERSION = "1.6.0"
25
25
  end
@@ -114,6 +114,9 @@
114
114
  "experienceViewCount": {
115
115
  "type": "number"
116
116
  },
117
+ "fileCount": {
118
+ "type": "number"
119
+ },
117
120
  "flowCount": {
118
121
  "type": "number"
119
122
  },
@@ -121,6 +121,9 @@
121
121
  "experienceViewCount": {
122
122
  "type": "number"
123
123
  },
124
+ "fileCount": {
125
+ "type": "number"
126
+ },
124
127
  "flowCount": {
125
128
  "type": "number"
126
129
  },
@@ -160,10 +160,11 @@
160
160
  "type": {
161
161
  "type": "string",
162
162
  "enum": [
163
- "deviceId",
164
163
  "deviceAttribute",
165
- "string",
166
- "number"
164
+ "deviceId",
165
+ "deviceTag",
166
+ "number",
167
+ "string"
167
168
  ]
168
169
  },
169
170
  "applicationId": {
@@ -171,9 +172,29 @@
171
172
  "pattern": "^[A-Fa-f\\d]{24}$"
172
173
  },
173
174
  "defaultValue": {
174
- "type": [
175
- "string",
176
- "number"
175
+ "oneOf": [
176
+ {
177
+ "type": "string",
178
+ "maxLength": 32767
179
+ },
180
+ {
181
+ "type": "number"
182
+ },
183
+ {
184
+ "type": "object",
185
+ "properties": {
186
+ "key": {
187
+ "type": "string",
188
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
189
+ },
190
+ "value": {
191
+ "type": "string",
192
+ "minLength": 1,
193
+ "maxLength": 255
194
+ }
195
+ },
196
+ "additionalProperties": false
197
+ }
177
198
  ]
178
199
  },
179
200
  "validationEnabled": {
@@ -197,7 +218,8 @@
197
218
  "items": {
198
219
  "type": "string",
199
220
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
200
- }
221
+ },
222
+ "maxItems": 100
201
223
  },
202
224
  "deviceIds": {
203
225
  "type": "array",
@@ -236,7 +258,8 @@
236
258
  "defaultValue"
237
259
  ],
238
260
  "additionalProperties": false
239
- }
261
+ },
262
+ "maxItems": 100
240
263
  }
241
264
  }
242
265
  }
@@ -3,9 +3,29 @@
3
3
  "type": "object",
4
4
  "patternProperties": {
5
5
  "^[0-9a-zA-Z_-]{1,255}$": {
6
- "type": [
7
- "string",
8
- "number"
6
+ "oneOf": [
7
+ {
8
+ "type": "string",
9
+ "maxLength": 32767
10
+ },
11
+ {
12
+ "type": "number"
13
+ },
14
+ {
15
+ "type": "object",
16
+ "properties": {
17
+ "key": {
18
+ "type": "string",
19
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
20
+ },
21
+ "value": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 255
25
+ }
26
+ },
27
+ "additionalProperties": false
28
+ }
9
29
  ]
10
30
  }
11
31
  },
@@ -136,10 +136,11 @@
136
136
  "type": {
137
137
  "type": "string",
138
138
  "enum": [
139
- "deviceId",
140
139
  "deviceAttribute",
141
- "string",
142
- "number"
140
+ "deviceId",
141
+ "deviceTag",
142
+ "number",
143
+ "string"
143
144
  ]
144
145
  },
145
146
  "applicationId": {
@@ -147,9 +148,29 @@
147
148
  "pattern": "^[A-Fa-f\\d]{24}$"
148
149
  },
149
150
  "defaultValue": {
150
- "type": [
151
- "string",
152
- "number"
151
+ "oneOf": [
152
+ {
153
+ "type": "string",
154
+ "maxLength": 32767
155
+ },
156
+ {
157
+ "type": "number"
158
+ },
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "key": {
163
+ "type": "string",
164
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
165
+ },
166
+ "value": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 255
170
+ }
171
+ },
172
+ "additionalProperties": false
173
+ }
153
174
  ]
154
175
  },
155
176
  "validationEnabled": {
@@ -173,7 +194,8 @@
173
194
  "items": {
174
195
  "type": "string",
175
196
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
176
- }
197
+ },
198
+ "maxItems": 100
177
199
  },
178
200
  "deviceIds": {
179
201
  "type": "array",
@@ -212,7 +234,8 @@
212
234
  "defaultValue"
213
235
  ],
214
236
  "additionalProperties": false
215
- }
237
+ },
238
+ "maxItems": 100
216
239
  }
217
240
  },
218
241
  "additionalProperties": false
@@ -140,10 +140,11 @@
140
140
  "type": {
141
141
  "type": "string",
142
142
  "enum": [
143
- "deviceId",
144
143
  "deviceAttribute",
145
- "string",
146
- "number"
144
+ "deviceId",
145
+ "deviceTag",
146
+ "number",
147
+ "string"
147
148
  ]
148
149
  },
149
150
  "applicationId": {
@@ -151,9 +152,29 @@
151
152
  "pattern": "^[A-Fa-f\\d]{24}$"
152
153
  },
153
154
  "defaultValue": {
154
- "type": [
155
- "string",
156
- "number"
155
+ "oneOf": [
156
+ {
157
+ "type": "string",
158
+ "maxLength": 32767
159
+ },
160
+ {
161
+ "type": "number"
162
+ },
163
+ {
164
+ "type": "object",
165
+ "properties": {
166
+ "key": {
167
+ "type": "string",
168
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
169
+ },
170
+ "value": {
171
+ "type": "string",
172
+ "minLength": 1,
173
+ "maxLength": 255
174
+ }
175
+ },
176
+ "additionalProperties": false
177
+ }
157
178
  ]
158
179
  },
159
180
  "validationEnabled": {
@@ -177,7 +198,8 @@
177
198
  "items": {
178
199
  "type": "string",
179
200
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
180
- }
201
+ },
202
+ "maxItems": 100
181
203
  },
182
204
  "deviceIds": {
183
205
  "type": "array",
@@ -216,7 +238,8 @@
216
238
  "defaultValue"
217
239
  ],
218
240
  "additionalProperties": false
219
- }
241
+ },
242
+ "maxItems": 100
220
243
  }
221
244
  },
222
245
  "additionalProperties": false,
@@ -167,10 +167,11 @@
167
167
  "type": {
168
168
  "type": "string",
169
169
  "enum": [
170
- "deviceId",
171
170
  "deviceAttribute",
172
- "string",
173
- "number"
171
+ "deviceId",
172
+ "deviceTag",
173
+ "number",
174
+ "string"
174
175
  ]
175
176
  },
176
177
  "applicationId": {
@@ -178,9 +179,29 @@
178
179
  "pattern": "^[A-Fa-f\\d]{24}$"
179
180
  },
180
181
  "defaultValue": {
181
- "type": [
182
- "string",
183
- "number"
182
+ "oneOf": [
183
+ {
184
+ "type": "string",
185
+ "maxLength": 32767
186
+ },
187
+ {
188
+ "type": "number"
189
+ },
190
+ {
191
+ "type": "object",
192
+ "properties": {
193
+ "key": {
194
+ "type": "string",
195
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
196
+ },
197
+ "value": {
198
+ "type": "string",
199
+ "minLength": 1,
200
+ "maxLength": 255
201
+ }
202
+ },
203
+ "additionalProperties": false
204
+ }
184
205
  ]
185
206
  },
186
207
  "validationEnabled": {
@@ -204,7 +225,8 @@
204
225
  "items": {
205
226
  "type": "string",
206
227
  "pattern": "^[0-9a-zA-Z_-]{1,255}$"
207
- }
228
+ },
229
+ "maxItems": 100
208
230
  },
209
231
  "deviceIds": {
210
232
  "type": "array",
@@ -243,7 +265,8 @@
243
265
  "defaultValue"
244
266
  ],
245
267
  "additionalProperties": false
246
- }
268
+ },
269
+ "maxItems": 100
247
270
  }
248
271
  }
249
272
  }
data/schemas/file.json CHANGED
@@ -43,11 +43,11 @@
43
43
  "name": {
44
44
  "type": "string",
45
45
  "minLength": 1,
46
- "maxLength": 2048
46
+ "maxLength": 1024
47
47
  },
48
48
  "parentDirectory": {
49
49
  "type": "string",
50
- "maxLength": 2048
50
+ "maxLength": 1024
51
51
  },
52
52
  "type": {
53
53
  "type": "string",
@@ -73,6 +73,13 @@
73
73
  "type": "number"
74
74
  }
75
75
  }
76
+ },
77
+ "moveIntoId": {
78
+ "type": "string",
79
+ "pattern": "^[A-Fa-f\\d]{24}$"
80
+ },
81
+ "url": {
82
+ "type": "string"
76
83
  }
77
84
  }
78
85
  }
@@ -5,11 +5,11 @@
5
5
  "name": {
6
6
  "type": "string",
7
7
  "minLength": 1,
8
- "maxLength": 2048
8
+ "maxLength": 1024
9
9
  },
10
10
  "parentDirectory": {
11
11
  "type": "string",
12
- "maxLength": 2048
12
+ "maxLength": 1024
13
13
  },
14
14
  "type": {
15
15
  "type": "string",
@@ -43,11 +43,11 @@
43
43
  "name": {
44
44
  "type": "string",
45
45
  "minLength": 1,
46
- "maxLength": 2048
46
+ "maxLength": 1024
47
47
  },
48
48
  "parentDirectory": {
49
49
  "type": "string",
50
- "maxLength": 2048
50
+ "maxLength": 1024
51
51
  },
52
52
  "type": {
53
53
  "type": "string",
data/schemas/files.json CHANGED
@@ -50,11 +50,11 @@
50
50
  "name": {
51
51
  "type": "string",
52
52
  "minLength": 1,
53
- "maxLength": 2048
53
+ "maxLength": 1024
54
54
  },
55
55
  "parentDirectory": {
56
56
  "type": "string",
57
- "maxLength": 2048
57
+ "maxLength": 1024
58
58
  },
59
59
  "type": {
60
60
  "type": "string",
@@ -80,6 +80,13 @@
80
80
  "type": "number"
81
81
  }
82
82
  }
83
+ },
84
+ "moveIntoId": {
85
+ "type": "string",
86
+ "pattern": "^[A-Fa-f\\d]{24}$"
87
+ },
88
+ "url": {
89
+ "type": "string"
83
90
  }
84
91
  }
85
92
  }
data/schemas/flow.json CHANGED
@@ -77,6 +77,7 @@
77
77
  "mqttTopic",
78
78
  "request",
79
79
  "timer",
80
+ "udp",
80
81
  "virtualButton",
81
82
  "webhook"
82
83
  ]
@@ -53,6 +53,7 @@
53
53
  "mqttTopic",
54
54
  "request",
55
55
  "timer",
56
+ "udp",
56
57
  "virtualButton",
57
58
  "webhook"
58
59
  ]
@@ -42,6 +42,7 @@
42
42
  "mqttTopic",
43
43
  "request",
44
44
  "timer",
45
+ "udp",
45
46
  "virtualButton",
46
47
  "webhook"
47
48
  ]
@@ -66,6 +66,7 @@
66
66
  "mqttTopic",
67
67
  "request",
68
68
  "timer",
69
+ "udp",
69
70
  "virtualButton",
70
71
  "webhook"
71
72
  ]
@@ -42,6 +42,7 @@
42
42
  "mqttTopic",
43
43
  "request",
44
44
  "timer",
45
+ "udp",
45
46
  "virtualButton",
46
47
  "webhook"
47
48
  ]
@@ -73,6 +73,7 @@
73
73
  "mqttTopic",
74
74
  "request",
75
75
  "timer",
76
+ "udp",
76
77
  "virtualButton",
77
78
  "webhook"
78
79
  ]
data/schemas/flows.json CHANGED
@@ -84,6 +84,7 @@
84
84
  "mqttTopic",
85
85
  "request",
86
86
  "timer",
87
+ "udp",
87
88
  "virtualButton",
88
89
  "webhook"
89
90
  ]
data/schemas/me.json CHANGED
@@ -117,6 +117,9 @@
117
117
  "experienceview": {
118
118
  "type": "number"
119
119
  },
120
+ "file": {
121
+ "type": "number"
122
+ },
120
123
  "flow": {
121
124
  "type": "number"
122
125
  },
@@ -286,6 +289,9 @@
286
289
  "experienceViewCount": {
287
290
  "type": "number"
288
291
  },
292
+ "fileCount": {
293
+ "type": "number"
294
+ },
289
295
  "flowCount": {
290
296
  "type": "number"
291
297
  },
data/schemas/org.json CHANGED
@@ -106,6 +106,9 @@
106
106
  "experienceview": {
107
107
  "type": "number"
108
108
  },
109
+ "file": {
110
+ "type": "number"
111
+ },
109
112
  "flow": {
110
113
  "type": "number"
111
114
  },
@@ -167,6 +170,9 @@
167
170
  "experienceViewCount": {
168
171
  "type": "number"
169
172
  },
173
+ "fileCount": {
174
+ "type": "number"
175
+ },
170
176
  "flowCount": {
171
177
  "type": "number"
172
178
  },
data/schemas/orgs.json CHANGED
@@ -113,6 +113,9 @@
113
113
  "experienceview": {
114
114
  "type": "number"
115
115
  },
116
+ "file": {
117
+ "type": "number"
118
+ },
116
119
  "flow": {
117
120
  "type": "number"
118
121
  },
@@ -174,6 +177,9 @@
174
177
  "experienceViewCount": {
175
178
  "type": "number"
176
179
  },
180
+ "fileCount": {
181
+ "type": "number"
182
+ },
177
183
  "flowCount": {
178
184
  "type": "number"
179
185
  },
@@ -64,6 +64,14 @@
64
64
  },
65
65
  "limit": {
66
66
  "type": "number"
67
+ },
68
+ "order": {
69
+ "type": "string",
70
+ "enum": [
71
+ "asc",
72
+ "desc"
73
+ ],
74
+ "default": "asc"
67
75
  }
68
76
  },
69
77
  "additionalProperties": false
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.5.2
4
+ version: 1.6.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: 2018-05-21 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty