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.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +65 -0
- data/LICENSE +202 -0
- data/README.md +230 -0
- data/artikcloud.gemspec +32 -0
- data/docs/AckEnvelope.md +8 -0
- data/docs/Acknowledgement.md +11 -0
- data/docs/ActionDetails.md +9 -0
- data/docs/ActionDetailsArray.md +8 -0
- data/docs/ActionIn.md +13 -0
- data/docs/ActionOut.md +12 -0
- data/docs/AggregateData.md +13 -0
- data/docs/AggregatesHistogramData.md +14 -0
- data/docs/AggregatesHistogramResponse.md +14 -0
- data/docs/AggregatesResponse.md +13 -0
- data/docs/AppProperties.md +10 -0
- data/docs/CheckTokenMessage.md +8 -0
- data/docs/CheckTokenResponse.md +8 -0
- data/docs/Device.md +21 -0
- data/docs/DeviceArray.md +8 -0
- data/docs/DeviceEnvelope.md +8 -0
- data/docs/DeviceRegCompleteRequest.md +8 -0
- data/docs/DeviceRegConfirmUserRequest.md +10 -0
- data/docs/DeviceRegConfirmUserResponse.md +8 -0
- data/docs/DeviceRegConfirmUserResponseEnvelope.md +8 -0
- data/docs/DeviceRegStatusResponse.md +9 -0
- data/docs/DeviceRegStatusResponseEnvelope.md +8 -0
- data/docs/DeviceToken.md +11 -0
- data/docs/DeviceTokenEnvelope.md +8 -0
- data/docs/DeviceType.md +25 -0
- data/docs/DeviceTypeArray.md +8 -0
- data/docs/DeviceTypeEnvelope.md +8 -0
- data/docs/DeviceTypesApi.md +284 -0
- data/docs/DeviceTypesEnvelope.md +11 -0
- data/docs/DevicesApi.md +382 -0
- data/docs/DevicesEnvelope.md +11 -0
- data/docs/ErrorEnvelope.md +8 -0
- data/docs/ExportApi.md +225 -0
- data/docs/ExportData.md +14 -0
- data/docs/ExportDataArray.md +8 -0
- data/docs/ExportHistoryResponse.md +11 -0
- data/docs/ExportNormalizedMessagesResponse.md +20 -0
- data/docs/ExportRequest.md +15 -0
- data/docs/ExportRequestData.md +18 -0
- data/docs/ExportRequestInfo.md +17 -0
- data/docs/ExportRequestResponse.md +8 -0
- data/docs/ExportResponse.md +18 -0
- data/docs/ExportStatusResponse.md +12 -0
- data/docs/FieldPath.md +8 -0
- data/docs/FieldPresence.md +8 -0
- data/docs/FieldPresenceEnvelope.md +14 -0
- data/docs/FieldsActions.md +9 -0
- data/docs/ManifestProperties.md +8 -0
- data/docs/ManifestPropertiesEnvelope.md +8 -0
- data/docs/ManifestVersions.md +8 -0
- data/docs/ManifestVersionsEnvelope.md +8 -0
- data/docs/MessageAction.md +12 -0
- data/docs/MessageID.md +8 -0
- data/docs/MessageIDEnvelope.md +8 -0
- data/docs/MessageIn.md +13 -0
- data/docs/MessageOut.md +12 -0
- data/docs/MessagesApi.md +382 -0
- data/docs/NonEmptyString.md +8 -0
- data/docs/NormalizedMessage.md +15 -0
- data/docs/NormalizedMessagesEnvelope.md +17 -0
- data/docs/OutputRule.md +21 -0
- data/docs/PropertiesEnvelope.md +8 -0
- data/docs/RefreshTokenResponse.md +11 -0
- data/docs/RegisterMessage.md +12 -0
- data/docs/RegistrationsApi.md +167 -0
- data/docs/RuleArray.md +8 -0
- data/docs/RuleCreationInfo.md +11 -0
- data/docs/RuleEnvelope.md +8 -0
- data/docs/RuleError.md +11 -0
- data/docs/RuleUpdateInfo.md +11 -0
- data/docs/RuleWarningOutput.md +9 -0
- data/docs/RulesApi.md +226 -0
- data/docs/RulesEnvelope.md +11 -0
- data/docs/Tag.md +9 -0
- data/docs/TagArray.md +8 -0
- data/docs/TagsApi.md +169 -0
- data/docs/TagsEnvelope.md +8 -0
- data/docs/Token.md +11 -0
- data/docs/TokenRequest.md +8 -0
- data/docs/TokenResponse.md +8 -0
- data/docs/TokensApi.md +117 -0
- data/docs/UnregisterDeviceResponse.md +18 -0
- data/docs/UnregisterDeviceResponseEnvelope.md +8 -0
- data/docs/User.md +14 -0
- data/docs/UserEnvelope.md +8 -0
- data/docs/UsersApi.md +474 -0
- data/docs/WebSocketError.md +10 -0
- data/git_push.sh +52 -0
- data/lib/artikcloud/api/device_types_api.rb +340 -0
- data/lib/artikcloud/api/devices_api.rb +450 -0
- data/lib/artikcloud/api/export_api.rb +269 -0
- data/lib/artikcloud/api/messages_api.rb +468 -0
- data/lib/artikcloud/api/registrations_api.rb +205 -0
- data/lib/artikcloud/api/rules_api.rb +276 -0
- data/lib/artikcloud/api/tags_api.rb +209 -0
- data/lib/artikcloud/api/tokens_api.rb +152 -0
- data/lib/artikcloud/api/users_api.rb +552 -0
- data/lib/artikcloud/api_client.rb +336 -0
- data/lib/artikcloud/api_error.rb +38 -0
- data/lib/artikcloud/configuration.rb +170 -0
- data/lib/artikcloud/models/ack_envelope.rb +164 -0
- data/lib/artikcloud/models/acknowledgement.rb +198 -0
- data/lib/artikcloud/models/action_details.rb +178 -0
- data/lib/artikcloud/models/action_details_array.rb +166 -0
- data/lib/artikcloud/models/action_in.rb +221 -0
- data/lib/artikcloud/models/action_out.rb +209 -0
- data/lib/artikcloud/models/aggregate_data.rb +214 -0
- data/lib/artikcloud/models/aggregates_histogram_data.rb +224 -0
- data/lib/artikcloud/models/aggregates_histogram_response.rb +226 -0
- data/lib/artikcloud/models/aggregates_response.rb +216 -0
- data/lib/artikcloud/models/app_properties.rb +184 -0
- data/lib/artikcloud/models/check_token_message.rb +164 -0
- data/lib/artikcloud/models/check_token_response.rb +164 -0
- data/lib/artikcloud/models/device.rb +310 -0
- data/lib/artikcloud/models/device_array.rb +166 -0
- data/lib/artikcloud/models/device_envelope.rb +164 -0
- data/lib/artikcloud/models/device_reg_complete_request.rb +165 -0
- data/lib/artikcloud/models/device_reg_confirm_user_request.rb +187 -0
- data/lib/artikcloud/models/device_reg_confirm_user_response.rb +165 -0
- data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +164 -0
- data/lib/artikcloud/models/device_reg_status_response.rb +176 -0
- data/lib/artikcloud/models/device_reg_status_response_envelope.rb +164 -0
- data/lib/artikcloud/models/device_token.rb +194 -0
- data/lib/artikcloud/models/device_token_envelope.rb +164 -0
- data/lib/artikcloud/models/device_type.rb +353 -0
- data/lib/artikcloud/models/device_type_array.rb +166 -0
- data/lib/artikcloud/models/device_type_envelope.rb +164 -0
- data/lib/artikcloud/models/device_types_envelope.rb +194 -0
- data/lib/artikcloud/models/devices_envelope.rb +194 -0
- data/lib/artikcloud/models/error_envelope.rb +165 -0
- data/lib/artikcloud/models/export_data.rb +225 -0
- data/lib/artikcloud/models/export_data_array.rb +166 -0
- data/lib/artikcloud/models/export_history_response.rb +194 -0
- data/lib/artikcloud/models/export_normalized_messages_response.rb +284 -0
- data/lib/artikcloud/models/export_request.rb +234 -0
- data/lib/artikcloud/models/export_request_data.rb +275 -0
- data/lib/artikcloud/models/export_request_info.rb +264 -0
- data/lib/artikcloud/models/export_request_response.rb +164 -0
- data/lib/artikcloud/models/export_response.rb +275 -0
- data/lib/artikcloud/models/export_status_response.rb +205 -0
- data/lib/artikcloud/models/field_path.rb +166 -0
- data/lib/artikcloud/models/field_presence.rb +164 -0
- data/lib/artikcloud/models/field_presence_envelope.rb +226 -0
- data/lib/artikcloud/models/fields_actions.rb +180 -0
- data/lib/artikcloud/models/manifest_properties.rb +164 -0
- data/lib/artikcloud/models/manifest_properties_envelope.rb +164 -0
- data/lib/artikcloud/models/manifest_versions.rb +166 -0
- data/lib/artikcloud/models/manifest_versions_envelope.rb +164 -0
- data/lib/artikcloud/models/message_action.rb +210 -0
- data/lib/artikcloud/models/message_id.rb +165 -0
- data/lib/artikcloud/models/message_id_envelope.rb +164 -0
- data/lib/artikcloud/models/message_in.rb +224 -0
- data/lib/artikcloud/models/message_out.rb +209 -0
- data/lib/artikcloud/models/non_empty_string.rb +164 -0
- data/lib/artikcloud/models/normalized_message.rb +236 -0
- data/lib/artikcloud/models/normalized_messages_envelope.rb +256 -0
- data/lib/artikcloud/models/output_rule.rb +296 -0
- data/lib/artikcloud/models/properties_envelope.rb +164 -0
- data/lib/artikcloud/models/refresh_token_response.rb +194 -0
- data/lib/artikcloud/models/register_message.rb +211 -0
- data/lib/artikcloud/models/rule_array.rb +166 -0
- data/lib/artikcloud/models/rule_creation_info.rb +200 -0
- data/lib/artikcloud/models/rule_envelope.rb +164 -0
- data/lib/artikcloud/models/rule_error.rb +196 -0
- data/lib/artikcloud/models/rule_update_info.rb +200 -0
- data/lib/artikcloud/models/rule_warning_output.rb +174 -0
- data/lib/artikcloud/models/rules_envelope.rb +194 -0
- data/lib/artikcloud/models/tag.rb +176 -0
- data/lib/artikcloud/models/tag_array.rb +166 -0
- data/lib/artikcloud/models/tags_envelope.rb +164 -0
- data/lib/artikcloud/models/token.rb +194 -0
- data/lib/artikcloud/models/token_request.rb +164 -0
- data/lib/artikcloud/models/token_response.rb +164 -0
- data/lib/artikcloud/models/unregister_device_response.rb +275 -0
- data/lib/artikcloud/models/unregister_device_response_envelope.rb +164 -0
- data/lib/artikcloud/models/user.rb +224 -0
- data/lib/artikcloud/models/user_envelope.rb +164 -0
- data/lib/artikcloud/models/web_socket_error.rb +187 -0
- data/lib/artikcloud/version.rb +17 -0
- data/lib/artikcloud.rb +128 -0
- data/pom.xml +60 -0
- data/spec/api/messages_api_spec.rb +79 -0
- data/spec/api/tokens_api_spec.rb +79 -0
- data/spec/api/users_api_spec.rb +50 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +36 -0
- metadata +420 -0
|
@@ -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,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
|
+
|
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
|
+
|
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
data/docs/TagArray.md
ADDED
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
|
+
|