artikcloud 2.0.0 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +12 -12
  3. data/README.md +33 -10
  4. data/artikcloud.gemspec +5 -6
  5. data/docs/Action.md +9 -0
  6. data/docs/ActionArray.md +8 -0
  7. data/docs/Actions.md +12 -0
  8. data/docs/DeviceTypesApi.md +10 -10
  9. data/docs/DevicesApi.md +68 -15
  10. data/docs/ExportApi.md +10 -10
  11. data/docs/Message.md +11 -0
  12. data/docs/MessagesApi.md +205 -27
  13. data/docs/NormalizedAction.md +16 -0
  14. data/docs/NormalizedActionsEnvelope.md +17 -0
  15. data/docs/PresenceEnvelope.md +9 -0
  16. data/docs/PresenceModel.md +9 -0
  17. data/docs/RegistrationsApi.md +6 -6
  18. data/docs/RulesApi.md +8 -8
  19. data/docs/RulesEnvelope.md +1 -1
  20. data/docs/SnapshotResponse.md +9 -0
  21. data/docs/SnapshotResponses.md +10 -0
  22. data/docs/SnapshotsResponseEnvelope.md +9 -0
  23. data/docs/TagsApi.md +7 -7
  24. data/docs/TokenInfo.md +11 -0
  25. data/docs/TokenInfoSuccessResponse.md +8 -0
  26. data/docs/TokensApi.md +54 -7
  27. data/docs/UsersApi.md +18 -20
  28. data/git_push.sh +16 -1
  29. data/lib/artikcloud/api/device_types_api.rb +52 -59
  30. data/lib/artikcloud/api/devices_api.rb +120 -76
  31. data/lib/artikcloud/api/export_api.rb +43 -45
  32. data/lib/artikcloud/api/messages_api.rb +285 -103
  33. data/lib/artikcloud/api/registrations_api.rb +34 -34
  34. data/lib/artikcloud/api/rules_api.rb +43 -48
  35. data/lib/artikcloud/api/tags_api.rb +37 -35
  36. data/lib/artikcloud/api/tokens_api.rb +85 -30
  37. data/lib/artikcloud/api/users_api.rb +83 -102
  38. data/lib/artikcloud/api_client.rb +56 -13
  39. data/lib/artikcloud/api_error.rb +13 -4
  40. data/lib/artikcloud/configuration.rb +45 -1
  41. data/lib/artikcloud/models/ack_envelope.rb +59 -24
  42. data/lib/artikcloud/models/acknowledgement.rb +65 -33
  43. data/lib/artikcloud/models/action.rb +212 -0
  44. data/lib/artikcloud/models/action_array.rb +201 -0
  45. data/lib/artikcloud/models/action_details.rb +61 -27
  46. data/lib/artikcloud/models/action_details_array.rb +59 -24
  47. data/lib/artikcloud/models/action_in.rb +69 -39
  48. data/lib/artikcloud/models/action_out.rb +67 -36
  49. data/lib/artikcloud/models/actions.rb +241 -0
  50. data/lib/artikcloud/models/aggregate_data.rb +69 -39
  51. data/lib/artikcloud/models/aggregates_histogram_data.rb +71 -42
  52. data/lib/artikcloud/models/aggregates_histogram_response.rb +71 -42
  53. data/lib/artikcloud/models/aggregates_response.rb +69 -39
  54. data/lib/artikcloud/models/app_properties.rb +64 -30
  55. data/lib/artikcloud/models/check_token_message.rb +59 -24
  56. data/lib/artikcloud/models/check_token_response.rb +59 -24
  57. data/lib/artikcloud/models/device.rb +85 -63
  58. data/lib/artikcloud/models/device_array.rb +59 -24
  59. data/lib/artikcloud/models/device_envelope.rb +60 -24
  60. data/lib/artikcloud/models/device_reg_complete_request.rb +59 -24
  61. data/lib/artikcloud/models/device_reg_confirm_user_request.rb +63 -30
  62. data/lib/artikcloud/models/device_reg_confirm_user_response.rb +59 -24
  63. data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +59 -24
  64. data/lib/artikcloud/models/device_reg_status_response.rb +61 -27
  65. data/lib/artikcloud/models/device_reg_status_response_envelope.rb +59 -24
  66. data/lib/artikcloud/models/device_token.rb +69 -33
  67. data/lib/artikcloud/models/device_token_envelope.rb +60 -24
  68. data/lib/artikcloud/models/device_type.rb +93 -75
  69. data/lib/artikcloud/models/device_type_array.rb +59 -24
  70. data/lib/artikcloud/models/device_type_envelope.rb +60 -24
  71. data/lib/artikcloud/models/device_types_envelope.rb +68 -33
  72. data/lib/artikcloud/models/devices_envelope.rb +68 -33
  73. data/lib/artikcloud/models/error_envelope.rb +59 -24
  74. data/lib/artikcloud/models/export_data.rb +71 -42
  75. data/lib/artikcloud/models/export_data_array.rb +59 -24
  76. data/lib/artikcloud/models/export_history_response.rb +65 -33
  77. data/lib/artikcloud/models/export_normalized_messages_response.rb +83 -60
  78. data/lib/artikcloud/models/export_request.rb +73 -45
  79. data/lib/artikcloud/models/export_request_data.rb +79 -54
  80. data/lib/artikcloud/models/export_request_info.rb +77 -51
  81. data/lib/artikcloud/models/export_request_response.rb +59 -24
  82. data/lib/artikcloud/models/export_response.rb +79 -54
  83. data/lib/artikcloud/models/export_status_response.rb +67 -36
  84. data/lib/artikcloud/models/field_path.rb +59 -24
  85. data/lib/artikcloud/models/field_presence.rb +60 -24
  86. data/lib/artikcloud/models/field_presence_envelope.rb +78 -42
  87. data/lib/artikcloud/models/fields_actions.rb +61 -27
  88. data/lib/artikcloud/models/manifest_properties.rb +60 -24
  89. data/lib/artikcloud/models/manifest_properties_envelope.rb +60 -24
  90. data/lib/artikcloud/models/manifest_versions.rb +60 -24
  91. data/lib/artikcloud/models/manifest_versions_envelope.rb +60 -24
  92. data/lib/artikcloud/models/message.rb +233 -0
  93. data/lib/artikcloud/models/message_action.rb +67 -36
  94. data/lib/artikcloud/models/message_id.rb +59 -24
  95. data/lib/artikcloud/models/message_id_envelope.rb +59 -24
  96. data/lib/artikcloud/models/message_in.rb +69 -39
  97. data/lib/artikcloud/models/message_out.rb +67 -36
  98. data/lib/artikcloud/models/non_empty_string.rb +59 -24
  99. data/lib/artikcloud/models/normalized_action.rb +279 -0
  100. data/lib/artikcloud/models/normalized_actions_envelope.rb +285 -0
  101. data/lib/artikcloud/models/normalized_message.rb +81 -45
  102. data/lib/artikcloud/models/normalized_messages_envelope.rb +80 -51
  103. data/lib/artikcloud/models/output_rule.rb +85 -63
  104. data/lib/artikcloud/models/presence_envelope.rb +208 -0
  105. data/lib/artikcloud/models/presence_model.rb +208 -0
  106. data/lib/artikcloud/models/properties_envelope.rb +60 -24
  107. data/lib/artikcloud/models/refresh_token_response.rb +65 -33
  108. data/lib/artikcloud/models/register_message.rb +67 -36
  109. data/lib/artikcloud/models/rule_array.rb +59 -24
  110. data/lib/artikcloud/models/rule_creation_info.rb +65 -33
  111. data/lib/artikcloud/models/rule_envelope.rb +59 -24
  112. data/lib/artikcloud/models/rule_error.rb +65 -33
  113. data/lib/artikcloud/models/rule_update_info.rb +65 -33
  114. data/lib/artikcloud/models/rule_warning_output.rb +61 -27
  115. data/lib/artikcloud/models/rules_envelope.rb +69 -35
  116. data/lib/artikcloud/models/snapshot_response.rb +210 -0
  117. data/lib/artikcloud/models/snapshot_responses.rb +219 -0
  118. data/lib/artikcloud/models/snapshots_response_envelope.rb +208 -0
  119. data/lib/artikcloud/models/tag.rb +61 -27
  120. data/lib/artikcloud/models/tag_array.rb +59 -24
  121. data/lib/artikcloud/models/tags_envelope.rb +59 -24
  122. data/lib/artikcloud/models/token.rb +65 -33
  123. data/lib/artikcloud/models/token_info.rb +226 -0
  124. data/lib/artikcloud/models/token_info_success_response.rb +199 -0
  125. data/lib/artikcloud/models/token_request.rb +59 -24
  126. data/lib/artikcloud/models/token_response.rb +59 -24
  127. data/lib/artikcloud/models/unregister_device_response.rb +79 -54
  128. data/lib/artikcloud/models/unregister_device_response_envelope.rb +59 -24
  129. data/lib/artikcloud/models/user.rb +77 -42
  130. data/lib/artikcloud/models/user_envelope.rb +60 -24
  131. data/lib/artikcloud/models/web_socket_error.rb +63 -30
  132. data/lib/artikcloud/version.rb +14 -5
  133. data/lib/artikcloud.rb +26 -4
  134. data/spec/api/device_types_api_spec.rb +110 -0
  135. data/spec/api/devices_api_spec.rb +143 -0
  136. data/spec/api/export_api_spec.rb +96 -0
  137. data/spec/api/messages_api_spec.rb +7 -7
  138. data/spec/api/registrations_api_spec.rb +82 -0
  139. data/spec/api/rules_api_spec.rb +96 -0
  140. data/spec/api/tags_api_spec.rb +84 -0
  141. data/spec/api/tokens_api_spec.rb +12 -21
  142. data/spec/api/users_api_spec.rb +1 -1
  143. data/spec/spec_helper.rb +1 -1
  144. metadata +60 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 732690591f46e45397d1dfbf3f85aa563137195d
