artikcloud 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,18 @@
|
|
1
|
+
# ArtikCloud::ExportRequestData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**csv_headers** | **BOOLEAN** | Add header to csv format | [optional]
|
7
|
+
**end_date** | **Integer** | Timestamp of latest message (in milliseconds since epoch). | [optional]
|
8
|
+
**export_id** | **String** | Returned Export ID that should be used to check status and get the export result. | [optional]
|
9
|
+
**format** | **String** | Format of the export. | [optional]
|
10
|
+
**order** | **String** | Ascending or descending sort order. | [optional]
|
11
|
+
**sdids** | **String** | Source Device IDs being searched for messages (Comma-separated for multiple Device IDs). | [optional]
|
12
|
+
**sdtids** | **String** | Source Device Type IDs being searched for messages (Comma-separated for multiple Device Type IDs). | [optional]
|
13
|
+
**start_date** | **Integer** | Timestamp of earliest message (in milliseconds since epoch). | [optional]
|
14
|
+
**trial_id** | **String** | Trial ID being searched for messages. | [optional]
|
15
|
+
**uids** | **String** | Owner's user IDs being searched for messages (Comma-separated for multiple User IDs). | [optional]
|
16
|
+
**url** | **String** | URL added to successful email message. | [optional]
|
17
|
+
|
18
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# ArtikCloud::ExportRequestInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**csv_headers** | **BOOLEAN** | Add header to csv format | [optional]
|
7
|
+
**end_date** | **Integer** | Timestamp of latest message (in milliseconds since epoch). | [optional]
|
8
|
+
**format** | **String** | Format of the export. | [optional]
|
9
|
+
**order** | **String** | Ascending or descending sort order. | [optional]
|
10
|
+
**sdids** | **String** | Source Device IDs being searched for messages (Comma-separated for multiple Device IDs). | [optional]
|
11
|
+
**sdtids** | **String** | Source Device Type IDs being searched for messages (Comma-separated for multiple Device Type IDs). | [optional]
|
12
|
+
**start_date** | **Integer** | Timestamp of earliest message (in milliseconds since epoch). | [optional]
|
13
|
+
**trial_id** | **String** | Trial ID being searched for messages. | [optional]
|
14
|
+
**uids** | **String** | Owner's user IDs being searched for messages (Comma-separated for multiple User IDs). | [optional]
|
15
|
+
**url** | **String** | URL added to successful email message. | [optional]
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# ArtikCloud::ExportResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**csv_headers** | **BOOLEAN** | Add header to csv format | [optional]
|
7
|
+
**end_date** | **Integer** | Timestamp of latest message (in milliseconds since epoch). | [optional]
|
8
|
+
**export_id** | **String** | Returned Export ID that should be used to check status and get the export result. | [optional]
|
9
|
+
**format** | **String** | Format of the export. | [optional]
|
10
|
+
**order** | **String** | Ascending or descending sort order. | [optional]
|
11
|
+
**sdids** | **String** | Source Device IDs being searched for messages (Comma-separated for multiple Device IDs). | [optional]
|
12
|
+
**sdtids** | **String** | Source Device Type IDs being searched for messages (Comma-separated for multiple Device Type IDs). | [optional]
|
13
|
+
**start_date** | **Integer** | Timestamp of earliest message (in milliseconds since epoch). | [optional]
|
14
|
+
**trial_id** | **String** | Trial ID being searched for messages. | [optional]
|
15
|
+
**uids** | **String** | Owner's user IDs being searched for messages (Comma-separated for multiple User IDs). | [optional]
|
16
|
+
**url** | **String** | URL added to successful email message. | [optional]
|
17
|
+
|
18
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# ArtikCloud::ExportStatusResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**expiration_date** | **Integer** | | [optional]
|
7
|
+
**export_id** | **String** | | [optional]
|
8
|
+
**md5** | **String** | | [optional]
|
9
|
+
**status** | **String** | Export status | [optional]
|
10
|
+
**ttl** | **String** | | [optional]
|
11
|
+
|
12
|
+
|
data/docs/FieldPath.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# ArtikCloud::FieldPresenceEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**sdid** | **String** | |
|
7
|
+
**field_presence** | **String** | |
|
8
|
+
**start_date** | **Integer** | |
|
9
|
+
**end_date** | **Integer** | |
|
10
|
+
**interval** | **String** | |
|
11
|
+
**size** | **Integer** | |
|
12
|
+
**data** | [**Array<FieldPresence>**](FieldPresence.md) | |
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# ArtikCloud::FieldsActions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**fields** | **Hash<String, Object>** | Message Fields | [optional]
|
7
|
+
**actions** | **Hash<String, Object>** | Actions | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# ArtikCloud::MessageAction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | **Hash<String, Object>** | | [optional]
|
7
|
+
**ddid** | **String** | Destination Device ID. | [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]
|
11
|
+
|
12
|
+
|
data/docs/MessageID.md
ADDED
data/docs/MessageIn.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# ArtikCloud::MessageIn
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | **Hash<String, Object>** | Message Payload. | [optional]
|
7
|
+
**cid** | **String** | Confirmation ID. | [optional]
|
8
|
+
**ddid** | **String** | Destination Device ID. | [optional]
|
9
|
+
**sdid** | **String** | Source Device ID. | [optional]
|
10
|
+
**ts** | **Integer** | Timestamp (past, present or future). Defaults to current time if not provided. | [optional]
|
11
|
+
**type** | **String** | Type. | [optional] [default to "message"]
|
12
|
+
|
13
|
+
|
data/docs/MessageOut.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# ArtikCloud::MessageOut
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**mid** | **String** | Message ID. | [optional]
|
7
|
+
**uid** | **String** | User ID. | [optional]
|
8
|
+
**sdtid** | **String** | Source Device Type ID. | [optional]
|
9
|
+
**cts** | **Integer** | Created Timestamp (past, present or future). Defaults to current time if not provided. | [optional]
|
10
|
+
**mv** | **Integer** | Manifest Version. | [optional]
|
11
|
+
|
12
|
+
|
data/docs/MessagesApi.md
ADDED
@@ -0,0 +1,382 @@
|
|
1
|
+
# ArtikCloud::MessagesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.artik.cloud/v1.1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_aggregates_histogram**](MessagesApi.md#get_aggregates_histogram) | **GET** /messages/analytics/histogram | Get Histogram aggregates
|
8
|
+
[**get_field_presence**](MessagesApi.md#get_field_presence) | **GET** /messages/presence | Get normalized message presence
|
9
|
+
[**get_last_normalized_messages**](MessagesApi.md#get_last_normalized_messages) | **GET** /messages/last | Get Last Normalized Message
|
10
|
+
[**get_message_aggregates**](MessagesApi.md#get_message_aggregates) | **GET** /messages/analytics/aggregates | Get Normalized Message Aggregates
|
11
|
+
[**get_normalized_messages**](MessagesApi.md#get_normalized_messages) | **GET** /messages | Get Normalized Messages
|
12
|
+
[**send_message_action**](MessagesApi.md#send_message_action) | **POST** /messages | Send Message Action
|
13
|
+
|
14
|
+
|
15
|
+
# **get_aggregates_histogram**
|
16
|
+
> AggregatesHistogramResponse get_aggregates_histogram(start_date, end_date, opts)
|
17
|
+
|
18
|
+
Get Histogram aggregates
|
19
|
+
|
20
|
+
Get Histogram on normalized messages.
|
21
|
+
|
22
|
+
### Example
|
23
|
+
```ruby
|
24
|
+
# load the gem
|
25
|
+
require 'artikcloud'
|
26
|
+
# setup authorization
|
27
|
+
ArtikCloud.configure do |config|
|
28
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
29
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = ArtikCloud::MessagesApi.new
|
33
|
+
|
34
|
+
start_date = 789 # Integer | Timestamp of earliest message (in milliseconds since epoch).
|
35
|
+
|
36
|
+
end_date = 789 # Integer | Timestamp of latest message (in milliseconds since epoch).
|
37
|
+
|
38
|
+
opts = {
|
39
|
+
sdid: "sdid_example", # String | Source device ID of the messages being searched.
|
40
|
+
field: "field_example", # String | Message field being queried for building histogram.
|
41
|
+
interval: "interval_example" # String | Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year)
|
42
|
+
}
|
43
|
+
|
44
|
+
begin
|
45
|
+
#Get Histogram aggregates
|
46
|
+
result = api_instance.get_aggregates_histogram(start_date, end_date, opts)
|
47
|
+
p result
|
48
|
+
rescue ArtikCloud::ApiError => e
|
49
|
+
puts "Exception when calling MessagesApi->get_aggregates_histogram: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
### Parameters
|
54
|
+
|
55
|
+
Name | Type | Description | Notes
|
56
|
+
------------- | ------------- | ------------- | -------------
|
57
|
+
**start_date** | **Integer**| Timestamp of earliest message (in milliseconds since epoch). |
|
58
|
+
**end_date** | **Integer**| Timestamp of latest message (in milliseconds since epoch). |
|
59
|
+
**sdid** | **String**| Source device ID of the messages being searched. | [optional]
|
60
|
+
**field** | **String**| Message field being queried for building histogram. | [optional]
|
61
|
+
**interval** | **String**| Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year) | [optional]
|
62
|
+
|
63
|
+
### Return type
|
64
|
+
|
65
|
+
[**AggregatesHistogramResponse**](AggregatesHistogramResponse.md)
|
66
|
+
|
67
|
+
### Authorization
|
68
|
+
|
69
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
70
|
+
|
71
|
+
### HTTP reuqest headers
|
72
|
+
|
73
|
+
- **Content-Type**: Not defined
|
74
|
+
- **Accept**: application/json
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
# **get_field_presence**
|
79
|
+
> FieldPresenceEnvelope get_field_presence(start_date, end_date, interval, opts)
|
80
|
+
|
81
|
+
Get normalized message presence
|
82
|
+
|
83
|
+
Get normalized message presence.
|
84
|
+
|
85
|
+
### Example
|
86
|
+
```ruby
|
87
|
+
# load the gem
|
88
|
+
require 'artikcloud'
|
89
|
+
# setup authorization
|
90
|
+
ArtikCloud.configure do |config|
|
91
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
92
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
93
|
+
end
|
94
|
+
|
95
|
+
api_instance = ArtikCloud::MessagesApi.new
|
96
|
+
|
97
|
+
start_date = 789 # Integer | startDate
|
98
|
+
|
99
|
+
end_date = 789 # Integer | endDate
|
100
|
+
|
101
|
+
interval = "interval_example" # String | String representing grouping interval. One of: 'minute' (1 hour limit), 'hour' (1 day limit), 'day' (31 days limit), 'month' (1 year limit), or 'year' (10 years limit).
|
102
|
+
|
103
|
+
opts = {
|
104
|
+
sdid: "sdid_example", # String | Source device ID of the messages being searched.
|
105
|
+
field_presence: "field_presence_example" # String | String representing a field from the specified device ID.
|
106
|
+
}
|
107
|
+
|
108
|
+
begin
|
109
|
+
#Get normalized message presence
|
110
|
+
result = api_instance.get_field_presence(start_date, end_date, interval, opts)
|
111
|
+
p result
|
112
|
+
rescue ArtikCloud::ApiError => e
|
113
|
+
puts "Exception when calling MessagesApi->get_field_presence: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
### Parameters
|
118
|
+
|
119
|
+
Name | Type | Description | Notes
|
120
|
+
------------- | ------------- | ------------- | -------------
|
121
|
+
**start_date** | **Integer**| startDate |
|
122
|
+
**end_date** | **Integer**| endDate |
|
123
|
+
**interval** | **String**| String representing grouping interval. One of: 'minute' (1 hour limit), 'hour' (1 day limit), 'day' (31 days limit), 'month' (1 year limit), or 'year' (10 years limit). |
|
124
|
+
**sdid** | **String**| Source device ID of the messages being searched. | [optional]
|
125
|
+
**field_presence** | **String**| String representing a field from the specified device ID. | [optional]
|
126
|
+
|
127
|
+
### Return type
|
128
|
+
|
129
|
+
[**FieldPresenceEnvelope**](FieldPresenceEnvelope.md)
|
130
|
+
|
131
|
+
### Authorization
|
132
|
+
|
133
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
134
|
+
|
135
|
+
### HTTP reuqest headers
|
136
|
+
|
137
|
+
- **Content-Type**: Not defined
|
138
|
+
- **Accept**: application/json
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
# **get_last_normalized_messages**
|
143
|
+
> NormalizedMessagesEnvelope get_last_normalized_messages(opts)
|
144
|
+
|
145
|
+
Get Last Normalized Message
|
146
|
+
|
147
|
+
Get last messages normalized.
|
148
|
+
|
149
|
+
### Example
|
150
|
+
```ruby
|
151
|
+
# load the gem
|
152
|
+
require 'artikcloud'
|
153
|
+
# setup authorization
|
154
|
+
ArtikCloud.configure do |config|
|
155
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
156
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
157
|
+
end
|
158
|
+
|
159
|
+
api_instance = ArtikCloud::MessagesApi.new
|
160
|
+
|
161
|
+
opts = {
|
162
|
+
count: 56, # Integer | Number of items to return per query.
|
163
|
+
sdids: "sdids_example", # String | Comma separated list of source device IDs (minimum: 1).
|
164
|
+
field_presence: "field_presence_example" # String | String representing a field from the specified device ID.
|
165
|
+
}
|
166
|
+
|
167
|
+
begin
|
168
|
+
#Get Last Normalized Message
|
169
|
+
result = api_instance.get_last_normalized_messages(opts)
|
170
|
+
p result
|
171
|
+
rescue ArtikCloud::ApiError => e
|
172
|
+
puts "Exception when calling MessagesApi->get_last_normalized_messages: #{e}"
|
173
|
+
end
|
174
|
+
```
|
175
|
+
|
176
|
+
### Parameters
|
177
|
+
|
178
|
+
Name | Type | Description | Notes
|
179
|
+
------------- | ------------- | ------------- | -------------
|
180
|
+
**count** | **Integer**| Number of items to return per query. | [optional]
|
181
|
+
**sdids** | **String**| Comma separated list of source device IDs (minimum: 1). | [optional]
|
182
|
+
**field_presence** | **String**| String representing a field from the specified device ID. | [optional]
|
183
|
+
|
184
|
+
### Return type
|
185
|
+
|
186
|
+
[**NormalizedMessagesEnvelope**](NormalizedMessagesEnvelope.md)
|
187
|
+
|
188
|
+
### Authorization
|
189
|
+
|
190
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
191
|
+
|
192
|
+
### HTTP reuqest headers
|
193
|
+
|
194
|
+
- **Content-Type**: Not defined
|
195
|
+
- **Accept**: application/json
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
# **get_message_aggregates**
|
200
|
+
> AggregatesResponse get_message_aggregates(sdid, field, start_date, end_date)
|
201
|
+
|
202
|
+
Get Normalized Message Aggregates
|
203
|
+
|
204
|
+
Get Aggregates on normalized messages.
|
205
|
+
|
206
|
+
### Example
|
207
|
+
```ruby
|
208
|
+
# load the gem
|
209
|
+
require 'artikcloud'
|
210
|
+
# setup authorization
|
211
|
+
ArtikCloud.configure do |config|
|
212
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
213
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
214
|
+
end
|
215
|
+
|
216
|
+
api_instance = ArtikCloud::MessagesApi.new
|
217
|
+
|
218
|
+
sdid = "sdid_example" # String | Source device ID of the messages being searched.
|
219
|
+
|
220
|
+
field = "field_example" # String | Message field being queried for aggregates.
|
221
|
+
|
222
|
+
start_date = 789 # Integer | Timestamp of earliest message (in milliseconds since epoch).
|
223
|
+
|
224
|
+
end_date = 789 # Integer | Timestamp of latest message (in milliseconds since epoch).
|
225
|
+
|
226
|
+
|
227
|
+
begin
|
228
|
+
#Get Normalized Message Aggregates
|
229
|
+
result = api_instance.get_message_aggregates(sdid, field, start_date, end_date)
|
230
|
+
p result
|
231
|
+
rescue ArtikCloud::ApiError => e
|
232
|
+
puts "Exception when calling MessagesApi->get_message_aggregates: #{e}"
|
233
|
+
end
|
234
|
+
```
|
235
|
+
|
236
|
+
### Parameters
|
237
|
+
|
238
|
+
Name | Type | Description | Notes
|
239
|
+
------------- | ------------- | ------------- | -------------
|
240
|
+
**sdid** | **String**| Source device ID of the messages being searched. |
|
241
|
+
**field** | **String**| Message field being queried for aggregates. |
|
242
|
+
**start_date** | **Integer**| Timestamp of earliest message (in milliseconds since epoch). |
|
243
|
+
**end_date** | **Integer**| Timestamp of latest message (in milliseconds since epoch). |
|
244
|
+
|
245
|
+
### Return type
|
246
|
+
|
247
|
+
[**AggregatesResponse**](AggregatesResponse.md)
|
248
|
+
|
249
|
+
### Authorization
|
250
|
+
|
251
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
252
|
+
|
253
|
+
### HTTP reuqest headers
|
254
|
+
|
255
|
+
- **Content-Type**: Not defined
|
256
|
+
- **Accept**: application/json
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
# **get_normalized_messages**
|
261
|
+
> NormalizedMessagesEnvelope get_normalized_messages(opts)
|
262
|
+
|
263
|
+
Get Normalized Messages
|
264
|
+
|
265
|
+
Get the messages normalized
|
266
|
+
|
267
|
+
### Example
|
268
|
+
```ruby
|
269
|
+
# load the gem
|
270
|
+
require 'artikcloud'
|
271
|
+
# setup authorization
|
272
|
+
ArtikCloud.configure do |config|
|
273
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
274
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
275
|
+
end
|
276
|
+
|
277
|
+
api_instance = ArtikCloud::MessagesApi.new
|
278
|
+
|
279
|
+
opts = {
|
280
|
+
uid: "uid_example", # String | User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
|
281
|
+
sdid: "sdid_example", # String | Source device ID of the messages being searched.
|
282
|
+
mid: "mid_example", # String | The SAMI message ID being searched.
|
283
|
+
field_presence: "field_presence_example", # String | String representing a field from the specified device ID.
|
284
|
+
filter: "filter_example", # String | Filter.
|
285
|
+
offset: "offset_example", # String | A string that represents the starting item, should be the value of 'next' field received in the last response. (required for pagination)
|
286
|
+
count: 56, # Integer | count
|
287
|
+
start_date: 789, # Integer | startDate
|
288
|
+
end_date: 789, # Integer | endDate
|
289
|
+
order: "order_example" # String | Desired sort order: 'asc' or 'desc'
|
290
|
+
}
|
291
|
+
|
292
|
+
begin
|
293
|
+
#Get Normalized Messages
|
294
|
+
result = api_instance.get_normalized_messages(opts)
|
295
|
+
p result
|
296
|
+
rescue ArtikCloud::ApiError => e
|
297
|
+
puts "Exception when calling MessagesApi->get_normalized_messages: #{e}"
|
298
|
+
end
|
299
|
+
```
|
300
|
+
|
301
|
+
### Parameters
|
302
|
+
|
303
|
+
Name | Type | Description | Notes
|
304
|
+
------------- | ------------- | ------------- | -------------
|
305
|
+
**uid** | **String**| User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to. | [optional]
|
306
|
+
**sdid** | **String**| Source device ID of the messages being searched. | [optional]
|
307
|
+
**mid** | **String**| The SAMI message ID being searched. | [optional]
|
308
|
+
**field_presence** | **String**| String representing a field from the specified device ID. | [optional]
|
309
|
+
**filter** | **String**| Filter. | [optional]
|
310
|
+
**offset** | **String**| A string that represents the starting item, should be the value of 'next' field received in the last response. (required for pagination) | [optional]
|
311
|
+
**count** | **Integer**| count | [optional]
|
312
|
+
**start_date** | **Integer**| startDate | [optional]
|
313
|
+
**end_date** | **Integer**| endDate | [optional]
|
314
|
+
**order** | **String**| Desired sort order: 'asc' or 'desc' | [optional]
|
315
|
+
|
316
|
+
### Return type
|
317
|
+
|
318
|
+
[**NormalizedMessagesEnvelope**](NormalizedMessagesEnvelope.md)
|
319
|
+
|
320
|
+
### Authorization
|
321
|
+
|
322
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
323
|
+
|
324
|
+
### HTTP reuqest headers
|
325
|
+
|
326
|
+
- **Content-Type**: Not defined
|
327
|
+
- **Accept**: application/json
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
# **send_message_action**
|
332
|
+
> MessageIDEnvelope send_message_action(data)
|
333
|
+
|
334
|
+
Send Message Action
|
335
|
+
|
336
|
+
Send a message or an Action:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Send Message</td><td>sdid, type=message</td><td>Send a message from a Source Device</td></tr><tr><td>Send Action</td><td>ddid, type=action</td><td>Send an action to a Destination Device</td></tr><tr><td>Common</td><td>data, ts, token</td><td>Parameters that can be used with the above combinations.</td></tr></table>
|
337
|
+
|
338
|
+
### Example
|
339
|
+
```ruby
|
340
|
+
# load the gem
|
341
|
+
require 'artikcloud'
|
342
|
+
# setup authorization
|
343
|
+
ArtikCloud.configure do |config|
|
344
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
345
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
346
|
+
end
|
347
|
+
|
348
|
+
api_instance = ArtikCloud::MessagesApi.new
|
349
|
+
|
350
|
+
data = ArtikCloud::MessageAction.new # MessageAction | Message or Action object that is passed in the body
|
351
|
+
|
352
|
+
|
353
|
+
begin
|
354
|
+
#Send Message Action
|
355
|
+
result = api_instance.send_message_action(data)
|
356
|
+
p result
|
357
|
+
rescue ArtikCloud::ApiError => e
|
358
|
+
puts "Exception when calling MessagesApi->send_message_action: #{e}"
|
359
|
+
end
|
360
|
+
```
|
361
|
+
|
362
|
+
### Parameters
|
363
|
+
|
364
|
+
Name | Type | Description | Notes
|
365
|
+
------------- | ------------- | ------------- | -------------
|
366
|
+
**data** | [**MessageAction**](MessageAction.md)| Message or Action object that is passed in the body |
|
367
|
+
|
368
|
+
### Return type
|
369
|
+
|
370
|
+
[**MessageIDEnvelope**](MessageIDEnvelope.md)
|
371
|
+
|
372
|
+
### Authorization
|
373
|
+
|
374
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
375
|
+
|
376
|
+
### HTTP reuqest headers
|
377
|
+
|
378
|
+
- **Content-Type**: Not defined
|
379
|
+
- **Accept**: application/json
|
380
|
+
|
381
|
+
|
382
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# ArtikCloud::NormalizedMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**cts** | **Integer** | |
|
7
|
+
**ts** | **Integer** | |
|
8
|
+
**mid** | **String** | |
|
9
|
+
**sdid** | **String** | |
|
10
|
+
**sdtid** | **String** | |
|
11
|
+
**uid** | **String** | |
|
12
|
+
**mv** | **Integer** | |
|
13
|
+
**data** | **Hash<String, Object>** | |
|
14
|
+
|
15
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# ArtikCloud::NormalizedMessagesEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**sdids** | **String** | | [optional]
|
7
|
+
**sdid** | **String** | | [optional]
|
8
|
+
**uid** | **String** | | [optional]
|
9
|
+
**start_date** | **Integer** | | [optional]
|
10
|
+
**end_date** | **Integer** | | [optional]
|
11
|
+
**order** | **String** | | [optional]
|
12
|
+
**_next** | **String** | | [optional]
|
13
|
+
**count** | **Integer** | |
|
14
|
+
**size** | **Integer** | |
|
15
|
+
**data** | [**Array<NormalizedMessage>**](NormalizedMessage.md) | |
|
16
|
+
|
17
|
+
|
data/docs/OutputRule.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# ArtikCloud::OutputRule
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**aid** | **String** | | [optional]
|
7
|
+
**created_on** | **Integer** | | [optional]
|
8
|
+
**description** | **String** | | [optional]
|
9
|
+
**enabled** | **BOOLEAN** | | [optional]
|
10
|
+
**error** | [**RuleError**](RuleError.md) | | [optional]
|
11
|
+
**id** | **String** | | [optional]
|
12
|
+
**index** | **Integer** | | [optional]
|
13
|
+
**invalidated_on** | **Integer** | | [optional]
|
14
|
+
**language_version** | **Integer** | | [optional]
|
15
|
+
**modified_on** | **Integer** | | [optional]
|
16
|
+
**name** | **String** | | [optional]
|
17
|
+
**rule** | **Hash<String, Object>** | | [optional]
|
18
|
+
**uid** | **String** | | [optional]
|
19
|
+
**warning** | [**RuleWarningOutput**](RuleWarningOutput.md) | | [optional]
|
20
|
+
|
21
|
+
|