losant_rest 1.3.1 → 1.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef9586a583cec12b88e958346cd08b242e96fb31
4
- data.tar.gz: 07d7893adbc24affd6c196a616266481b5a0b13d
3
+ metadata.gz: 6048f4b3865747d2dc87a82f9c571c27e6c933a7
4
+ data.tar.gz: 8e54f646dac21793b8cddad8434f3475cffb5e06
5
5
  SHA512:
6
- metadata.gz: 16320ef8bc067071f5a3d80e57eb538cff9fabe35958ebd9c3a9400d8176d858f3786a9446f32eb31d00692aeceda5423a0cd88dfaf10bd1caf9326e579cfa6a
7
- data.tar.gz: df2ebcdf8885ecfa6be186531048c66a3afa295ff055aaad65f1d89b59aee14a80bf742762f195086f08eabc0f66063c4f41438d61b5aa5aef066454554b94f7
6
+ metadata.gz: fdb9c3986c7f8e7ec2442188236f1ae9c5af0041ceb54816c19d97b2d3006e6be611a96522610f6c8e149000700867d504d56d64e618538bdbdb172c39805955
7
+ data.tar.gz: 7b9119eb4e95a18106f0e048e9dbe3778efcbafe4f44d7ea51ccb674affa0578f1dc091c4d3a1b3ae808ecb275ae85e38a3469ac08de20f3c9edb35806c86d5c
data/docs/_schemas.md CHANGED
@@ -7,6 +7,7 @@
7
7
  * [Application Key](#application-key)
8
8
  * [Application Key Patch](#application-key-patch)
9
9
  * [Application Key Post](#application-key-post)
10
+ * [Application Key Post Response](#application-key-post-response)
10
11
  * [Application Keys](#application-keys)
11
12
  * [Application Patch](#application-patch)
12
13
  * [Application Post](#application-post)
@@ -663,9 +664,6 @@ Schema for a single Application Key
663
664
  "inactive"
664
665
  ]
665
666
  },
666
- "secret": {
667
- "type": "string"
668
- },
669
667
  "deviceIds": {
670
668
  "type": "array",
671
669
  "items": {
@@ -810,6 +808,102 @@ Schema for the body of an Application Key creation request
810
808
 
811
809
  <br/>
812
810
 
811
+ ## Application Key Post Response
812
+
813
+ Schema for a response of Application Key creation
814
+
815
+ ### <a name="application-key-post-response-schema"></a> Schema
816
+
817
+ ```json
818
+ {
819
+ "$schema": "http://json-schema.org/draft-04/schema#",
820
+ "type": "object",
821
+ "properties": {
822
+ "id": {
823
+ "type": "string",
824
+ "pattern": "^[A-Fa-f\\d]{24}$"
825
+ },
826
+ "applicationKeyId": {
827
+ "type": "string",
828
+ "pattern": "^[A-Fa-f\\d]{24}$"
829
+ },
830
+ "applicationId": {
831
+ "type": "string",
832
+ "pattern": "^[A-Fa-f\\d]{24}$"
833
+ },
834
+ "creationDate": {
835
+ "type": "string",
836
+ "format": "date-time"
837
+ },
838
+ "lastUpdated": {
839
+ "type": "string",
840
+ "format": "date-time"
841
+ },
842
+ "key": {
843
+ "type": "string"
844
+ },
845
+ "status": {
846
+ "type": "string",
847
+ "enum": [
848
+ "active",
849
+ "inactive"
850
+ ]
851
+ },
852
+ "secret": {
853
+ "type": "string"
854
+ },
855
+ "deviceIds": {
856
+ "type": "array",
857
+ "items": {
858
+ "type": "string",
859
+ "pattern": "^[A-Fa-f\\d]{24}$"
860
+ },
861
+ "maxItems": 1000
862
+ },
863
+ "deviceTags": {
864
+ "type": "array",
865
+ "items": {
866
+ "type": "object",
867
+ "properties": {
868
+ "key": {
869
+ "type": "string",
870
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
871
+ },
872
+ "value": {
873
+ "type": "string",
874
+ "minLength": 1,
875
+ "maxLength": 255
876
+ }
877
+ },
878
+ "additionalProperties": false
879
+ },
880
+ "maxItems": 100
881
+ },
882
+ "description": {
883
+ "type": "string",
884
+ "maxLength": 32767
885
+ }
886
+ }
887
+ }
888
+ ```
889
+ ### <a name="application-key-post-response-example"></a> Example
890
+
891
+ ```json
892
+ {
893
+ "id": "575ec76c7ae143cd83dc4a96",
894
+ "applicationKeyId": "575ec76c7ae143cd83dc4a96",
895
+ "applicationId": "575ec8687ae143cd83dc4a97",
896
+ "creationDate": "2016-06-13T04:00:00.000Z",
897
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
898
+ "key": "this_would_be_the_key",
899
+ "status": "active",
900
+ "secret": "shhhSecret",
901
+ "description": "An example key description"
902
+ }
903
+ ```
904
+
905
+ <br/>
906
+
813
907
  ## Application Keys
814
908
 
815
909
  Schema for a collection of Application Keys
@@ -858,9 +952,6 @@ Schema for a collection of Application Keys
858
952
  "inactive"
859
953
  ]
860
954
  },
861
- "secret": {
862
- "type": "string"
863
- },
864
955
  "deviceIds": {
865
956
  "type": "array",
866
957
  "items": {
@@ -4479,6 +4570,9 @@ Schema for the body of a bulk Device creation request
4479
4570
  },
4480
4571
  "csv": {
4481
4572
  "type": "string"
4573
+ },
4574
+ "makeUniqueKeySecret": {
4575
+ "type": "boolean"
4482
4576
  }
4483
4577
  },
4484
4578
  "additionalProperties": false,
@@ -81,7 +81,7 @@ all.Application, all.Organization, all.User, applicationKeys.*, or applicationKe
81
81
 
82
82
  | Code | Type | Description |
83
83
  | ---- | ---- | ----------- |
84
- | 201 | [Application Key](_schemas.md#application-key) | Successfully created applicationKey |
84
+ | 201 | [Application Key Post Response](_schemas.md#application-key-post-response) | Successfully created applicationKey |
85
85
 
86
86
  #### Error Responses
87
87
 
@@ -102,7 +102,7 @@ module LosantRest
102
102
  # * {boolean} _embedded - Return embedded resources in response
103
103
  #
104
104
  # Responses:
105
- # * 201 - Successfully created applicationKey (https://api.losant.com/#/definitions/applicationKey)
105
+ # * 201 - Successfully created applicationKey (https://api.losant.com/#/definitions/applicationKeyPostResponse)
106
106
  #
107
107
  # Errors:
108
108
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
@@ -27,7 +27,7 @@ module LosantRest
27
27
  #
28
28
  # User API for accessing Losant data
29
29
  #
30
- # Built For Version 1.7.1
30
+ # Built For Version 1.7.2
31
31
  class Client
32
32
  attr_accessor :auth_token, :url
33
33
 
@@ -218,7 +218,7 @@ module LosantRest
218
218
 
219
219
  headers["Accept"] = "application/json"
220
220
  headers["Content-Type"] = "application/json"
221
- headers["Accept-Version"] = "^1.7.1"
221
+ headers["Accept-Version"] = "^1.7.2"
222
222
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
223
223
  path = self.url + options.fetch(:path, "")
224
224
 
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module LosantRest
24
- VERSION = "1.3.1"
24
+ VERSION = "1.3.2"
25
25
  end
@@ -32,9 +32,6 @@
32
32
  "inactive"
33
33
  ]
34
34
  },
35
- "secret": {
36
- "type": "string"
37
- },
38
35
  "deviceIds": {
39
36
  "type": "array",
40
37
  "items": {
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "applicationKeyId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Fa-f\\d]{24}$"
12
+ },
13
+ "applicationId": {
14
+ "type": "string",
15
+ "pattern": "^[A-Fa-f\\d]{24}$"
16
+ },
17
+ "creationDate": {
18
+ "type": "string",
19
+ "format": "date-time"
20
+ },
21
+ "lastUpdated": {
22
+ "type": "string",
23
+ "format": "date-time"
24
+ },
25
+ "key": {
26
+ "type": "string"
27
+ },
28
+ "status": {
29
+ "type": "string",
30
+ "enum": [
31
+ "active",
32
+ "inactive"
33
+ ]
34
+ },
35
+ "secret": {
36
+ "type": "string"
37
+ },
38
+ "deviceIds": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string",
42
+ "pattern": "^[A-Fa-f\\d]{24}$"
43
+ },
44
+ "maxItems": 1000
45
+ },
46
+ "deviceTags": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "key": {
52
+ "type": "string",
53
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
54
+ },
55
+ "value": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 255
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ "maxItems": 100
64
+ },
65
+ "description": {
66
+ "type": "string",
67
+ "maxLength": 32767
68
+ }
69
+ }
70
+ }
@@ -39,9 +39,6 @@
39
39
  "inactive"
40
40
  ]
41
41
  },
42
- "secret": {
43
- "type": "string"
44
- },
45
42
  "deviceIds": {
46
43
  "type": "array",
47
44
  "items": {
@@ -10,6 +10,9 @@
10
10
  },
11
11
  "csv": {
12
12
  "type": "string"
13
+ },
14
+ "makeUniqueKeySecret": {
15
+ "type": "boolean"
13
16
  }
14
17
  },
15
18
  "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.3.1
4
+ version: 1.3.2
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-09-06 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -184,6 +184,7 @@ files:
184
184
  - schemas/applicationKey.json
185
185
  - schemas/applicationKeyPatch.json
186
186
  - schemas/applicationKeyPost.json
187
+ - schemas/applicationKeyPostResponse.json
187
188
  - schemas/applicationKeys.json
188
189
  - schemas/applicationPatch.json
189
190
  - schemas/applicationPost.json