4
- data.tar.gz: 52b4ee9cb8e9223bbd6a628cec7e124a858d66d5
3
+ metadata.gz: 27bb94b7bdb058454fce957393571c296a64f7f7
4
+ data.tar.gz: bcd21f9de20efb0b6c0928c422789a787b21aff9
5
5
  SHA512:
6
- metadata.gz: 5c87ad0e3aca778160bf351392e7b52424e7ec783cdba2e2f4bfa867ca0ad48de85559d535a29c1c05759953e46f954b446f4154e84c4e08e49d668e1337e5c4
7
- data.tar.gz: d3fc313afe395d695e600c502f89ffc9cf1e7d9ac188a0a090126c9300dae5bb8079dfdc49ebed3add72a48de1170e39be9f73c4fe4241bee112b8a7e180c689
6
+ metadata.gz: 6eb62eeedf0253870550b05335680033863326296df8a5134fc1df8b5317ba06de4fba3d94f83755488ebc52c2d9874c8326b6e0f37ab096431b17c0a7480c9b
7
+ data.tar.gz: 2de7e18ae6308ddb3b1289b76a1803934ba271f9478b273cf479bd24a105f6c0c1d78032e84979d4595607c2a6b9b585282e534916f31013391047199fdccc58
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- artikcloud (2.0.0)
5
- json (~> 1.4, >= 1.4.6)
6
- typhoeus (~> 0.2, >= 0.2.1)
4
+ artikcloud (2.0.5)
5
+ json (~> 1.8, >= 1.8.3)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
@@ -19,7 +19,7 @@ GEM
19
19
  crack (0.4.3)
