artikcloud 2.0.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 (193) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +65 -0
  4. data/LICENSE +202 -0
  5. data/README.md +230 -0
  6. data/artikcloud.gemspec +32 -0
  7. data/docs/AckEnvelope.md +8 -0
  8. data/docs/Acknowledgement.md +11 -0
  9. data/docs/ActionDetails.md +9 -0
  10. data/docs/ActionDetailsArray.md +8 -0
  11. data/docs/ActionIn.md +13 -0
  12. data/docs/ActionOut.md +12 -0
  13. data/docs/AggregateData.md +13 -0
  14. data/docs/AggregatesHistogramData.md +14 -0
  15. data/docs/AggregatesHistogramResponse.md +14 -0
  16. data/docs/AggregatesResponse.md +13 -0
  17. data/docs/AppProperties.md +10 -0
  18. data/docs/CheckTokenMessage.md +8 -0
  19. data/docs/CheckTokenResponse.md +8 -0
  20. data/docs/Device.md +21 -0
  21. data/docs/DeviceArray.md +8 -0
  22. data/docs/DeviceEnvelope.md +8 -0
  23. data/docs/DeviceRegCompleteRequest.md +8 -0
  24. data/docs/DeviceRegConfirmUserRequest.md +10 -0
  25. data/docs/DeviceRegConfirmUserResponse.md +8 -0
  26. data/docs/DeviceRegConfirmUserResponseEnvelope.md +8 -0
  27. data/docs/DeviceRegStatusResponse.md +9 -0
  28. data/docs/DeviceRegStatusResponseEnvelope.md +8 -0
  29. data/docs/DeviceToken.md +11 -0
  30. data/docs/DeviceTokenEnvelope.md +8 -0
  31. data/docs/DeviceType.md +25 -0
  32. data/docs/DeviceTypeArray.md +8 -0
  33. data/docs/DeviceTypeEnvelope.md +8 -0
  34. data/docs/DeviceTypesApi.md +284 -0
  35. data/docs/DeviceTypesEnvelope.md +11 -0
  36. data/docs/DevicesApi.md +382 -0
  37. data/docs/DevicesEnvelope.md +11 -0
  38. data/docs/ErrorEnvelope.md +8 -0
  39. data/docs/ExportApi.md +225 -0
  40. data/docs/ExportData.md +14 -0
  41. data/docs/ExportDataArray.md +8 -0
  42. data/docs/ExportHistoryResponse.md +11 -0
  43. data/docs/ExportNormalizedMessagesResponse.md +20 -0
  44. data/docs/ExportRequest.md +15 -0
  45. data/docs/ExportRequestData.md +18 -0
  46. data/docs/ExportRequestInfo.md +17 -0
  47. data/docs/ExportRequestResponse.md +8 -0
  48. data/docs/ExportResponse.md +18 -0
  49. data/docs/ExportStatusResponse.md +12 -0
  50. data/docs/FieldPath.md +8 -0
  51. data/docs/FieldPresence.md +8 -0
  52. data/docs/FieldPresenceEnvelope.md +14 -0
  53. data/docs/FieldsActions.md +9 -0
  54. data/docs/ManifestProperties.md +8 -0
  55. data/docs/ManifestPropertiesEnvelope.md +8 -0
  56. data/docs/ManifestVersions.md +8 -0
  57. data/docs/ManifestVersionsEnvelope.md +8 -0
  58. data/docs/MessageAction.md +12 -0
  59. data/docs/MessageID.md +8 -0
  60. data/docs/MessageIDEnvelope.md +8 -0
  61. data/docs/MessageIn.md +13 -0
  62. data/docs/MessageOut.md +12 -0
  63. data/docs/MessagesApi.md +382 -0
  64. data/docs/NonEmptyString.md +8 -0
  65. data/docs/NormalizedMessage.md +15 -0
  66. data/docs/NormalizedMessagesEnvelope.md +17 -0
  67. data/docs/OutputRule.md +21 -0
  68. data/docs/PropertiesEnvelope.md +8 -0
  69. data/docs/RefreshTokenResponse.md +11 -0
  70. data/docs/RegisterMessage.md +12 -0
  71. data/docs/RegistrationsApi.md +167 -0
  72. data/docs/RuleArray.md +8 -0
  73. data/docs/RuleCreationInfo.md +11 -0
  74. data/docs/RuleEnvelope.md +8 -0
  75. data/docs/RuleError.md +11 -0
  76. data/docs/RuleUpdateInfo.md +11 -0
  77. data/docs/RuleWarningOutput.md +9 -0
  78. data/docs/RulesApi.md +226 -0
  79. data/docs/RulesEnvelope.md +11 -0
  80. data/docs/Tag.md +9 -0
  81. data/docs/TagArray.md +8 -0
  82. data/docs/TagsApi.md +169 -0
  83. data/docs/TagsEnvelope.md +8 -0
  84. data/docs/Token.md +11 -0
  85. data/docs/TokenRequest.md +8 -0
  86. data/docs/TokenResponse.md +8 -0
  87. data/docs/TokensApi.md +117 -0
  88. data/docs/UnregisterDeviceResponse.md +18 -0
  89. data/docs/UnregisterDeviceResponseEnvelope.md +8 -0
  90. data/docs/User.md +14 -0
  91. data/docs/UserEnvelope.md +8 -0
  92. data/docs/UsersApi.md +474 -0
  93. data/docs/WebSocketError.md +10 -0
  94. data/git_push.sh +52 -0
  95. data/lib/artikcloud/api/device_types_api.rb +340 -0
  96. data/lib/artikcloud/api/devices_api.rb +450 -0
  97. data/lib/artikcloud/api/export_api.rb +269 -0
  98. data/lib/artikcloud/api/messages_api.rb +468 -0
  99. data/lib/artikcloud/api/registrations_api.rb +205 -0
  100. data/lib/artikcloud/api/rules_api.rb +276 -0
  101. data/lib/artikcloud/api/tags_api.rb +209 -0
  102. data/lib/artikcloud/api/tokens_api.rb +152 -0
  103. data/lib/artikcloud/api/users_api.rb +552 -0
  104. data/lib/artikcloud/api_client.rb +336 -0
  105. data/lib/artikcloud/api_error.rb +38 -0
  106. data/lib/artikcloud/configuration.rb +170 -0
  107. data/lib/artikcloud/models/ack_envelope.rb +164 -0
  108. data/lib/artikcloud/models/acknowledgement.rb +198 -0
  109. data/lib/artikcloud/models/action_details.rb +178 -0
  110. data/lib/artikcloud/models/action_details_array.rb +166 -0
  111. data/lib/artikcloud/models/action_in.rb +221 -0
  112. data/lib/artikcloud/models/action_out.rb +209 -0
  113. data/lib/artikcloud/models/aggregate_data.rb +214 -0
  114. data/lib/artikcloud/models/aggregates_histogram_data.rb +224 -0
  115. data/lib/artikcloud/models/aggregates_histogram_response.rb +226 -0
  116. data/lib/artikcloud/models/aggregates_response.rb +216 -0
  117. data/lib/artikcloud/models/app_properties.rb +184 -0
  118. data/lib/artikcloud/models/check_token_message.rb +164 -0
  119. data/lib/artikcloud/models/check_token_response.rb +164 -0
  120. data/lib/artikcloud/models/device.rb +310 -0
  121. data/lib/artikcloud/models/device_array.rb +166 -0
  122. data/lib/artikcloud/models/device_envelope.rb +164 -0
  123. data/lib/artikcloud/models/device_reg_complete_request.rb +165 -0
  124. data/lib/artikcloud/models/device_reg_confirm_user_request.rb +187 -0
  125. data/lib/artikcloud/models/device_reg_confirm_user_response.rb +165 -0
  126. data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +164 -0
  127. data/lib/artikcloud/models/device_reg_status_response.rb +176 -0
  128. data/lib/artikcloud/models/device_reg_status_response_envelope.rb +164 -0
  129. data/lib/artikcloud/models/device_token.rb +194 -0
  130. data/lib/artikcloud/models/device_token_envelope.rb +164 -0
  131. data/lib/artikcloud/models/device_type.rb +353 -0
  132. data/lib/artikcloud/models/device_type_array.rb +166 -0
  133. data/lib/artikcloud/models/device_type_envelope.rb +164 -0
  134. data/lib/artikcloud/models/device_types_envelope.rb +194 -0
  135. data/lib/artikcloud/models/devices_envelope.rb +194 -0
  136. data/lib/artikcloud/models/error_envelope.rb +165 -0
  137. data/lib/artikcloud/models/export_data.rb +225 -0
  138. data/lib/artikcloud/models/export_data_array.rb +166 -0
  139. data/lib/artikcloud/models/export_history_response.rb +194 -0
  140. data/lib/artikcloud/models/export_normalized_messages_response.rb +284 -0
  141. data/lib/artikcloud/models/export_request.rb +234 -0
  142. data/lib/artikcloud/models/export_request_data.rb +275 -0
  143. data/lib/artikcloud/models/export_request_info.rb +264 -0
  144. data/lib/artikcloud/models/export_request_response.rb +164 -0
  145. data/lib/artikcloud/models/export_response.rb +275 -0
  146. data/lib/artikcloud/models/export_status_response.rb +205 -0
  147. data/lib/artikcloud/models/field_path.rb +166 -0
  148. data/lib/artikcloud/models/field_presence.rb +164 -0
  149. data/lib/artikcloud/models/field_presence_envelope.rb +226 -0
  150. data/lib/artikcloud/models/fields_actions.rb +180 -0
  151. data/lib/artikcloud/models/manifest_properties.rb +164 -0
  152. data/lib/artikcloud/models/manifest_properties_envelope.rb +164 -0
  153. data/lib/artikcloud/models/manifest_versions.rb +166 -0
  154. data/lib/artikcloud/models/manifest_versions_envelope.rb +164 -0
  155. data/lib/artikcloud/models/message_action.rb +210 -0
  156. data/lib/artikcloud/models/message_id.rb +165 -0
  157. data/lib/artikcloud/models/message_id_envelope.rb +164 -0
  158. data/lib/artikcloud/models/message_in.rb +224 -0
  159. data/lib/artikcloud/models/message_out.rb +209 -0
  160. data/lib/artikcloud/models/non_empty_string.rb +164 -0
  161. data/lib/artikcloud/models/normalized_message.rb +236 -0
  162. data/lib/artikcloud/models/normalized_messages_envelope.rb +256 -0
  163. data/lib/artikcloud/models/output_rule.rb +296 -0
  164. data/lib/artikcloud/models/properties_envelope.rb +164 -0
  165. data/lib/artikcloud/models/refresh_token_response.rb +194 -0
  166. data/lib/artikcloud/models/register_message.rb +211 -0
  167. data/lib/artikcloud/models/rule_array.rb +166 -0
  168. data/lib/artikcloud/models/rule_creation_info.rb +200 -0
  169. data/lib/artikcloud/models/rule_envelope.rb +164 -0
  170. data/lib/artikcloud/models/rule_error.rb +196 -0
  171. data/lib/artikcloud/models/rule_update_info.rb +200 -0
  172. data/lib/artikcloud/models/rule_warning_output.rb +174 -0
  173. data/lib/artikcloud/models/rules_envelope.rb +194 -0
  174. data/lib/artikcloud/models/tag.rb +176 -0
  175. data/lib/artikcloud/models/tag_array.rb +166 -0
  176. data/lib/artikcloud/models/tags_envelope.rb +164 -0
  177. data/lib/artikcloud/models/token.rb +194 -0
  178. data/lib/artikcloud/models/token_request.rb +164 -0
  179. data/lib/artikcloud/models/token_response.rb +164 -0
  180. data/lib/artikcloud/models/unregister_device_response.rb +275 -0
  181. data/lib/artikcloud/models/unregister_device_response_envelope.rb +164 -0
  182. data/lib/artikcloud/models/user.rb +224 -0
  183. data/lib/artikcloud/models/user_envelope.rb +164 -0
  184. data/lib/artikcloud/models/web_socket_error.rb +187 -0
  185. data/lib/artikcloud/version.rb +17 -0
  186. data/lib/artikcloud.rb +128 -0
  187. data/pom.xml +60 -0
  188. data/spec/api/messages_api_spec.rb +79 -0
  189. data/spec/api/tokens_api_spec.rb +79 -0
  190. data/spec/api/users_api_spec.rb +50 -0
  191. data/spec/spec.opts +4 -0
  192. data/spec/spec_helper.rb +36 -0
  193. metadata +420 -0
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::PropertiesEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**AppProperties**](AppProperties.md) | |
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::RefreshTokenResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **access_token** | **String** | | [optional]
7
+ **expires_in** | **Integer** | | [optional]
8
+ **refresh_token** | **String** | | [optional]
9
+ **token_type** | **String** | | [optional]
10
+
11
+
@@ -0,0 +1,12 @@
1
+ # ArtikCloud::RegisterMessage
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cid** | **String** | Confirmation ID. | [optional]
7
+ **authorization** | **String** | Authorization header containing access token (Bearer <access_token>). | [optional]
8
+ **sdid** | **String** | Source Device ID. | [optional]
9
+ **ts** | **Integer** | Timestamp (past, present or future). Defaults to current time if not provided. | [optional]
10
+ **type** | **String** | Type. | [optional] [default to "register"]
11
+
12
+
@@ -0,0 +1,167 @@
1
+ # ArtikCloud::RegistrationsApi
2
+
3
+ All URIs are relative to *https://api.artik.cloud/v1.1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**confirm_user**](RegistrationsApi.md#confirm_user) | **PUT** /devices/registrations/pin | Confirm User
8
+ [**get_request_status_for_user**](RegistrationsApi.md#get_request_status_for_user) | **GET** /devices/registrations/{requestId}/status | Get Request Status For User
9
+ [**unregister_device**](RegistrationsApi.md#unregister_device) | **DELETE** /devices/{deviceId}/registrations | Unregister Device
10
+
11
+
12
+ # **confirm_user**
13
+ > DeviceRegConfirmUserResponseEnvelope confirm_user(registration_info)
14
+
15
+ Confirm User
16
+
17
+ This call updates the registration request issued earlier by associating it with an authenticated user and captures all additional information required to add a new device.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'artikcloud'
23
+ # setup authorization
24
+ ArtikCloud.configure do |config|
25
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
26
+ config.access_token = 'YOUR ACCESS TOKEN'
27
+ end
28
+
29
+ api_instance = ArtikCloud::RegistrationsApi.new
30
+
31
+ registration_info = ArtikCloud::DeviceRegConfirmUserRequest.new # DeviceRegConfirmUserRequest | Device Registration information.
32
+
33
+
34
+ begin
35
+ #Confirm User
36
+ result = api_instance.confirm_user(registration_info)
37
+ p result
38
+ rescue ArtikCloud::ApiError => e
39
+ puts "Exception when calling RegistrationsApi->confirm_user: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **registration_info** | [**DeviceRegConfirmUserRequest**](DeviceRegConfirmUserRequest.md)| Device Registration information. |
48
+
49
+ ### Return type
50
+
51
+ [**DeviceRegConfirmUserResponseEnvelope**](DeviceRegConfirmUserResponseEnvelope.md)
52
+
53
+ ### Authorization
54
+
55
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
56
+
57
+ ### HTTP reuqest headers
58
+
59
+ - **Content-Type**: Not defined
60
+ - **Accept**: application/json
61
+
62
+
63
+
64
+ # **get_request_status_for_user**
65
+ > DeviceRegStatusResponseEnvelope get_request_status_for_user(request_id)
66
+
67
+ Get Request Status For User
68
+
69
+ This call checks the status of the request so users can poll and know when registration is complete.
70
+
71
+ ### Example
72
+ ```ruby
73
+ # load the gem
74
+ require 'artikcloud'
75
+ # setup authorization
76
+ ArtikCloud.configure do |config|
77
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
78
+ config.access_token = 'YOUR ACCESS TOKEN'
79
+ end
80
+
81
+ api_instance = ArtikCloud::RegistrationsApi.new
82
+
83
+ request_id = "request_id_example" # String | Request ID.
84
+
85
+
86
+ begin
87
+ #Get Request Status For User
88
+ result = api_instance.get_request_status_for_user(request_id)
89
+ p result
90
+ rescue ArtikCloud::ApiError => e
91
+ puts "Exception when calling RegistrationsApi->get_request_status_for_user: #{e}"
92
+ end
93
+ ```
94
+
95
+ ### Parameters
96
+
97
+ Name | Type | Description | Notes
98
+ ------------- | ------------- | ------------- | -------------
99
+ **request_id** | **String**| Request ID. |
100
+
101
+ ### Return type
102
+
103
+ [**DeviceRegStatusResponseEnvelope**](DeviceRegStatusResponseEnvelope.md)
104
+
105
+ ### Authorization
106
+
107
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
108
+
109
+ ### HTTP reuqest headers
110
+
111
+ - **Content-Type**: Not defined
112
+ - **Accept**: application/json
113
+
114
+
115
+
116
+ # **unregister_device**
117
+ > UnregisterDeviceResponseEnvelope unregister_device(device_id)
118
+
119
+ Unregister Device
120
+
121
+ This call clears any associations from the secure device registration.
122
+
123
+ ### Example
124
+ ```ruby
125
+ # load the gem
126
+ require 'artikcloud'
127
+ # setup authorization
128
+ ArtikCloud.configure do |config|
129
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
130
+ config.access_token = 'YOUR ACCESS TOKEN'
131
+ end
132
+
133
+ api_instance = ArtikCloud::RegistrationsApi.new
134
+
135
+ device_id = "device_id_example" # String | Device ID.
136
+
137
+
138
+ begin
139
+ #Unregister Device
140
+ result = api_instance.unregister_device(device_id)
141
+ p result
142
+ rescue ArtikCloud::ApiError => e
143
+ puts "Exception when calling RegistrationsApi->unregister_device: #{e}"
144
+ end
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+ Name | Type | Description | Notes
150
+ ------------- | ------------- | ------------- | -------------
151
+ **device_id** | **String**| Device ID. |
152
+
153
+ ### Return type
154
+
155
+ [**UnregisterDeviceResponseEnvelope**](UnregisterDeviceResponseEnvelope.md)
156
+
157
+ ### Authorization
158
+
159
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
160
+
161
+ ### HTTP reuqest headers
162
+
163
+ - **Content-Type**: Not defined
164
+ - **Accept**: application/json
165
+
166
+
167
+
data/docs/RuleArray.md ADDED
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::RuleArray
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **rules** | [**Array<OutputRule>**](OutputRule.md) | | [optional]
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::RuleCreationInfo
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **description** | **String** | Description | [optional]
7
+ **enabled** | **BOOLEAN** | Is Enabled | [optional]
8
+ **name** | **String** | Name | [optional]
9
+ **rule** | **Hash<String, Object>** | Rule | [optional]
10
+
11
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::RuleEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**OutputRule**](OutputRule.md) | | [optional]
7
+
8
+
data/docs/RuleError.md ADDED
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::RuleError
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_code** | **Integer** | | [optional]
7
+ **field_path** | [**FieldPath**](FieldPath.md) | | [optional]
8
+ **message_args** | **Array<String>** | | [optional]
9
+ **message_key** | **String** | | [optional]
10
+
11
+
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::RuleUpdateInfo
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **description** | **String** | Description | [optional]
7
+ **enabled** | **BOOLEAN** | Is Enabled | [optional]
8
+ **name** | **String** | Name | [optional]
9
+ **rule** | **Hash<String, Object>** | Rule | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # ArtikCloud::RuleWarningOutput
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | | [optional]
7
+ **message** | **String** | | [optional]
8
+
9
+
data/docs/RulesApi.md ADDED
@@ -0,0 +1,226 @@
1
+ # ArtikCloud::RulesApi
2
+
3
+ All URIs are relative to *https://api.artik.cloud/v1.1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_rule**](RulesApi.md#create_rule) | **POST** /rules | Create Rule
8
+ [**delete_rule**](RulesApi.md#delete_rule) | **DELETE** /rules/{ruleId} | Delete Rule
9
+ [**get_rule**](RulesApi.md#get_rule) | **GET** /rules/{ruleId} | Get Rule
10
+ [**update_rule**](RulesApi.md#update_rule) | **PUT** /rules/{ruleId} | Update Rule
11
+
12
+
13
+ # **create_rule**
14
+ > RuleEnvelope create_rule(rule_info, user_id)
15
+
16
+ Create Rule
17
+
18
+ Create a new Rule
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'artikcloud'
24
+ # setup authorization
25
+ ArtikCloud.configure do |config|
26
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
27
+ config.access_token = 'YOUR ACCESS TOKEN'
28
+ end
29
+
30
+ api_instance = ArtikCloud::RulesApi.new
31
+
32
+ rule_info = ArtikCloud::RuleCreationInfo.new # RuleCreationInfo | Rule object that needs to be added
33
+
34
+ user_id = "user_id_example" # String | User ID
35
+
36
+
37
+ begin
38
+ #Create Rule
39
+ result = api_instance.create_rule(rule_info, user_id)
40
+ p result
41
+ rescue ArtikCloud::ApiError => e
42
+ puts "Exception when calling RulesApi->create_rule: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **rule_info** | [**RuleCreationInfo**](RuleCreationInfo.md)| Rule object that needs to be added |
51
+ **user_id** | **String**| User ID |
52
+
53
+ ### Return type
54
+
55
+ [**RuleEnvelope**](RuleEnvelope.md)
56
+
57
+ ### Authorization
58
+
59
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
60
+
61
+ ### HTTP reuqest headers
62
+
63
+ - **Content-Type**: Not defined
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **delete_rule**
69
+ > RuleEnvelope delete_rule(rule_id)
70
+
71
+ Delete Rule
72
+
73
+ Delete a Rule
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'artikcloud'
79
+ # setup authorization
80
+ ArtikCloud.configure do |config|
81
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
82
+ config.access_token = 'YOUR ACCESS TOKEN'
83
+ end
84
+
85
+ api_instance = ArtikCloud::RulesApi.new
86
+
87
+ rule_id = "rule_id_example" # String | Rule ID.
88
+
89
+
90
+ begin
91
+ #Delete Rule
92
+ result = api_instance.delete_rule(rule_id)
93
+ p result
94
+ rescue ArtikCloud::ApiError => e
95
+ puts "Exception when calling RulesApi->delete_rule: #{e}"
96
+ end
97
+ ```
98
+
99
+ ### Parameters
100
+
101
+ Name | Type | Description | Notes
102
+ ------------- | ------------- | ------------- | -------------
103
+ **rule_id** | **String**| Rule ID. |
104
+
105
+ ### Return type
106
+
107
+ [**RuleEnvelope**](RuleEnvelope.md)
108
+
109
+ ### Authorization
110
+
111
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
112
+
113
+ ### HTTP reuqest headers
114
+
115
+ - **Content-Type**: Not defined
116
+ - **Accept**: application/json
117
+
118
+
119
+
120
+ # **get_rule**
121
+ > RuleEnvelope get_rule(rule_id)
122
+
123
+ Get Rule
124
+
125
+ Get a rule using the Rule ID
126
+
127
+ ### Example
128
+ ```ruby
129
+ # load the gem
130
+ require 'artikcloud'
131
+ # setup authorization
132
+ ArtikCloud.configure do |config|
133
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
134
+ config.access_token = 'YOUR ACCESS TOKEN'
135
+ end
136
+
137
+ api_instance = ArtikCloud::RulesApi.new
138
+
139
+ rule_id = "rule_id_example" # String | Rule ID.
140
+
141
+
142
+ begin
143
+ #Get Rule
144
+ result = api_instance.get_rule(rule_id)
145
+ p result
146
+ rescue ArtikCloud::ApiError => e
147
+ puts "Exception when calling RulesApi->get_rule: #{e}"
148
+ end
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+ Name | Type | Description | Notes
154
+ ------------- | ------------- | ------------- | -------------
155
+ **rule_id** | **String**| Rule ID. |
156
+
157
+ ### Return type
158
+
159
+ [**RuleEnvelope**](RuleEnvelope.md)
160
+
161
+ ### Authorization
162
+
163
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
164
+
165
+ ### HTTP reuqest headers
166
+
167
+ - **Content-Type**: Not defined
168
+ - **Accept**: application/json
169
+
170
+
171
+
172
+ # **update_rule**
173
+ > RuleEnvelope update_rule(rule_id, rule_info)
174
+
175
+ Update Rule
176
+
177
+ Update an existing Rule
178
+
179
+ ### Example
180
+ ```ruby
181
+ # load the gem
182
+ require 'artikcloud'
183
+ # setup authorization
184
+ ArtikCloud.configure do |config|
185
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
186
+ config.access_token = 'YOUR ACCESS TOKEN'
187
+ end
188
+
189
+ api_instance = ArtikCloud::RulesApi.new
190
+
191
+ rule_id = "rule_id_example" # String | Rule ID.
192
+
193
+ rule_info = ArtikCloud::RuleUpdateInfo.new # RuleUpdateInfo | Rule object that needs to be updated
194
+
195
+
196
+ begin
197
+ #Update Rule
198
+ result = api_instance.update_rule(rule_id, rule_info)
199
+ p result
200
+ rescue ArtikCloud::ApiError => e
201
+ puts "Exception when calling RulesApi->update_rule: #{e}"
202
+ end
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+ Name | Type | Description | Notes
208
+ ------------- | ------------- | ------------- | -------------
209
+ **rule_id** | **String**| Rule ID. |
210
+ **rule_info** | [**RuleUpdateInfo**](RuleUpdateInfo.md)| Rule object that needs to be updated |
211
+
212
+ ### Return type
213
+
214
+ [**RuleEnvelope**](RuleEnvelope.md)
215
+
216
+ ### Authorization
217
+
218
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
219
+
220
+ ### HTTP reuqest headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: application/json
224
+
225
+
226
+
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::RulesEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **count** | **Integer** | | [optional]
7
+ **data** | [**RuleArray**](RuleArray.md) | | [optional]
8
+ **offset** | **Integer** | | [optional]
9
+ **total** | **Integer** | | [optional]
10
+
11
+
data/docs/Tag.md ADDED
@@ -0,0 +1,9 @@
1
+ # ArtikCloud::Tag
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | Tag Name. | [optional]
7
+ **is_category** | **BOOLEAN** | Is Category. | [optional]
8
+
9
+
data/docs/TagArray.md ADDED
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TagArray
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **tags** | [**Array<Tag>**](Tag.md) | | [optional]
7
+
8
+
data/docs/TagsApi.md ADDED
@@ -0,0 +1,169 @@
1
+ # ArtikCloud::TagsApi
2
+
3
+ All URIs are relative to *https://api.artik.cloud/v1.1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_tag_categories**](TagsApi.md#get_tag_categories) | **GET** /tags/categories | Get all categories
8
+ [**get_tag_suggestions**](TagsApi.md#get_tag_suggestions) | **GET** /tags/suggestions | Get tag suggestions
9
+ [**get_tags_by_categories**](TagsApi.md#get_tags_by_categories) | **GET** /tags | Get all tags of categories
10
+
11
+
12
+ # **get_tag_categories**
13
+ > TagsEnvelope get_tag_categories
14
+
15
+ Get all categories
16
+
17
+ Get all tags marked as categories
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'artikcloud'
23
+ # setup authorization
24
+ ArtikCloud.configure do |config|
25
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
26
+ config.access_token = 'YOUR ACCESS TOKEN'
27
+ end
28
+
29
+ api_instance = ArtikCloud::TagsApi.new
30
+
31
+ begin
32
+ #Get all categories
33
+ result = api_instance.get_tag_categories
34
+ p result
35
+ rescue ArtikCloud::ApiError => e
36
+ puts "Exception when calling TagsApi->get_tag_categories: #{e}"
37
+ end
38
+ ```
39
+
40
+ ### Parameters
41
+ This endpoint does not need any parameter.
42
+
43
+ ### Return type
44
+
45
+ [**TagsEnvelope**](TagsEnvelope.md)
46
+
47
+ ### Authorization
48
+
49
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
50
+
51
+ ### HTTP reuqest headers
52
+
53
+ - **Content-Type**: Not defined
54
+ - **Accept**: application/json
55
+
56
+
57
+
58
+ # **get_tag_suggestions**
59
+ > TagsEnvelope get_tag_suggestions(opts)
60
+
61
+ Get tag suggestions
62
+
63
+ Get tag suggestions for applications, device types that have been most used with a group of tags.
64
+
65
+ ### Example
66
+ ```ruby
67
+ # load the gem
68
+ require 'artikcloud'
69
+ # setup authorization
70
+ ArtikCloud.configure do |config|
71
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
72
+ config.access_token = 'YOUR ACCESS TOKEN'
73
+ end
74
+
75
+ api_instance = ArtikCloud::TagsApi.new
76
+
77
+ opts = {
78
+ entity_type: "entity_type_example", # String | Entity type name.
79
+ tags: "tags_example", # String | Comma separated list of tags.
80
+ name: "name_example", # String | Name of tags used for type ahead.
81
+ count: 56 # Integer | Number of results to return. Max 10.
82
+ }
83
+
84
+ begin
85
+ #Get tag suggestions
86
+ result = api_instance.get_tag_suggestions(opts)
87
+ p result
88
+ rescue ArtikCloud::ApiError => e
89
+ puts "Exception when calling TagsApi->get_tag_suggestions: #{e}"
90
+ end
91
+ ```
92
+
93
+ ### Parameters
94
+
95
+ Name | Type | Description | Notes
96
+ ------------- | ------------- | ------------- | -------------
97
+ **entity_type** | **String**| Entity type name. | [optional]
98
+ **tags** | **String**| Comma separated list of tags. | [optional]
99
+ **name** | **String**| Name of tags used for type ahead. | [optional]
100
+ **count** | [**Integer**](.md)| Number of results to return. Max 10. | [optional]
101
+
102
+ ### Return type
103
+
104
+ [**TagsEnvelope**](TagsEnvelope.md)
105
+
106
+ ### Authorization
107
+
108
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
109
+
110
+ ### HTTP reuqest headers
111
+
112
+ - **Content-Type**: Not defined
113
+ - **Accept**: application/json
114
+
115
+
116
+
117
+ # **get_tags_by_categories**
118
+ > TagsEnvelope get_tags_by_categories(opts)
119
+
120
+ Get all tags of categories
121
+
122
+ Get all tags related to the list of categories
123
+
124
+ ### Example
125
+ ```ruby
126
+ # load the gem
127
+ require 'artikcloud'
128
+ # setup authorization
129
+ ArtikCloud.configure do |config|
130
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
131
+ config.access_token = 'YOUR ACCESS TOKEN'
132
+ end
133
+
134
+ api_instance = ArtikCloud::TagsApi.new
135
+
136
+ opts = {
137
+ categories: "categories_example" # String | Comma separated list of categories.
138
+ }
139
+
140
+ begin
141
+ #Get all tags of categories
142
+ result = api_instance.get_tags_by_categories(opts)
143
+ p result
144
+ rescue ArtikCloud::ApiError => e
145
+ puts "Exception when calling TagsApi->get_tags_by_categories: #{e}"
146
+ end
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+ Name | Type | Description | Notes
152
+ ------------- | ------------- | ------------- | -------------
153
+ **categories** | **String**| Comma separated list of categories. | [optional]
154
+
155
+ ### Return type
156
+
157
+ [**TagsEnvelope**](TagsEnvelope.md)
158
+
159
+ ### Authorization
160
+
161
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
162
+
163
+ ### HTTP reuqest headers
164
+
165
+ - **Content-Type**: Not defined
166
+ - **Accept**: application/json
167
+
168
+
169
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TagsEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**TagArray**](TagArray.md) | | [optional]
7
+
8
+