launchdarkly_api 2.0.10 → 2.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +153 -151
  3. data/docs/AuditLogApi.md +7 -7
  4. data/docs/{Action.md → CopyActions.md} +1 -1
  5. data/docs/CustomProperty.md +1 -1
  6. data/docs/CustomRole.md +1 -1
  7. data/docs/CustomRoleBody.md +1 -1
  8. data/docs/CustomRoles.md +1 -1
  9. data/docs/CustomRolesApi.md +7 -6
  10. data/docs/CustomerMetricsApi.md +511 -0
  11. data/docs/DataExportDestinationsApi.md +293 -0
  12. data/docs/Destination.md +14 -0
  13. data/docs/DestinationAmazonKinesis.md +10 -0
  14. data/docs/DestinationBody.md +11 -0
  15. data/docs/DestinationGooglePubSub.md +9 -0
  16. data/docs/DestinationMParticle.md +11 -0
  17. data/docs/{CustomRoleKeyOrId.md → DestinationSegment.md} +2 -1
  18. data/docs/Destinations.md +9 -0
  19. data/docs/Environment.md +2 -0
  20. data/docs/EnvironmentPost.md +5 -0
  21. data/docs/EnvironmentsApi.md +11 -10
  22. data/docs/EvaluationUsageError.md +9 -0
  23. data/docs/Events.md +8 -0
  24. data/docs/FeatureFlag.md +4 -1
  25. data/docs/FeatureFlagConfig.md +0 -1
  26. data/docs/FeatureFlagCopyBody.md +12 -0
  27. data/docs/FeatureFlagCopyObject.md +9 -0
  28. data/docs/FeatureFlagStatus.md +1 -1
  29. data/docs/FeatureFlagStatusAcrossEnvironments.md +10 -0
  30. data/docs/FeatureFlagStatusForQueriedEnvironment.md +10 -0
  31. data/docs/FeatureFlagsApi.md +136 -17
  32. data/docs/MAU.md +10 -0
  33. data/docs/{Actions.md → MAUMetadata.md} +1 -1
  34. data/docs/MAUbyCategory.md +10 -0
  35. data/docs/Member.md +2 -0
  36. data/docs/Members.md +1 -1
  37. data/docs/MembersBody.md +1 -1
  38. data/docs/Policy.md +4 -2
  39. data/docs/ProjectBody.md +2 -0
  40. data/docs/ProjectsApi.md +7 -6
  41. data/docs/Rollout.md +1 -0
  42. data/docs/Statement.md +4 -4
  43. data/docs/Stream.md +10 -0
  44. data/docs/StreamBySDK.md +10 -0
  45. data/docs/StreamBySDKLinks.md +9 -0
  46. data/docs/StreamBySDKLinksMetadata.md +10 -0
  47. data/docs/StreamLinks.md +10 -0
  48. data/docs/StreamSDKVersion.md +9 -0
  49. data/docs/StreamSDKVersionData.md +9 -0
  50. data/docs/StreamUsageError.md +9 -0
  51. data/docs/StreamUsageLinks.md +10 -0
  52. data/docs/StreamUsageMetadata.md +10 -0
  53. data/docs/StreamUsageSeries.md +9 -0
  54. data/docs/Streams.md +8 -0
  55. data/docs/TeamMembersApi.md +7 -6
  56. data/docs/Usage.md +9 -0
  57. data/docs/{CustomProperties.md → UsageError.md} +2 -1
  58. data/docs/UsageLinks.md +10 -0
  59. data/docs/UserSegmentsApi.md +18 -17
  60. data/docs/UserSettingsApi.md +11 -11
  61. data/docs/UsersApi.md +15 -15
  62. data/docs/Webhook.md +1 -0
  63. data/docs/WebhookBody.md +2 -0
  64. data/docs/WebhooksApi.md +7 -6
  65. data/launchdarkly_api.gemspec +5 -6
  66. data/lib/launchdarkly_api/api/audit_log_api.rb +13 -19
  67. data/lib/launchdarkly_api/api/custom_roles_api.rb +23 -37
  68. data/lib/launchdarkly_api/api/customer_metrics_api.rb +519 -0
  69. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +330 -0
  70. data/lib/launchdarkly_api/api/environments_api.rb +20 -31
  71. data/lib/launchdarkly_api/api/feature_flags_api.rb +150 -43
  72. data/lib/launchdarkly_api/api/projects_api.rb +23 -37
  73. data/lib/launchdarkly_api/api/root_api.rb +6 -9
  74. data/lib/launchdarkly_api/api/team_members_api.rb +23 -37
  75. data/lib/launchdarkly_api/api/user_segments_api.rb +23 -37
  76. data/lib/launchdarkly_api/api/user_settings_api.rb +12 -21
  77. data/lib/launchdarkly_api/api/users_api.rb +17 -29
  78. data/lib/launchdarkly_api/api/webhooks_api.rb +23 -37
  79. data/lib/launchdarkly_api/api_client.rb +10 -10
  80. data/lib/launchdarkly_api/api_error.rb +2 -2
  81. data/lib/launchdarkly_api/configuration.rb +3 -3
  82. data/lib/launchdarkly_api/models/audit_log_entries.rb +7 -12
  83. data/lib/launchdarkly_api/models/audit_log_entry.rb +7 -12
  84. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +7 -12
  85. data/lib/launchdarkly_api/models/clause.rb +7 -12
  86. data/lib/launchdarkly_api/models/copy_actions.rb +34 -0
  87. data/lib/launchdarkly_api/models/custom_property.rb +13 -14
  88. data/lib/launchdarkly_api/models/custom_property_values.rb +7 -11
  89. data/lib/launchdarkly_api/models/custom_role.rb +9 -13
  90. data/lib/launchdarkly_api/models/custom_role_body.rb +12 -16
  91. data/lib/launchdarkly_api/models/custom_roles.rb +11 -14
  92. data/lib/launchdarkly_api/models/destination.rb +276 -0
  93. data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +201 -0
  94. data/lib/launchdarkly_api/models/destination_body.rb +263 -0
  95. data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +192 -0
  96. data/lib/launchdarkly_api/models/destination_m_particle.rb +210 -0
  97. data/lib/launchdarkly_api/models/destination_segment.rb +183 -0
  98. data/lib/launchdarkly_api/models/destinations.rb +194 -0
  99. data/lib/launchdarkly_api/models/environment.rb +29 -14
  100. data/lib/launchdarkly_api/models/environment_post.rb +64 -17
  101. data/lib/launchdarkly_api/models/evaluation_usage_error.rb +192 -0
  102. data/lib/launchdarkly_api/models/{action.rb → events.rb} +17 -13
  103. data/lib/launchdarkly_api/models/fallthrough.rb +7 -12
  104. data/lib/launchdarkly_api/models/feature_flag.rb +46 -16
  105. data/lib/launchdarkly_api/models/feature_flag_body.rb +10 -15
  106. data/lib/launchdarkly_api/models/feature_flag_config.rb +8 -24
  107. data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +226 -0
  108. data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +199 -0
  109. data/lib/launchdarkly_api/models/feature_flag_status.rb +22 -26
  110. data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +203 -0
  111. data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +236 -0
  112. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +7 -12
  113. data/lib/launchdarkly_api/models/feature_flags.rb +7 -12
  114. data/lib/launchdarkly_api/models/id.rb +7 -11
  115. data/lib/launchdarkly_api/models/link.rb +7 -12
  116. data/lib/launchdarkly_api/models/links.rb +7 -12
  117. data/lib/launchdarkly_api/models/ma_uby_category.rb +205 -0
  118. data/lib/launchdarkly_api/models/mau.rb +205 -0
  119. data/lib/launchdarkly_api/models/{actions.rb → mau_metadata.rb} +8 -13
  120. data/lib/launchdarkly_api/models/member.rb +26 -13
  121. data/lib/launchdarkly_api/models/members.rb +11 -14
  122. data/lib/launchdarkly_api/models/members_body.rb +9 -14
  123. data/lib/launchdarkly_api/models/patch_comment.rb +7 -12
  124. data/lib/launchdarkly_api/models/patch_operation.rb +10 -15
  125. data/lib/launchdarkly_api/models/policy.rb +40 -17
  126. data/lib/launchdarkly_api/models/prerequisite.rb +7 -12
  127. data/lib/launchdarkly_api/models/project.rb +7 -12
  128. data/lib/launchdarkly_api/models/project_body.rb +30 -15
  129. data/lib/launchdarkly_api/models/projects.rb +7 -12
  130. data/lib/launchdarkly_api/models/role.rb +7 -8
  131. data/lib/launchdarkly_api/models/rollout.rb +17 -13
  132. data/lib/launchdarkly_api/models/rule.rb +7 -12
  133. data/lib/launchdarkly_api/models/statement.rb +35 -31
  134. data/lib/launchdarkly_api/models/statements.rb +7 -12
  135. data/lib/launchdarkly_api/models/stream.rb +205 -0
  136. data/lib/launchdarkly_api/models/stream_by_sdk.rb +205 -0
  137. data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +192 -0
  138. data/lib/launchdarkly_api/models/{resources.rb → stream_by_sdk_links_metadata.rb} +34 -12
  139. data/lib/launchdarkly_api/models/stream_links.rb +204 -0
  140. data/lib/launchdarkly_api/models/stream_sdk_version.rb +194 -0
  141. data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +194 -0
  142. data/lib/launchdarkly_api/models/stream_usage_error.rb +192 -0
  143. data/lib/launchdarkly_api/models/stream_usage_links.rb +204 -0
  144. data/lib/launchdarkly_api/models/stream_usage_metadata.rb +203 -0
  145. data/lib/launchdarkly_api/models/stream_usage_series.rb +194 -0
  146. data/lib/launchdarkly_api/models/{custom_properties.rb → streams.rb} +17 -13
  147. data/lib/launchdarkly_api/models/target.rb +7 -12
  148. data/lib/launchdarkly_api/models/usage.rb +194 -0
  149. data/lib/launchdarkly_api/models/{custom_role_key_or_id.rb → usage_error.rb} +17 -13
  150. data/lib/launchdarkly_api/models/usage_links.rb +204 -0
  151. data/lib/launchdarkly_api/models/user.rb +7 -12
  152. data/lib/launchdarkly_api/models/user_flag_setting.rb +7 -12
  153. data/lib/launchdarkly_api/models/user_flag_settings.rb +7 -12
  154. data/lib/launchdarkly_api/models/user_record.rb +7 -12
  155. data/lib/launchdarkly_api/models/user_segment.rb +10 -15
  156. data/lib/launchdarkly_api/models/user_segment_body.rb +9 -14
  157. data/lib/launchdarkly_api/models/user_segment_rule.rb +7 -12
  158. data/lib/launchdarkly_api/models/user_segments.rb +7 -12
  159. data/lib/launchdarkly_api/models/user_settings_body.rb +7 -12
  160. data/lib/launchdarkly_api/models/users.rb +7 -12
  161. data/lib/launchdarkly_api/models/variation.rb +8 -13
  162. data/lib/launchdarkly_api/models/webhook.rb +17 -13
  163. data/lib/launchdarkly_api/models/webhook_body.rb +33 -17
  164. data/lib/launchdarkly_api/models/webhooks.rb +7 -12
  165. data/lib/launchdarkly_api/models/weighted_variation.rb +7 -12
  166. data/lib/launchdarkly_api/version.rb +3 -3
  167. data/lib/launchdarkly_api.rb +36 -8
  168. data/openapi.yml +1004 -115
  169. data/spec/api/audit_log_api_spec.rb +6 -8
  170. data/spec/api/custom_roles_api_spec.rb +8 -13
  171. data/spec/api/customer_metrics_api_spec.rb +141 -0
  172. data/spec/api/data_export_destinations_api_spec.rb +98 -0
  173. data/spec/api/environments_api_spec.rb +7 -11
  174. data/spec/api/feature_flags_api_spec.rb +36 -16
  175. data/spec/api/projects_api_spec.rb +8 -13
  176. data/spec/api/root_api_spec.rb +3 -4
  177. data/spec/api/team_members_api_spec.rb +8 -13
  178. data/spec/api/user_segments_api_spec.rb +8 -13
  179. data/spec/api/user_settings_api_spec.rb +5 -8
  180. data/spec/api/users_api_spec.rb +7 -11
  181. data/spec/api/webhooks_api_spec.rb +8 -13
  182. data/spec/api_client_spec.rb +36 -36
  183. data/spec/configuration_spec.rb +10 -10
  184. data/spec/models/audit_log_entries_spec.rb +4 -5
  185. data/spec/models/audit_log_entry_spec.rb +14 -15
  186. data/spec/models/audit_log_entry_target_spec.rb +5 -6
  187. data/spec/models/clause_spec.rb +6 -7
  188. data/spec/models/{action_spec.rb → copy_actions_spec.rb} +8 -9
  189. data/spec/models/custom_property_spec.rb +4 -5
  190. data/spec/models/custom_property_values_spec.rb +2 -3
  191. data/spec/models/custom_role_body_spec.rb +6 -7
  192. data/spec/models/custom_role_spec.rb +8 -9
  193. data/spec/models/custom_roles_spec.rb +4 -5
  194. data/spec/models/destination_amazon_kinesis_spec.rb +53 -0
  195. data/spec/models/destination_body_spec.rb +63 -0
  196. data/spec/models/destination_google_pub_sub_spec.rb +47 -0
  197. data/spec/models/destination_m_particle_spec.rb +59 -0
  198. data/spec/models/destination_segment_spec.rb +41 -0
  199. data/spec/models/destination_spec.rb +81 -0
  200. data/spec/models/destinations_spec.rb +47 -0
  201. data/spec/models/environment_post_spec.rb +36 -7
  202. data/spec/models/environment_spec.rb +25 -14
  203. data/spec/models/evaluation_usage_error_spec.rb +47 -0
  204. data/spec/models/events_spec.rb +41 -0
  205. data/spec/models/fallthrough_spec.rb +4 -5
  206. data/spec/models/feature_flag_body_spec.rb +9 -10
  207. data/spec/models/feature_flag_config_spec.rb +14 -21
  208. data/spec/models/feature_flag_copy_body_spec.rb +65 -0
  209. data/spec/models/feature_flag_copy_object_spec.rb +47 -0
  210. data/spec/models/feature_flag_spec.rb +35 -18
  211. data/spec/models/feature_flag_status_across_environments_spec.rb +53 -0
  212. data/spec/models/feature_flag_status_for_queried_environment_spec.rb +57 -0
  213. data/spec/models/feature_flag_status_spec.rb +14 -15
  214. data/spec/models/feature_flag_statuses_spec.rb +4 -5
  215. data/spec/models/feature_flags_spec.rb +4 -5
  216. data/spec/models/id_spec.rb +2 -3
  217. data/spec/models/link_spec.rb +4 -5
  218. data/spec/models/links_spec.rb +4 -5
  219. data/spec/models/ma_uby_category_spec.rb +53 -0
  220. data/spec/models/{actions_spec.rb → mau_metadata_spec.rb} +8 -9
  221. data/spec/models/mau_spec.rb +53 -0
  222. data/spec/models/member_spec.rb +21 -10
  223. data/spec/models/members_body_spec.rb +8 -9
  224. data/spec/models/members_spec.rb +4 -5
  225. data/spec/models/patch_comment_spec.rb +4 -5
  226. data/spec/models/patch_operation_spec.rb +5 -6
  227. data/spec/models/policy_spec.rb +17 -6
  228. data/spec/models/prerequisite_spec.rb +4 -5
  229. data/spec/models/project_body_spec.rb +17 -6
  230. data/spec/models/project_spec.rb +8 -9
  231. data/spec/models/projects_spec.rb +4 -5
  232. data/spec/models/role_spec.rb +2 -3
  233. data/spec/models/rollout_spec.rb +9 -4
  234. data/spec/models/rule_spec.rb +6 -7
  235. data/spec/models/statement_spec.rb +13 -14
  236. data/spec/models/statements_spec.rb +2 -3
  237. data/spec/models/stream_by_sdk_links_metadata_spec.rb +53 -0
  238. data/spec/models/stream_by_sdk_links_spec.rb +47 -0
  239. data/spec/models/stream_by_sdk_spec.rb +53 -0
  240. data/spec/models/stream_links_spec.rb +53 -0
  241. data/spec/models/stream_sdk_version_data_spec.rb +47 -0
  242. data/spec/models/stream_sdk_version_spec.rb +47 -0
  243. data/spec/models/stream_spec.rb +53 -0
  244. data/spec/models/stream_usage_error_spec.rb +47 -0
  245. data/spec/models/stream_usage_links_spec.rb +53 -0
  246. data/spec/models/stream_usage_metadata_spec.rb +53 -0
  247. data/spec/models/stream_usage_series_spec.rb +47 -0
  248. data/spec/models/streams_spec.rb +41 -0
  249. data/spec/models/target_spec.rb +4 -5
  250. data/spec/models/usage_error_spec.rb +41 -0
  251. data/spec/models/usage_links_spec.rb +53 -0
  252. data/spec/models/usage_spec.rb +47 -0
  253. data/spec/models/user_flag_setting_spec.rb +5 -6
  254. data/spec/models/user_flag_settings_spec.rb +4 -5
  255. data/spec/models/user_record_spec.rb +7 -8
  256. data/spec/models/user_segment_body_spec.rb +6 -7
  257. data/spec/models/user_segment_rule_spec.rb +5 -6
  258. data/spec/models/user_segment_spec.rb +12 -13
  259. data/spec/models/user_segments_spec.rb +4 -5
  260. data/spec/models/user_settings_body_spec.rb +3 -4
  261. data/spec/models/user_spec.rb +13 -14
  262. data/spec/models/users_spec.rb +5 -6
  263. data/spec/models/variation_spec.rb +5 -6
  264. data/spec/models/webhook_body_spec.rb +19 -8
  265. data/spec/models/webhook_spec.rb +15 -10
  266. data/spec/models/webhooks_spec.rb +4 -5
  267. data/spec/models/weighted_variation_spec.rb +4 -5
  268. data/spec/spec_helper.rb +2 -2
  269. metadata +187 -74
  270. data/docs/Resource.md +0 -7
  271. data/docs/Resources.md +0 -7
  272. data/lib/launchdarkly_api/models/resource.rb +0 -179
  273. data/spec/models/custom_properties_spec.rb +0 -36
  274. data/spec/models/custom_role_key_or_id_spec.rb +0 -36
  275. data/spec/models/resource_spec.rb +0 -36
  276. data/spec/models/resources_spec.rb +0 -36