20
20
  safe_yaml (~> 1.0.0)
21
21
  diff-lcs (1.2.5)
22
- ethon (0.8.1)
22
+ ethon (0.9.0)
23
23
  ffi (>= 1.3.0)
24
24
  ffi (1.9.10)
25
25
  hashdiff (0.3.0)
@@ -40,10 +40,10 @@ GEM
40
40
  safe_yaml (1.0.4)
41
41
  sys-uname (1.0.2)
42
42
  ffi (>= 1.0.0)
43
- typhoeus (0.8.0)
44
- ethon (>= 0.8.0)
45
- vcr (2.9.3)
46
- webmock (1.24.2)
43
+ typhoeus (1.1.0)
44
+ ethon (>= 0.9.0)
45
+ vcr (3.0.3)
46
+ webmock (1.24.6)
47
47
  addressable (>= 2.3.6)
48
48
  crack (>= 0.3.2)
49
49
  hashdiff
@@ -57,9 +57,9 @@ DEPENDENCIES
57
57
  autotest-fsevent (~> 0.2, >= 0.2.11)
58
58
  autotest-growl (~> 0.2, >= 0.2.16)
59
59
  autotest-rails-pure (~> 4.1, >= 4.1.2)
60
- rspec (~> 3.2, >= 3.2.0)
61
- vcr (~> 2.9, >= 2.9.3)
62
- webmock (~> 1.6, >= 1.6.2)
60
+ rspec (~> 3.4, >= 3.4.0)
61
+ vcr (~> 3.0, >= 3.0.1)
62
+ webmock (~> 1.24, >= 1.24.3)
63
63
 
64
64
  BUNDLED WITH
65
- 1.11.2
65
+ 1.12.0
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  ARTIK Cloud Ruby SDK
2
2
  ================
3
3
 
4
+ [![Build Status](https://travis-ci.org/artikcloud/artikcloud-ruby.svg?branch=master)](https://travis-ci.org/artikcloud/artikcloud-ruby) [![Gem Version](https://badge.fury.io/rb/artikcloud.svg)](https://badge.fury.io/rb/artikcloud)
5
+
4
6
  This SDK helps you connect your Ruby scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud.
5
7
 
6
8
  ## Installation
@@ -16,14 +18,15 @@ gem build artikcloud.gemspec
16
18
  Then either install the gem locally:
17
19
 
18
20
  ```shell
19
- gem install ./artikcloud-2.0.0.gem
21
+ gem install ./artikcloud-2.0.5.gem
20
22
  ```
23
+ (for development, run `gem install --dev ./artikcloud-2.0.5.gem` to install the development dependencies)
21
24
 
22
25
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
23
26
 
24
27
  Finally add this to the Gemfile:
25
28
 
26
- gem 'artikcloud', '~> 2.0.0'
29
+ gem 'artikcloud', '~> 2.0.5'
27
30
 
28
31
  ### Install from Git
29
32
 
@@ -82,6 +85,7 @@ Class | Method | HTTP request | Description
82
85
  *ArtikCloud::DevicesApi* | [**delete_device**](docs/DevicesApi.md#delete_device) | **DELETE** /devices/{deviceId} | Delete Device
83
86
  *ArtikCloud::DevicesApi* | [**delete_device_token**](docs/DevicesApi.md#delete_device_token) | **DELETE** /devices/{deviceId}/tokens | Delete Device Token
84
87
  *ArtikCloud::DevicesApi* | [**get_device**](docs/DevicesApi.md#get_device) | **GET** /devices/{deviceId} | Get Device
88
+ *ArtikCloud::DevicesApi* | [**get_device_presence**](docs/DevicesApi.md#get_device_presence) | **GET** /devices/{deviceId}/presence | Get device presence information
85
89
  *ArtikCloud::DevicesApi* | [**get_device_token**](docs/DevicesApi.md#get_device_token) | **GET** /devices/{deviceId}/tokens | Get Device Token
86
90
  *ArtikCloud::DevicesApi* | [**update_device**](docs/DevicesApi.md#update_device) | **PUT** /devices/{deviceId} | Update Device
87
91
  *ArtikCloud::DevicesApi* | [**update_device_token**](docs/DevicesApi.md#update_device_token) | **PUT** /devices/{deviceId}/tokens | Update Device Token
@@ -89,12 +93,15 @@ Class | Method | HTTP request | Description
89
93
  *ArtikCloud::ExportApi* | [**get_export_history**](docs/ExportApi.md#get_export_history) | **GET** /messages/export/history | Get Export History
90
94
  *ArtikCloud::ExportApi* | [**get_export_result**](docs/ExportApi.md#get_export_result) | **GET** /messages/export/{exportId}/result | Get Export Result
91
95
  *ArtikCloud::ExportApi* | [**get_export_status**](docs/ExportApi.md#get_export_status) | **GET** /messages/export/{exportId}/status | Check Export Status
92
- *ArtikCloud::MessagesApi* | [**get_aggregates_histogram**](docs/MessagesApi.md#get_aggregates_histogram) | **GET** /messages/analytics/histogram | Get Histogram aggregates
96
+ *ArtikCloud::MessagesApi* | [**get_aggregates_histogram**](docs/MessagesApi.md#get_aggregates_histogram) | **GET** /messages/analytics/histogram | Get Normalized Message Histogram
93
97
  *ArtikCloud::MessagesApi* | [**get_field_presence**](docs/MessagesApi.md#get_field_presence) | **GET** /messages/presence | Get normalized message presence
94
98
  *ArtikCloud::MessagesApi* | [**get_last_normalized_messages**](docs/MessagesApi.md#get_last_normalized_messages) | **GET** /messages/last | Get Last Normalized Message
95
99
  *ArtikCloud::MessagesApi* | [**get_message_aggregates**](docs/MessagesApi.md#get_message_aggregates) | **GET** /messages/analytics/aggregates | Get Normalized Message Aggregates
100
+ *ArtikCloud::MessagesApi* | [**get_message_snapshots**](docs/MessagesApi.md#get_message_snapshots) | **GET** /messages/snapshots | Get Message Snapshots
101
+ *ArtikCloud::MessagesApi* | [**get_normalized_actions**](docs/MessagesApi.md#get_normalized_actions) | **GET** /actions | Get Normalized Actions
96
102
  *ArtikCloud::MessagesApi* | [**get_normalized_messages**](docs/MessagesApi.md#get_normalized_messages) | **GET** /messages | Get Normalized Messages
97
- *ArtikCloud::MessagesApi* | [**send_message_action**](docs/MessagesApi.md#send_message_action) | **POST** /messages | Send Message Action
103
+ *ArtikCloud::MessagesApi* | [**send_actions**](docs/MessagesApi.md#send_actions) | **POST** /actions | Send Actions
104
+ *ArtikCloud::MessagesApi* | [**send_message**](docs/MessagesApi.md#send_message) | **POST** /messages | Send Message
98
105
  *ArtikCloud::RegistrationsApi* | [**confirm_user**](docs/RegistrationsApi.md#confirm_user) | **PUT** /devices/registrations/pin | Confirm User
99
106
  *ArtikCloud::RegistrationsApi* | [**get_request_status_for_user**](docs/RegistrationsApi.md#get_request_status_for_user) | **GET** /devices/registrations/{requestId}/status | Get Request Status For User
100
107
  *ArtikCloud::RegistrationsApi* | [**unregister_device**](docs/RegistrationsApi.md#unregister_device) | **DELETE** /devices/{deviceId}/registrations | Unregister Device
@@ -105,8 +112,9 @@ Class | Method | HTTP request | Description
105
112
  *ArtikCloud::TagsApi* | [**get_tag_categories**](docs/TagsApi.md#get_tag_categories) | **GET** /tags/categories | Get all categories
106
113
  *ArtikCloud::TagsApi* | [**get_tag_suggestions**](docs/TagsApi.md#get_tag_suggestions) | **GET** /tags/suggestions | Get tag suggestions
107
114
  *ArtikCloud::TagsApi* | [**get_tags_by_categories**](docs/TagsApi.md#get_tags_by_categories) | **GET** /tags | Get all tags of categories
108
- *ArtikCloud::TokensApi* | [**check_token**](docs/TokensApi.md#check_token) | **POST** /checkToken | Check Token
109
- *ArtikCloud::TokensApi* | [**refresh_token**](docs/TokensApi.md#refresh_token) | **POST** /token | Refresh Token
115
+ *ArtikCloud::TokensApi* | [**check_token**](docs/TokensApi.md#check_token) | **POST** /accounts/checkToken | Check Token
116
+ *ArtikCloud::TokensApi* | [**refresh_token**](docs/TokensApi.md#refresh_token) | **POST** /accounts/token | Refresh Token
117
+ *ArtikCloud::TokensApi* | [**token_info**](docs/TokensApi.md#token_info) | **GET** /accounts/tokenInfo | Token Info
110
118
  *ArtikCloud::UsersApi* | [**create_user_properties**](docs/UsersApi.md#create_user_properties) | **POST** /users/{userId}/properties | Create User Application Properties
111
119
  *ArtikCloud::UsersApi* | [**delete_user_properties**](docs/UsersApi.md#delete_user_properties) | **DELETE** /users/{userId}/properties | Delete User Application Properties
112
120
  *ArtikCloud::UsersApi* | [**get_self**](docs/UsersApi.md#get_self) | **GET** /users/self | Get Current User Profile
@@ -121,10 +129,13 @@ Class | Method | HTTP request | Description
121
129
 
122
130
  - [ArtikCloud::AckEnvelope](docs/AckEnvelope.md)
123
131
  - [ArtikCloud::Acknowledgement](docs/Acknowledgement.md)
132
+ - [ArtikCloud::Action](docs/Action.md)
133
+ - [ArtikCloud::ActionArray](docs/ActionArray.md)
124
134
  - [ArtikCloud::ActionDetails](docs/ActionDetails.md)
125
135
  - [ArtikCloud::ActionDetailsArray](docs/ActionDetailsArray.md)
126
136
  - [ArtikCloud::ActionIn](docs/ActionIn.md)
127
137
  - [ArtikCloud::ActionOut](docs/ActionOut.md)
138
+ - [ArtikCloud::Actions](docs/Actions.md)
128
139
  - [ArtikCloud::AggregateData](docs/AggregateData.md)
129
140
  - [ArtikCloud::AggregatesHistogramData](docs/AggregatesHistogramData.md)
130
141
  - [ArtikCloud::AggregatesHistogramResponse](docs/AggregatesHistogramResponse.md)
@@ -167,15 +178,20 @@ Class | Method | HTTP request | Description
167
178
  - [ArtikCloud::ManifestPropertiesEnvelope](docs/ManifestPropertiesEnvelope.md)
168
179
  - [ArtikCloud::ManifestVersions](docs/ManifestVersions.md)
169
180
  - [ArtikCloud::ManifestVersionsEnvelope](docs/ManifestVersionsEnvelope.md)
181
+ - [ArtikCloud::Message](docs/Message.md)
170
182
  - [ArtikCloud::MessageAction](docs/MessageAction.md)
171
183
  - [ArtikCloud::MessageID](docs/MessageID.md)
172
184
  - [ArtikCloud::MessageIDEnvelope](docs/MessageIDEnvelope.md)
173
185
  - [ArtikCloud::MessageIn](docs/MessageIn.md)
174
186
  - [ArtikCloud::MessageOut](docs/MessageOut.md)
175
187
  - [ArtikCloud::NonEmptyString](docs/NonEmptyString.md)
188
+ - [ArtikCloud::NormalizedAction](docs/NormalizedAction.md)
189
+ - [ArtikCloud::NormalizedActionsEnvelope](docs/NormalizedActionsEnvelope.md)
176
190
  - [ArtikCloud::NormalizedMessage](docs/NormalizedMessage.md)
177
191
  - [ArtikCloud::NormalizedMessagesEnvelope](docs/NormalizedMessagesEnvelope.md)
178
192
  - [ArtikCloud::OutputRule](docs/OutputRule.md)
193
+ - [ArtikCloud::PresenceEnvelope](docs/PresenceEnvelope.md)
194
+ - [ArtikCloud::PresenceModel](docs/PresenceModel.md)
179
195
  - [ArtikCloud::PropertiesEnvelope](docs/PropertiesEnvelope.md)
180
196
  - [ArtikCloud::RefreshTokenResponse](docs/RefreshTokenResponse.md)
181
197
  - [ArtikCloud::RegisterMessage](docs/RegisterMessage.md)
@@ -186,10 +202,15 @@ Class | Method | HTTP request | Description
186
202
  - [ArtikCloud::RuleUpdateInfo](docs/RuleUpdateInfo.md)
187
203
  - [ArtikCloud::RuleWarningOutput](docs/RuleWarningOutput.md)
188
204
  - [ArtikCloud::RulesEnvelope](docs/RulesEnvelope.md)
205
+ - [ArtikCloud::SnapshotResponse](docs/SnapshotResponse.md)
206
+ - [ArtikCloud::SnapshotResponses](docs/SnapshotResponses.md)
207
+ - [ArtikCloud::SnapshotsResponseEnvelope](docs/SnapshotsResponseEnvelope.md)
189
208
  - [ArtikCloud::Tag](docs/Tag.md)
190
209
  - [ArtikCloud::TagArray](docs/TagArray.md)
191
210
  - [ArtikCloud::TagsEnvelope](docs/TagsEnvelope.md)
192
211
  - [ArtikCloud::Token](docs/Token.md)
212
+ - [ArtikCloud::TokenInfo](docs/TokenInfo.md)
213
+ - [ArtikCloud::TokenInfoSuccessResponse](docs/TokenInfoSuccessResponse.md)
193
214
  - [ArtikCloud::TokenRequest](docs/TokenRequest.md)
194
215
  - [ArtikCloud::TokenResponse](docs/TokenResponse.md)
195
216
  - [ArtikCloud::UnregisterDeviceResponse](docs/UnregisterDeviceResponse.md)
@@ -198,16 +219,18 @@ Class | Method | HTTP request | Description
198
219
  - [ArtikCloud::UserEnvelope](docs/UserEnvelope.md)
199
220
  - [ArtikCloud::WebSocketError](docs/WebSocketError.md)
200
221
 
222
+
201
223
  ## Documentation for Authorization
202
224
 
225
+
203
226
  ### artikcloud_oauth
204
227
 
205
228
  - **Type**: OAuth
206
229
  - **Flow**: implicit
207
- - **Authorizatoin URL**: https://accounts.artik.cloud/authorize
208
- - **Scopes**:
209
- - read:artikcloud: Read from Artik Cloud
210
- - write:artikcloud: Write from Artik Cloud
230
+ - **Authorization URL**: https://accounts.artik.cloud/authorize
231
+ - **Scopes**:
232
+ - read:artikcloud: Read from ARTIK Cloud
233
+ - write:artikcloud: Write from ARTIK Cloud
211
234
 
212
235
  More about ARTIK Cloud
213
236
  -------------------------
data/artikcloud.gemspec CHANGED
@@ -13,13 +13,12 @@ Gem::Specification.new do |s|
13
13
  s.description = "A ruby wrapper for the ArtikCloud REST APIs"
14
14
  s.license = "Apache 2.0"
15
15
 
16
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
17
+ s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
16
18
 
17
- s.add_runtime_dependency 'typhoeus', '~> 0.2', '>= 0.2.1'
18
- s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
19
-
20
- s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
21
- s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
22
- s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
19
+ s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
20
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
21
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
23
22
  s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
24
23
  s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
25
24
  s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
data/docs/Action.md ADDED
@@ -0,0 +1,9 @@
1
+ # ArtikCloud::Action
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | Action name. | [optional]
7
+ **parameters** | **Hash<String, Object>** | Parameters information | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::ActionArray
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **actions** | [**Array<Action>**](Action.md) | | [optional]
7
+
8
+
data/docs/Actions.md ADDED
@@ -0,0 +1,12 @@
1
+ # ArtikCloud::Actions
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**ActionArray**](ActionArray.md) | | [optional]
7
+ **ddid** | **String** | Destination Device ID. | [optional]
8
+ **sdid** | **String** | Destination Device ID. | [optional]
9
+ **ts** | **Integer** | Timestamp (past, present or future). Defaults to current time if not provided. | [optional]
10
+ **type** | **String** | Type - action. | [optional] [default to "action"]
11
+
12
+
@@ -22,7 +22,7 @@ Get a Device Type's available manifest versions
22
22
  ```ruby
23
23
  # load the gem
24
24
  require 'artikcloud'
25
- # setup authorization
25
+ # setup authorization
26
26
  ArtikCloud.configure do |config|
27
27
  # Configure OAuth2 access token for authorization: artikcloud_oauth
28
28
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -56,7 +56,7 @@ Name | Type | Description | Notes
56
56
 
57
57
  [artikcloud_oauth](../README.md#artikcloud_oauth)
58
58
 
59
- ### HTTP reuqest headers
59
+ ### HTTP request headers
60
60
 
61
61
  - **Content-Type**: Not defined
62
62
  - **Accept**: application/json
@@ -74,7 +74,7 @@ Retrieves a Device Type
74
74
  ```ruby
75
75
  # load the gem
76
76
  require 'artikcloud'
77
- # setup authorization
77
+ # setup authorization
78
78
  ArtikCloud.configure do |config|
79
79
  # Configure OAuth2 access token for authorization: artikcloud_oauth
80
80
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -108,7 +108,7 @@ Name | Type | Description | Notes
108
108
 
109
109
  [artikcloud_oauth](../README.md#artikcloud_oauth)
110
110
 
111
- ### HTTP reuqest headers
111
+ ### HTTP request headers
112
112
 
113
113
  - **Content-Type**: Not defined
114
114
  - **Accept**: application/json
@@ -126,7 +126,7 @@ Retrieves Device Types
126
126
  ```ruby
127
127
  # load the gem
128
128
  require 'artikcloud'
129
- # setup authorization
129
+ # setup authorization
130
130
  ArtikCloud.configure do |config|
131
131
  # Configure OAuth2 access token for authorization: artikcloud_oauth
132
132
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -168,7 +168,7 @@ Name | Type | Description | Notes
168
168
 
169
169
  [artikcloud_oauth](../README.md#artikcloud_oauth)
170
170
 
171
- ### HTTP reuqest headers
171
+ ### HTTP request headers
172
172
 
173
173
  - **Content-Type**: Not defined
174
174
  - **Accept**: application/json
@@ -186,7 +186,7 @@ Get a Device Type's manifest properties for the latest version.
186
186
  ```ruby
187
187
  # load the gem
188
188
  require 'artikcloud'
189
- # setup authorization
189
+ # setup authorization
190
190
  ArtikCloud.configure do |config|
191
191
  # Configure OAuth2 access token for authorization: artikcloud_oauth
192
192
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -220,7 +220,7 @@ Name | Type | Description | Notes
220
220
 
221
221
  [artikcloud_oauth](../README.md#artikcloud_oauth)
222
222
 
223
- ### HTTP reuqest headers
223
+ ### HTTP request headers
224
224
 
225
225
  - **Content-Type**: Not defined
226
226
  - **Accept**: application/json
@@ -238,7 +238,7 @@ Get a Device Type's manifest properties for a specific version.
238
238
  ```ruby
239
239
  # load the gem
240
240
  require 'artikcloud'
241
- # setup authorization
241
+ # setup authorization
242
242
  ArtikCloud.configure do |config|
243
243
  # Configure OAuth2 access token for authorization: artikcloud_oauth
244
244
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -275,7 +275,7 @@ Name | Type | Description | Notes
275
275
 
276
276
  [artikcloud_oauth](../README.md#artikcloud_oauth)
277
277
 
278
- ### HTTP reuqest headers
278
+ ### HTTP request headers
279
279
 
280
280
  - **Content-Type**: Not defined
281
281
  - **Accept**: application/json
data/docs/DevicesApi.md CHANGED
@@ -8,6 +8,7 @@ Method | HTTP request | Description
8
8
  [**delete_device**](DevicesApi.md#delete_device) | **DELETE** /devices/{deviceId} | Delete Device
9
9
  [**delete_device_token**](DevicesApi.md#delete_device_token) | **DELETE** /devices/{deviceId}/tokens | Delete Device Token
10
10
  [**get_device**](DevicesApi.md#get_device) | **GET** /devices/{deviceId} | Get Device
11
+ [**get_device_presence**](DevicesApi.md#get_device_presence) | **GET** /devices/{deviceId}/presence | Get device presence information
11
12
  [**get_device_token**](DevicesApi.md#get_device_token) | **GET** /devices/{deviceId}/tokens | Get Device Token
12
13
  [**update_device**](DevicesApi.md#update_device) | **PUT** /devices/{deviceId} | Update Device
13
14
  [**update_device_token**](DevicesApi.md#update_device_token) | **PUT** /devices/{deviceId}/tokens | Update Device Token
@@ -24,7 +25,7 @@ Create a device
24
25
  ```ruby
25
26
  # load the gem
26
27
  require 'artikcloud'
27
- # setup authorization
28
+ # setup authorization
28
29
  ArtikCloud.configure do |config|
29
30
  # Configure OAuth2 access token for authorization: artikcloud_oauth
30
31
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -58,7 +59,7 @@ Name | Type | Description | Notes
58
59
 
59
60
  [artikcloud_oauth](../README.md#artikcloud_oauth)
60
61
 
61
- ### HTTP reuqest headers
62
+ ### HTTP request headers
62
63
 
63
64
  - **Content-Type**: application/json
64
65
  - **Accept**: application/json
@@ -76,7 +77,7 @@ Deletes a device
76
77
  ```ruby
77
78
  # load the gem
78
79
  require 'artikcloud'
79
- # setup authorization
80
+ # setup authorization
80
81
  ArtikCloud.configure do |config|
81
82
  # Configure OAuth2 access token for authorization: artikcloud_oauth
82
83
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -110,7 +111,7 @@ Name | Type | Description | Notes
110
111
 
111
112
  [artikcloud_oauth](../README.md#artikcloud_oauth)
112
113
 
113
- ### HTTP reuqest headers
114
+ ### HTTP request headers
114
115
 
115
116
  - **Content-Type**: Not defined
116
117
  - **Accept**: application/json
@@ -128,7 +129,7 @@ Deletes a device's token
128
129
  ```ruby
129
130
  # load the gem
130
131
  require 'artikcloud'
131
- # setup authorization
132
+ # setup authorization
132
133
  ArtikCloud.configure do |config|
133
134
  # Configure OAuth2 access token for authorization: artikcloud_oauth
134
135
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -162,7 +163,7 @@ Name | Type | Description | Notes
162
163
 
163
164
  [artikcloud_oauth](../README.md#artikcloud_oauth)
164
165
 
165
- ### HTTP reuqest headers
166
+ ### HTTP request headers
166
167
 
167
168
  - **Content-Type**: Not defined
168
169
  - **Accept**: application/json
@@ -180,7 +181,7 @@ Retrieves a device
180
181
  ```ruby
181
182
  # load the gem
182
183
  require 'artikcloud'
183
- # setup authorization
184
+ # setup authorization
184
185
  ArtikCloud.configure do |config|
185
186
  # Configure OAuth2 access token for authorization: artikcloud_oauth
186
187
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -214,7 +215,59 @@ Name | Type | Description | Notes
214
215
 
215
216
  [artikcloud_oauth](../README.md#artikcloud_oauth)
216
217
 
217
- ### HTTP reuqest headers
218
+ ### HTTP request headers
219
+
220
+ - **Content-Type**: Not defined
221
+ - **Accept**: application/json
222
+
223
+
224
+
225
+ # **get_device_presence**
226
+ > PresenceEnvelope get_device_presence(device_id)
227
+
228
+ Get device presence information
229
+
230
+ Return the presence status of the given device along with the time it was last seen
231
+
232
+ ### Example
233
+ ```ruby
234
+ # load the gem
235
+ require 'artikcloud'
236
+ # setup authorization
237
+ ArtikCloud.configure do |config|
238
+ # Configure OAuth2 access token for authorization: artikcloud_oauth
239
+ config.access_token = 'YOUR ACCESS TOKEN'
240
+ end
241
+
242
+ api_instance = ArtikCloud::DevicesApi.new
243
+
244
+ device_id = "device_id_example" # String | Device ID.
245
+
246
+
247
+ begin
248
+ #Get device presence information
249
+ result = api_instance.get_device_presence(device_id)
250
+ p result
251
+ rescue ArtikCloud::ApiError => e
252
+ puts "Exception when calling DevicesApi->get_device_presence: #{e}"
253
+ end
254
+ ```
255
+
256
+ ### Parameters
257
+
258
+ Name | Type | Description | Notes
259
+ ------------- | ------------- | ------------- | -------------
260
+ **device_id** | **String**| Device ID. |
261
+
262
+ ### Return type
263
+
264
+ [**PresenceEnvelope**](PresenceEnvelope.md)
265
+
266
+ ### Authorization
267
+
268
+ [artikcloud_oauth](../README.md#artikcloud_oauth)
269
+
270
+ ### HTTP request headers
218
271
 
219
272
  - **Content-Type**: Not defined
220
273
  - **Accept**: application/json
@@ -232,7 +285,7 @@ Retrieves a device's token
232
285
  ```ruby
233
286
  # load the gem
234
287
  require 'artikcloud'
235
- # setup authorization
288
+ # setup authorization
236
289
  ArtikCloud.configure do |config|
237
290
  # Configure OAuth2 access token for authorization: artikcloud_oauth
238
291
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -266,7 +319,7 @@ Name | Type | Description | Notes
266
319
 
267
320
  [artikcloud_oauth](../README.md#artikcloud_oauth)
268
321
 
269
- ### HTTP reuqest headers
322
+ ### HTTP request headers
270
323
 
271
324
  - **Content-Type**: Not defined
272
325
  - **Accept**: application/json
@@ -284,7 +337,7 @@ Updates a device
284
337
  ```ruby
285
338
  # load the gem
286
339
  require 'artikcloud'
287
- # setup authorization
340
+ # setup authorization
288
341
  ArtikCloud.configure do |config|
289
342
  # Configure OAuth2 access token for authorization: artikcloud_oauth
290
343
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -321,7 +374,7 @@ Name | Type | Description | Notes
321
374
 
322
375
  [artikcloud_oauth](../README.md#artikcloud_oauth)
323
376
 
324
- ### HTTP reuqest headers
377
+ ### HTTP request headers
325
378
 
326
379
  - **Content-Type**: application/json
327
380
  - **Accept**: application/json
@@ -339,7 +392,7 @@ Updates a device's token
339
392
  ```ruby
340
393
  # load the gem
341
394
  require 'artikcloud'
342
- # setup authorization
395
+ # setup authorization
343
396
  ArtikCloud.configure do |config|
344
397
  # Configure OAuth2 access token for authorization: artikcloud_oauth
345
398
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -373,9 +426,9 @@ Name | Type | Description | Notes
373
426
 
374
427
  [artikcloud_oauth](../README.md#artikcloud_oauth)
375
428
 
376
- ### HTTP reuqest headers
429
+ ### HTTP request headers
377
430
 
378
- - **Content-Type**: application/json
431
+ - **Content-Type**: text/plain
379
432
  - **Accept**: application/json
380
433
 
381
434
 
data/docs/ExportApi.md CHANGED
@@ -21,7 +21,7 @@ Export normalized messages. The following input combinations are supported:<br/>
21
21
  ```ruby
22
22
  # load the gem
23
23
  require 'artikcloud'
24
- # setup authorization
24
+ # setup authorization
25
25
  ArtikCloud.configure do |config|
26
26
  # Configure OAuth2 access token for authorization: artikcloud_oauth
27
27
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
55
55
 
56
56
  [artikcloud_oauth](../README.md#artikcloud_oauth)
57
57
 
58
- ### HTTP reuqest headers
58
+ ### HTTP request headers
59
59
 
60
60
  - **Content-Type**: Not defined
61
61
  - **Accept**: application/json
@@ -73,7 +73,7 @@ Get the history of export requests.
73
73
  ```ruby
74
74
  # load the gem
75
75
  require 'artikcloud'
76
- # setup authorization
76
+ # setup authorization
77
77
  ArtikCloud.configure do |config|
78
78
  # Configure OAuth2 access token for authorization: artikcloud_oauth
79
79
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -101,8 +101,8 @@ end
101
101
  Name | Type | Description | Notes
102
102
  ------------- | ------------- | ------------- | -------------
103
103
  **trial_id** | **String**| Filter by trialId. | [optional]
104
- **count** | [**Integer**](.md)| Pagination count. | [optional]
105
- **offset** | [**Integer**](.md)| Pagination offset. | [optional]
104
+ **count** | **Integer**| Pagination count. | [optional]
105
+ **offset** | **Integer**| Pagination offset. | [optional]
106
106
 
107
107
  ### Return type
108
108
 
@@ -112,7 +112,7 @@ Name | Type | Description | Notes
112
112
 
113
113
  [artikcloud_oauth](../README.md#artikcloud_oauth)
114
114
 
115
- ### HTTP reuqest headers
115
+ ### HTTP request headers
116
116
 
117
117
  - **Content-Type**: Not defined
118
118
  - **Accept**: application/json
@@ -130,7 +130,7 @@ Retrieve result of the export query in tgz format. The tar file may contain one
130
130
  ```ruby
131
131
  # load the gem
132
132
  require 'artikcloud'
133
- # setup authorization
133
+ # setup authorization
134
134
  ArtikCloud.configure do |config|
135
135
  # Configure OAuth2 access token for authorization: artikcloud_oauth
136
136
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -164,7 +164,7 @@ Name | Type | Description | Notes
164
164
 
165
165
  [artikcloud_oauth](../README.md#artikcloud_oauth)
166
166
 
167
- ### HTTP reuqest headers
167
+ ### HTTP request headers
168
168
 
169
169
  - **Content-Type**: Not defined
170
170
  - **Accept**: application/json
@@ -182,7 +182,7 @@ Check status of the export query.
182
182
  ```ruby
183
183
  # load the gem
184
184
  require 'artikcloud'
185
- # setup authorization
185
+ # setup authorization
186
186
  ArtikCloud.configure do |config|
187
187
  # Configure OAuth2 access token for authorization: artikcloud_oauth
188
188
  config.access_token = 'YOUR ACCESS TOKEN'
@@ -216,7 +216,7 @@ Name | Type | Description | Notes
216
216
 
217
217
  [artikcloud_oauth](../README.md#artikcloud_oauth)
218
218
 
219
- ### HTTP reuqest headers
219
+ ### HTTP request headers
220
220
 
221
221
  - **Content-Type**: Not defined
222
222
  - **Accept**: application/json
data/docs/Message.md ADDED
@@ -0,0 +1,11 @@
1
+ # ArtikCloud::Message
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | **Hash&lt;String, Object&gt;** | | [optional]
7
+ **sdid** | **String** | Source Device ID. | [optional]
8
+ **ts** | **Integer** | Timestamp (past, present or future). Defaults to current time if not provided. | [optional]
9
+ **type** | **String** | Type - message. | [optional] [default to &quot;message&quot;]
10
+
11
+