@@ -0,0 +1,519 @@
1
+ =begin
2
+ #LaunchDarkly REST API
3
+
4
+ #Build custom integrations with the LaunchDarkly REST API
5
+
6
+ OpenAPI spec version: 2.0.27
7
+ Contact: support@launchdarkly.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.8
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module LaunchDarklyApi
16
+ class CustomerMetricsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get events usage by event id and the feature flag key.
23
+ # @param env_id The environment id for the flag evaluations in question.
24
+ # @param flag_key The key of the flag we want metrics for.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [StreamSDKVersion]
27
+ def get_evaluations(env_id, flag_key, opts = {})
28
+ data, _status_code, _headers = get_evaluations_with_http_info(env_id, flag_key, opts)
29
+ data
30
+ end
31
+
32
+ # Get events usage by event id and the feature flag key.
33
+ # @param env_id The environment id for the flag evaluations in question.
34
+ # @param flag_key The key of the flag we want metrics for.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(StreamSDKVersion, Fixnum, Hash)>] StreamSDKVersion data, response status code and response headers
37
+ def get_evaluations_with_http_info(env_id, flag_key, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_evaluations ...'
40
+ end
41
+ # verify the required parameter 'env_id' is set
42
+ if @api_client.config.client_side_validation && env_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'env_id' when calling CustomerMetricsApi.get_evaluations"
44
+ end
45
+ # verify the required parameter 'flag_key' is set
46
+ if @api_client.config.client_side_validation && flag_key.nil?
47
+ fail ArgumentError, "Missing the required parameter 'flag_key' when calling CustomerMetricsApi.get_evaluations"
48
+ end
49
+ # resource path
50
+ local_var_path = '/usage/evaluations/{envId}/{flagKey}'.sub('{' + 'envId' + '}', env_id.to_s).sub('{' + 'flagKey' + '}', flag_key.to_s)
51
+
52
+ # query parameters
53
+ query_params = {}
54
+
55
+ # header parameters
56
+ header_params = {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = {}
64
+
65
+ # http body (model)
66
+ post_body = nil
67
+ auth_names = ['Token']
68
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => 'StreamSDKVersion')
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_evaluations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+ # Get events usage by event type.
81
+ # @param type The type of event we would like to track.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [StreamSDKVersion]
84
+ def get_event(type, opts = {})
85
+ data, _status_code, _headers = get_event_with_http_info(type, opts)
86
+ data
87
+ end
88
+
89
+ # Get events usage by event type.
90
+ # @param type The type of event we would like to track.
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(StreamSDKVersion, Fixnum, Hash)>] StreamSDKVersion data, response status code and response headers
93
+ def get_event_with_http_info(type, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_event ...'
96
+ end
97
+ # verify the required parameter 'type' is set
98
+ if @api_client.config.client_side_validation && type.nil?
99
+ fail ArgumentError, "Missing the required parameter 'type' when calling CustomerMetricsApi.get_event"
100
+ end
101
+ # resource path
102
+ local_var_path = '/usage/events/{type}'.sub('{' + 'type' + '}', type.to_s)
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = nil
119
+ auth_names = ['Token']
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'StreamSDKVersion')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ # Get events usage endpoints.
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [Events]
135
+ def get_events(opts = {})
136
+ data, _status_code, _headers = get_events_with_http_info(opts)
137
+ data
138
+ end
139
+
140
+ # Get events usage endpoints.
141
+ # @param [Hash] opts the optional parameters
142
+ # @return [Array<(Events, Fixnum, Hash)>] Events data, response status code and response headers
143
+ def get_events_with_http_info(opts = {})
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_events ...'
146
+ end
147
+ # resource path
148
+ local_var_path = '/usage/events'
149
+
150
+ # query parameters
151
+ query_params = {}
152
+
153
+ # header parameters
154
+ header_params = {}
155
+ # HTTP header 'Accept' (if needed)
156
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
157
+ # HTTP header 'Content-Type'
158
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
159
+
160
+ # form parameters
161
+ form_params = {}
162
+
163
+ # http body (model)
164
+ post_body = nil
165
+ auth_names = ['Token']
166
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => 'Events')
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
175
+ end
176
+ return data, status_code, headers
177
+ end
178
+ # Get monthly active user data.
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [MAU]
181
+ def get_mau(opts = {})
182
+ data, _status_code, _headers = get_mau_with_http_info(opts)
183
+ data
184
+ end
185
+
186
+ # Get monthly active user data.
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [Array<(MAU, Fixnum, Hash)>] MAU data, response status code and response headers
189
+ def get_mau_with_http_info(opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_mau ...'
192
+ end
193
+ # resource path
194
+ local_var_path = '/usage/mau'
195
+
196
+ # query parameters
197
+ query_params = {}
198
+
199
+ # header parameters
200
+ header_params = {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
203
+ # HTTP header 'Content-Type'
204
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
205
+
206
+ # form parameters
207
+ form_params = {}
208
+
209
+ # http body (model)
210
+ post_body = nil
211
+ auth_names = ['Token']
212
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
213
+ :header_params => header_params,
214
+ :query_params => query_params,
215
+ :form_params => form_params,
216
+ :body => post_body,
217
+ :auth_names => auth_names,
218
+ :return_type => 'MAU')
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_mau\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+ # Get monthly active user data by category.
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [MAUbyCategory]
227
+ def get_mau_by_category(opts = {})
228
+ data, _status_code, _headers = get_mau_by_category_with_http_info(opts)
229
+ data
230
+ end
231
+
232
+ # Get monthly active user data by category.
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [Array<(MAUbyCategory, Fixnum, Hash)>] MAUbyCategory data, response status code and response headers
235
+ def get_mau_by_category_with_http_info(opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_mau_by_category ...'
238
+ end
239
+ # resource path
240
+ local_var_path = '/usage/mau/bycategory'
241
+
242
+ # query parameters
243
+ query_params = {}
244
+
245
+ # header parameters
246
+ header_params = {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+ # HTTP header 'Content-Type'
250
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
251
+
252
+ # form parameters
253
+ form_params = {}
254
+
255
+ # http body (model)
256
+ post_body = nil
257
+ auth_names = ['Token']
258
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
259
+ :header_params => header_params,
260
+ :query_params => query_params,
261
+ :form_params => form_params,
262
+ :body => post_body,
263
+ :auth_names => auth_names,
264
+ :return_type => 'MAUbyCategory')
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_mau_by_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+ # Get a stream endpoint and return timeseries data.
271
+ # @param source The source of where the stream comes from.
272
+ # @param [Hash] opts the optional parameters
273
+ # @return [Stream]
274
+ def get_stream(source, opts = {})
275
+ data, _status_code, _headers = get_stream_with_http_info(source, opts)
276
+ data
277
+ end
278
+
279
+ # Get a stream endpoint and return timeseries data.
280
+ # @param source The source of where the stream comes from.
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [Array<(Stream, Fixnum, Hash)>] Stream data, response status code and response headers
283
+ def get_stream_with_http_info(source, opts = {})
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_stream ...'
286
+ end
287
+ # verify the required parameter 'source' is set
288
+ if @api_client.config.client_side_validation && source.nil?
289
+ fail ArgumentError, "Missing the required parameter 'source' when calling CustomerMetricsApi.get_stream"
290
+ end
291
+ # resource path
292
+ local_var_path = '/usage/streams/{source}'.sub('{' + 'source' + '}', source.to_s)
293
+
294
+ # query parameters
295
+ query_params = {}
296
+
297
+ # header parameters
298
+ header_params = {}
299
+ # HTTP header 'Accept' (if needed)
300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
301
+ # HTTP header 'Content-Type'
302
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
303
+
304
+ # form parameters
305
+ form_params = {}
306
+
307
+ # http body (model)
308
+ post_body = nil
309
+ auth_names = ['Token']
310
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
311
+ :header_params => header_params,
312
+ :query_params => query_params,
313
+ :form_params => form_params,
314
+ :body => post_body,
315
+ :auth_names => auth_names,
316
+ :return_type => 'Stream')
317
+ if @api_client.config.debugging
318
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
319
+ end
320
+ return data, status_code, headers
321
+ end
322
+ # Get a stream timeseries data by source show sdk version metadata.
323
+ # @param source The source of where the stream comes from.
324
+ # @param [Hash] opts the optional parameters
325
+ # @return [StreamBySDK]
326
+ def get_stream_by_sdk(source, opts = {})
327
+ data, _status_code, _headers = get_stream_by_sdk_with_http_info(source, opts)
328
+ data
329
+ end
330
+
331
+ # Get a stream timeseries data by source show sdk version metadata.
332
+ # @param source The source of where the stream comes from.
333
+ # @param [Hash] opts the optional parameters
334
+ # @return [Array<(StreamBySDK, Fixnum, Hash)>] StreamBySDK data, response status code and response headers
335
+ def get_stream_by_sdk_with_http_info(source, opts = {})
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_stream_by_sdk ...'
338
+ end
339
+ # verify the required parameter 'source' is set
340
+ if @api_client.config.client_side_validation && source.nil?
341
+ fail ArgumentError, "Missing the required parameter 'source' when calling CustomerMetricsApi.get_stream_by_sdk"
342
+ end
343
+ # resource path
344
+ local_var_path = '/usage/streams/{source}/bysdkversion'.sub('{' + 'source' + '}', source.to_s)
345
+
346
+ # query parameters
347
+ query_params = {}
348
+
349
+ # header parameters
350
+ header_params = {}
351
+ # HTTP header 'Accept' (if needed)
352
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
353
+ # HTTP header 'Content-Type'
354
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
355
+
356
+ # form parameters
357
+ form_params = {}
358
+
359
+ # http body (model)
360
+ post_body = nil
361
+ auth_names = ['Token']
362
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
363
+ :header_params => header_params,
364
+ :query_params => query_params,
365
+ :form_params => form_params,
366
+ :body => post_body,
367
+ :auth_names => auth_names,
368
+ :return_type => 'StreamBySDK')
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_stream_by_sdk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371
+ end
372
+ return data, status_code, headers
373
+ end
374
+ # Get a stream timeseries data by source and show all sdk version associated.
375
+ # @param source The source of where the stream comes from.
376
+ # @param [Hash] opts the optional parameters
377
+ # @return [StreamSDKVersion]
378
+ def get_stream_sdk_version(source, opts = {})
379
+ data, _status_code, _headers = get_stream_sdk_version_with_http_info(source, opts)
380
+ data
381
+ end
382
+
383
+ # Get a stream timeseries data by source and show all sdk version associated.
384
+ # @param source The source of where the stream comes from.
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [Array<(StreamSDKVersion, Fixnum, Hash)>] StreamSDKVersion data, response status code and response headers
387
+ def get_stream_sdk_version_with_http_info(source, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_stream_sdk_version ...'
390
+ end
391
+ # verify the required parameter 'source' is set
392
+ if @api_client.config.client_side_validation && source.nil?
393
+ fail ArgumentError, "Missing the required parameter 'source' when calling CustomerMetricsApi.get_stream_sdk_version"
394
+ end
395
+ # resource path
396
+ local_var_path = '/usage/streams/{source}/sdkversions'.sub('{' + 'source' + '}', source.to_s)
397
+
398
+ # query parameters
399
+ query_params = {}
400
+
401
+ # header parameters
402
+ header_params = {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ # HTTP header 'Content-Type'
406
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = {}
410
+
411
+ # http body (model)
412
+ post_body = nil
413
+ auth_names = ['Token']
414
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
415
+ :header_params => header_params,
416
+ :query_params => query_params,
417
+ :form_params => form_params,
418
+ :body => post_body,
419
+ :auth_names => auth_names,
420
+ :return_type => 'StreamSDKVersion')
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_stream_sdk_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
+ end
424
+ return data, status_code, headers
425
+ end
426
+ # Returns a list of all streams.
427
+ # @param [Hash] opts the optional parameters
428
+ # @return [Streams]
429
+ def get_streams(opts = {})
430
+ data, _status_code, _headers = get_streams_with_http_info(opts)
431
+ data
432
+ end
433
+
434
+ # Returns a list of all streams.
435
+ # @param [Hash] opts the optional parameters
436
+ # @return [Array<(Streams, Fixnum, Hash)>] Streams data, response status code and response headers
437
+ def get_streams_with_http_info(opts = {})
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_streams ...'
440
+ end
441
+ # resource path
442
+ local_var_path = '/usage/streams'
443
+
444
+ # query parameters
445
+ query_params = {}
446
+
447
+ # header parameters
448
+ header_params = {}
449
+ # HTTP header 'Accept' (if needed)
450
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
451
+ # HTTP header 'Content-Type'
452
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
453
+
454
+ # form parameters
455
+ form_params = {}
456
+
457
+ # http body (model)
458
+ post_body = nil
459
+ auth_names = ['Token']
460
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
461
+ :header_params => header_params,
462
+ :query_params => query_params,
463
+ :form_params => form_params,
464
+ :body => post_body,
465
+ :auth_names => auth_names,
466
+ :return_type => 'Streams')
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_streams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
472
+ # Returns of the usage endpoints available.
473
+ # @param [Hash] opts the optional parameters
474
+ # @return [Usage]
475
+ def get_usage(opts = {})
476
+ data, _status_code, _headers = get_usage_with_http_info(opts)
477
+ data
478
+ end
479
+
480
+ # Returns of the usage endpoints available.
481
+ # @param [Hash] opts the optional parameters
482
+ # @return [Array<(Usage, Fixnum, Hash)>] Usage data, response status code and response headers
483
+ def get_usage_with_http_info(opts = {})
484
+ if @api_client.config.debugging
485
+ @api_client.config.logger.debug 'Calling API: CustomerMetricsApi.get_usage ...'
486
+ end
487
+ # resource path
488
+ local_var_path = '/usage'
489
+
490
+ # query parameters
491
+ query_params = {}
492
+
493
+ # header parameters
494
+ header_params = {}
495
+ # HTTP header 'Accept' (if needed)
496
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
497
+ # HTTP header 'Content-Type'
498
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
499
+
500
+ # form parameters
501
+ form_params = {}
502
+
503
+ # http body (model)
504
+ post_body = nil
505
+ auth_names = ['Token']
506
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
507
+ :header_params => header_params,
508
+ :query_params => query_params,
509
+ :form_params => form_params,
510
+ :body => post_body,
511
+ :auth_names => auth_names,
512
+ :return_type => 'Usage')
513
+ if @api_client.config.debugging
514
+ @api_client.config.logger.debug "API called: CustomerMetricsApi#get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
515
+ end
516
+ return data, status_code, headers
517
+ end
518
+ end
519
+ end