ElasticEmail 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/DIFF +0 -0
- data/ElasticEmail.gemspec +38 -0
- data/Gemfile +9 -0
- data/README.md +286 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/AccessLevel.md +15 -0
- data/docs/AccountStatusEnum.md +15 -0
- data/docs/ApiKey.md +28 -0
- data/docs/ApiKeyPayload.md +26 -0
- data/docs/BodyContentType.md +15 -0
- data/docs/BodyPart.md +22 -0
- data/docs/Campaign.md +26 -0
- data/docs/CampaignOptions.md +26 -0
- data/docs/CampaignRecipient.md +20 -0
- data/docs/CampaignStatus.md +15 -0
- data/docs/CampaignTemplate.md +30 -0
- data/docs/CampaignsApi.md +374 -0
- data/docs/ChannelLogStatusSummary.md +44 -0
- data/docs/CompressionFormat.md +15 -0
- data/docs/ConsentData.md +22 -0
- data/docs/ConsentTracking.md +15 -0
- data/docs/Contact.md +38 -0
- data/docs/ContactActivity.md +38 -0
- data/docs/ContactHistEventType.md +15 -0
- data/docs/ContactHistory.md +30 -0
- data/docs/ContactPayload.md +28 -0
- data/docs/ContactSource.md +15 -0
- data/docs/ContactStatus.md +15 -0
- data/docs/ContactUpdatePayload.md +22 -0
- data/docs/ContactsApi.md +756 -0
- data/docs/ContactsList.md +24 -0
- data/docs/DeliveryOptimizationType.md +15 -0
- data/docs/EmailContent.md +38 -0
- data/docs/EmailData.md +22 -0
- data/docs/EmailMessageData.md +22 -0
- data/docs/EmailRecipient.md +20 -0
- data/docs/EmailSend.md +20 -0
- data/docs/EmailStatus.md +40 -0
- data/docs/EmailTransactionalMessageData.md +22 -0
- data/docs/EmailValidationResult.md +34 -0
- data/docs/EmailValidationStatus.md +15 -0
- data/docs/EmailView.md +22 -0
- data/docs/EmailsApi.md +295 -0
- data/docs/EmailsPayload.md +20 -0
- data/docs/EncodingType.md +15 -0
- data/docs/EventType.md +15 -0
- data/docs/EventsApi.md +575 -0
- data/docs/EventsOrderBy.md +15 -0
- data/docs/ExportFileFormats.md +15 -0
- data/docs/ExportLink.md +20 -0
- data/docs/ExportStatus.md +15 -0
- data/docs/FileInfo.md +26 -0
- data/docs/FilePayload.md +22 -0
- data/docs/FileUploadResult.md +20 -0
- data/docs/FilesApi.md +374 -0
- data/docs/InboundPayload.md +28 -0
- data/docs/InboundRoute.md +30 -0
- data/docs/InboundRouteActionType.md +15 -0
- data/docs/InboundRouteApi.md +437 -0
- data/docs/InboundRouteFilterType.md +15 -0
- data/docs/ListPayload.md +22 -0
- data/docs/ListUpdatePayload.md +20 -0
- data/docs/ListsApi.md +519 -0
- data/docs/LogJobStatus.md +15 -0
- data/docs/LogStatusSummary.md +42 -0
- data/docs/MergeEmailPayload.md +22 -0
- data/docs/MessageAttachment.md +22 -0
- data/docs/MessageCategory.md +15 -0
- data/docs/NewApiKey.md +30 -0
- data/docs/NewSmtpCredentials.md +30 -0
- data/docs/Options.md +28 -0
- data/docs/RecipientEvent.md +42 -0
- data/docs/SecurityApi.md +749 -0
- data/docs/Segment.md +20 -0
- data/docs/SegmentPayload.md +20 -0
- data/docs/SegmentsApi.md +372 -0
- data/docs/SmtpCredentials.md +28 -0
- data/docs/SmtpCredentialsPayload.md +24 -0
- data/docs/SortOrderItem.md +20 -0
- data/docs/SplitOptimizationType.md +15 -0
- data/docs/SplitOptions.md +20 -0
- data/docs/StatisticsApi.md +379 -0
- data/docs/SubAccountInfo.md +34 -0
- data/docs/SubAccountsApi.md +445 -0
- data/docs/SubaccountEmailCreditsPayload.md +20 -0
- data/docs/SubaccountEmailSettings.md +30 -0
- data/docs/SubaccountEmailSettingsPayload.md +28 -0
- data/docs/SubaccountPayload.md +24 -0
- data/docs/SubaccountSettingsInfo.md +18 -0
- data/docs/SubaccountSettingsInfoPayload.md +18 -0
- data/docs/Suppression.md +24 -0
- data/docs/SuppressionsApi.md +895 -0
- data/docs/Template.md +28 -0
- data/docs/TemplatePayload.md +24 -0
- data/docs/TemplateScopeType.md +15 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplatesApi.md +376 -0
- data/docs/TransactionalRecipient.md +22 -0
- data/docs/Utm.md +24 -0
- data/docs/VerificationFileResult.md +28 -0
- data/docs/VerificationFileResultDetails.md +30 -0
- data/docs/VerificationStatus.md +15 -0
- data/docs/VerificationsApi.md +662 -0
- data/lib/ElasticEmail.rb +137 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +348 -0
- data/lib/ElasticEmail/api/contacts_api.rb +681 -0
- data/lib/ElasticEmail/api/emails_api.rb +280 -0
- data/lib/ElasticEmail/api/events_api.rb +538 -0
- data/lib/ElasticEmail/api/files_api.rb +340 -0
- data/lib/ElasticEmail/api/inbound_route_api.rb +404 -0
- data/lib/ElasticEmail/api/lists_api.rb +485 -0
- data/lib/ElasticEmail/api/security_api.rb +674 -0
- data/lib/ElasticEmail/api/segments_api.rb +345 -0
- data/lib/ElasticEmail/api/statistics_api.rb +341 -0
- data/lib/ElasticEmail/api/sub_accounts_api.rb +414 -0
- data/lib/ElasticEmail/api/suppressions_api.rb +782 -0
- data/lib/ElasticEmail/api/templates_api.rb +355 -0
- data/lib/ElasticEmail/api/verifications_api.rb +584 -0
- data/lib/ElasticEmail/api_client.rb +390 -0
- data/lib/ElasticEmail/api_error.rb +57 -0
- data/lib/ElasticEmail/configuration.rb +277 -0
- data/lib/ElasticEmail/models/access_level.rb +79 -0
- data/lib/ElasticEmail/models/account_status_enum.rb +40 -0
- data/lib/ElasticEmail/models/api_key.rb +276 -0
- data/lib/ElasticEmail/models/api_key_payload.rb +265 -0
- data/lib/ElasticEmail/models/body_content_type.rb +39 -0
- data/lib/ElasticEmail/models/body_part.rb +240 -0
- data/lib/ElasticEmail/models/campaign.rb +261 -0
- data/lib/ElasticEmail/models/campaign_options.rb +263 -0
- data/lib/ElasticEmail/models/campaign_recipient.rb +234 -0
- data/lib/ElasticEmail/models/campaign_status.rb +43 -0
- data/lib/ElasticEmail/models/campaign_template.rb +282 -0
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +350 -0
- data/lib/ElasticEmail/models/compression_format.rb +37 -0
- data/lib/ElasticEmail/models/consent_data.rb +240 -0
- data/lib/ElasticEmail/models/consent_tracking.rb +38 -0
- data/lib/ElasticEmail/models/contact.rb +323 -0
- data/lib/ElasticEmail/models/contact_activity.rb +324 -0
- data/lib/ElasticEmail/models/contact_hist_event_type.rb +49 -0
- data/lib/ElasticEmail/models/contact_history.rb +279 -0
- data/lib/ElasticEmail/models/contact_payload.rb +270 -0
- data/lib/ElasticEmail/models/contact_source.rb +42 -0
- data/lib/ElasticEmail/models/contact_status.rb +44 -0
- data/lib/ElasticEmail/models/contact_update_payload.rb +241 -0
- data/lib/ElasticEmail/models/contacts_list.rb +251 -0
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +38 -0
- data/lib/ElasticEmail/models/email_content.rb +330 -0
- data/lib/ElasticEmail/models/email_data.rb +241 -0
- data/lib/ElasticEmail/models/email_message_data.rb +242 -0
- data/lib/ElasticEmail/models/email_recipient.rb +232 -0
- data/lib/ElasticEmail/models/email_send.rb +229 -0
- data/lib/ElasticEmail/models/email_status.rb +332 -0
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +240 -0
- data/lib/ElasticEmail/models/email_validation_result.rb +300 -0
- data/lib/ElasticEmail/models/email_validation_status.rb +40 -0
- data/lib/ElasticEmail/models/email_view.rb +240 -0
- data/lib/ElasticEmail/models/emails_payload.rb +232 -0
- data/lib/ElasticEmail/models/encoding_type.rb +42 -0
- data/lib/ElasticEmail/models/event_type.rb +43 -0
- data/lib/ElasticEmail/models/events_order_by.rb +37 -0
- data/lib/ElasticEmail/models/export_file_formats.rb +38 -0
- data/lib/ElasticEmail/models/export_link.rb +229 -0
- data/lib/ElasticEmail/models/export_status.rb +39 -0
- data/lib/ElasticEmail/models/file_info.rb +262 -0
- data/lib/ElasticEmail/models/file_payload.rb +239 -0
- data/lib/ElasticEmail/models/file_upload_result.rb +229 -0
- data/lib/ElasticEmail/models/inbound_payload.rb +269 -0
- data/lib/ElasticEmail/models/inbound_route.rb +278 -0
- data/lib/ElasticEmail/models/inbound_route_action_type.rb +38 -0
- data/lib/ElasticEmail/models/inbound_route_filter_type.rb +37 -0
- data/lib/ElasticEmail/models/list_payload.rb +241 -0
- data/lib/ElasticEmail/models/list_update_payload.rb +229 -0
- data/lib/ElasticEmail/models/log_job_status.rb +45 -0
- data/lib/ElasticEmail/models/log_status_summary.rb +340 -0
- data/lib/ElasticEmail/models/merge_email_payload.rb +239 -0
- data/lib/ElasticEmail/models/message_attachment.rb +237 -0
- data/lib/ElasticEmail/models/message_category.rb +52 -0
- data/lib/ElasticEmail/models/new_api_key.rb +286 -0
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +284 -0
- data/lib/ElasticEmail/models/options.rb +271 -0
- data/lib/ElasticEmail/models/recipient_event.rb +341 -0
- data/lib/ElasticEmail/models/segment.rb +230 -0
- data/lib/ElasticEmail/models/segment_payload.rb +229 -0
- data/lib/ElasticEmail/models/smtp_credentials.rb +274 -0
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +253 -0
- data/lib/ElasticEmail/models/sort_order_item.rb +229 -0
- data/lib/ElasticEmail/models/split_optimization_type.rb +37 -0
- data/lib/ElasticEmail/models/split_options.rb +230 -0
- data/lib/ElasticEmail/models/sub_account_info.rb +300 -0
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +230 -0
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +280 -0
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +270 -0
- data/lib/ElasticEmail/models/subaccount_payload.rb +250 -0
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +220 -0
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +220 -0
- data/lib/ElasticEmail/models/suppression.rb +252 -0
- data/lib/ElasticEmail/models/template.rb +272 -0
- data/lib/ElasticEmail/models/template_payload.rb +252 -0
- data/lib/ElasticEmail/models/template_scope_type.rb +38 -0
- data/lib/ElasticEmail/models/template_type.rb +38 -0
- data/lib/ElasticEmail/models/transactional_recipient.rb +246 -0
- data/lib/ElasticEmail/models/utm.rb +250 -0
- data/lib/ElasticEmail/models/verification_file_result.rb +270 -0
- data/lib/ElasticEmail/models/verification_file_result_details.rb +282 -0
- data/lib/ElasticEmail/models/verification_status.rb +40 -0
- data/lib/ElasticEmail/version.rb +15 -0
- data/spec/api/campaigns_api_spec.rb +98 -0
- data/spec/api/contacts_api_spec.rb +166 -0
- data/spec/api/emails_api_spec.rb +83 -0
- data/spec/api/events_api_spec.rb +146 -0
- data/spec/api/files_api_spec.rb +97 -0
- data/spec/api/inbound_route_api_spec.rb +107 -0
- data/spec/api/lists_api_spec.rb +123 -0
- data/spec/api/security_api_spec.rb +161 -0
- data/spec/api/segments_api_spec.rb +97 -0
- data/spec/api/statistics_api_spec.rb +98 -0
- data/spec/api/sub_accounts_api_spec.rb +110 -0
- data/spec/api/suppressions_api_spec.rb +186 -0
- data/spec/api/templates_api_spec.rb +99 -0
- data/spec/api/verifications_api_spec.rb +145 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_level_spec.rb +28 -0
- data/spec/models/account_status_enum_spec.rb +28 -0
- data/spec/models/api_key_payload_spec.rb +58 -0
- data/spec/models/api_key_spec.rb +64 -0
- data/spec/models/body_content_type_spec.rb +28 -0
- data/spec/models/body_part_spec.rb +46 -0
- data/spec/models/campaign_options_spec.rb +58 -0
- data/spec/models/campaign_recipient_spec.rb +40 -0
- data/spec/models/campaign_spec.rb +58 -0
- data/spec/models/campaign_status_spec.rb +28 -0
- data/spec/models/campaign_template_spec.rb +70 -0
- data/spec/models/channel_log_status_summary_spec.rb +112 -0
- data/spec/models/compression_format_spec.rb +28 -0
- data/spec/models/consent_data_spec.rb +46 -0
- data/spec/models/consent_tracking_spec.rb +28 -0
- data/spec/models/contact_activity_spec.rb +94 -0
- data/spec/models/contact_hist_event_type_spec.rb +28 -0
- data/spec/models/contact_history_spec.rb +70 -0
- data/spec/models/contact_payload_spec.rb +64 -0
- data/spec/models/contact_source_spec.rb +28 -0
- data/spec/models/contact_spec.rb +94 -0
- data/spec/models/contact_status_spec.rb +28 -0
- data/spec/models/contact_update_payload_spec.rb +46 -0
- data/spec/models/contacts_list_spec.rb +52 -0
- data/spec/models/delivery_optimization_type_spec.rb +28 -0
- data/spec/models/email_content_spec.rb +94 -0
- data/spec/models/email_data_spec.rb +46 -0
- data/spec/models/email_message_data_spec.rb +46 -0
- data/spec/models/email_recipient_spec.rb +40 -0
- data/spec/models/email_send_spec.rb +40 -0
- data/spec/models/email_status_spec.rb +100 -0
- data/spec/models/email_transactional_message_data_spec.rb +46 -0
- data/spec/models/email_validation_result_spec.rb +82 -0
- data/spec/models/email_validation_status_spec.rb +28 -0
- data/spec/models/email_view_spec.rb +46 -0
- data/spec/models/emails_payload_spec.rb +40 -0
- data/spec/models/encoding_type_spec.rb +28 -0
- data/spec/models/event_type_spec.rb +28 -0
- data/spec/models/events_order_by_spec.rb +28 -0
- data/spec/models/export_file_formats_spec.rb +28 -0
- data/spec/models/export_link_spec.rb +40 -0
- data/spec/models/export_status_spec.rb +28 -0
- data/spec/models/file_info_spec.rb +58 -0
- data/spec/models/file_payload_spec.rb +46 -0
- data/spec/models/file_upload_result_spec.rb +40 -0
- data/spec/models/inbound_payload_spec.rb +64 -0
- data/spec/models/inbound_route_action_type_spec.rb +28 -0
- data/spec/models/inbound_route_filter_type_spec.rb +28 -0
- data/spec/models/inbound_route_spec.rb +70 -0
- data/spec/models/list_payload_spec.rb +46 -0
- data/spec/models/list_update_payload_spec.rb +40 -0
- data/spec/models/log_job_status_spec.rb +28 -0
- data/spec/models/log_status_summary_spec.rb +106 -0
- data/spec/models/merge_email_payload_spec.rb +46 -0
- data/spec/models/message_attachment_spec.rb +46 -0
- data/spec/models/message_category_spec.rb +28 -0
- data/spec/models/new_api_key_spec.rb +70 -0
- data/spec/models/new_smtp_credentials_spec.rb +70 -0
- data/spec/models/options_spec.rb +64 -0
- data/spec/models/recipient_event_spec.rb +106 -0
- data/spec/models/segment_payload_spec.rb +40 -0
- data/spec/models/segment_spec.rb +40 -0
- data/spec/models/smtp_credentials_payload_spec.rb +52 -0
- data/spec/models/smtp_credentials_spec.rb +64 -0
- data/spec/models/sort_order_item_spec.rb +40 -0
- data/spec/models/split_optimization_type_spec.rb +28 -0
- data/spec/models/split_options_spec.rb +40 -0
- data/spec/models/sub_account_info_spec.rb +82 -0
- data/spec/models/subaccount_email_credits_payload_spec.rb +40 -0
- data/spec/models/subaccount_email_settings_payload_spec.rb +64 -0
- data/spec/models/subaccount_email_settings_spec.rb +70 -0
- data/spec/models/subaccount_payload_spec.rb +52 -0
- data/spec/models/subaccount_settings_info_payload_spec.rb +34 -0
- data/spec/models/subaccount_settings_info_spec.rb +34 -0
- data/spec/models/suppression_spec.rb +52 -0
- data/spec/models/template_payload_spec.rb +52 -0
- data/spec/models/template_scope_type_spec.rb +28 -0
- data/spec/models/template_spec.rb +64 -0
- data/spec/models/template_type_spec.rb +28 -0
- data/spec/models/transactional_recipient_spec.rb +46 -0
- data/spec/models/utm_spec.rb +52 -0
- data/spec/models/verification_file_result_details_spec.rb +70 -0
- data/spec/models/verification_file_result_spec.rb +64 -0
- data/spec/models/verification_status_spec.rb +28 -0
- data/spec/spec_helper.rb +111 -0
- metadata +498 -0
@@ -0,0 +1,345 @@
|
|
1
|
+
=begin
|
2
|
+
#Elastic Email REST API
|
3
|
+
|
4
|
+
#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
7
|
+
Contact: support@elasticemail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ElasticEmail
|
16
|
+
class SegmentsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete Segment
|
23
|
+
# Delete an existing segment. Required Access Level: ModifyContacts
|
24
|
+
# @param name [String] Name of your segment.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def segments_by_name_delete(name, opts = {})
|
28
|
+
segments_by_name_delete_with_http_info(name, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete Segment
|
33
|
+
# Delete an existing segment. Required Access Level: ModifyContacts
|
34
|
+
# @param name [String] Name of your segment.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def segments_by_name_delete_with_http_info(name, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: SegmentsApi.segments_by_name_delete ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'name' is set
|
42
|
+
if @api_client.config.client_side_validation && name.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SegmentsApi.segments_by_name_delete"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/segments/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type]
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"SegmentsApi.segments_by_name_delete",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: SegmentsApi#segments_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Load Segment
|
84
|
+
# Returns details for the specified segment. Required Access Level: ViewContacts
|
85
|
+
# @param name [String] Name of the segment you want to load. Will load all contacts if the 'All Contacts' name has been provided
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [Segment]
|
88
|
+
def segments_by_name_get(name, opts = {})
|
89
|
+
data, _status_code, _headers = segments_by_name_get_with_http_info(name, opts)
|
90
|
+
data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Load Segment
|
94
|
+
# Returns details for the specified segment. Required Access Level: ViewContacts
|
95
|
+
# @param name [String] Name of the segment you want to load. Will load all contacts if the 'All Contacts' name has been provided
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Array<(Segment, Integer, Hash)>] Segment data, response status code and response headers
|
98
|
+
def segments_by_name_get_with_http_info(name, opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug 'Calling API: SegmentsApi.segments_by_name_get ...'
|
101
|
+
end
|
102
|
+
# verify the required parameter 'name' is set
|
103
|
+
if @api_client.config.client_side_validation && name.nil?
|
104
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SegmentsApi.segments_by_name_get"
|
105
|
+
end
|
106
|
+
# resource path
|
107
|
+
local_var_path = '/segments/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
108
|
+
|
109
|
+
# query parameters
|
110
|
+
query_params = opts[:query_params] || {}
|
111
|
+
|
112
|
+
# header parameters
|
113
|
+
header_params = opts[:header_params] || {}
|
114
|
+
# HTTP header 'Accept' (if needed)
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = opts[:form_params] || {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = opts[:debug_body]
|
122
|
+
|
123
|
+
# return_type
|
124
|
+
return_type = opts[:debug_return_type] || 'Segment'
|
125
|
+
|
126
|
+
# auth_names
|
127
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
128
|
+
|
129
|
+
new_options = opts.merge(
|
130
|
+
:operation => :"SegmentsApi.segments_by_name_get",
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: SegmentsApi#segments_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Update Segment
|
147
|
+
# Rename or change RULE for your segment. Required Access Level: ModifyContacts
|
148
|
+
# @param name [String] Name of your segment.
|
149
|
+
# @param segment_payload [SegmentPayload]
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @return [Segment]
|
152
|
+
def segments_by_name_put(name, segment_payload, opts = {})
|
153
|
+
data, _status_code, _headers = segments_by_name_put_with_http_info(name, segment_payload, opts)
|
154
|
+
data
|
155
|
+
end
|
156
|
+
|
157
|
+
# Update Segment
|
158
|
+
# Rename or change RULE for your segment. Required Access Level: ModifyContacts
|
159
|
+
# @param name [String] Name of your segment.
|
160
|
+
# @param segment_payload [SegmentPayload]
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(Segment, Integer, Hash)>] Segment data, response status code and response headers
|
163
|
+
def segments_by_name_put_with_http_info(name, segment_payload, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: SegmentsApi.segments_by_name_put ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'name' is set
|
168
|
+
if @api_client.config.client_side_validation && name.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SegmentsApi.segments_by_name_put"
|
170
|
+
end
|
171
|
+
# verify the required parameter 'segment_payload' is set
|
172
|
+
if @api_client.config.client_side_validation && segment_payload.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'segment_payload' when calling SegmentsApi.segments_by_name_put"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/segments/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(segment_payload)
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'Segment'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :"SegmentsApi.segments_by_name_put",
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: SegmentsApi#segments_by_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Load Segments
|
218
|
+
# Returns a list of all your available Segments. Required Access Level: ViewContacts
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
221
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
222
|
+
# @return [Array<Segment>]
|
223
|
+
def segments_get(opts = {})
|
224
|
+
data, _status_code, _headers = segments_get_with_http_info(opts)
|
225
|
+
data
|
226
|
+
end
|
227
|
+
|
228
|
+
# Load Segments
|
229
|
+
# Returns a list of all your available Segments. Required Access Level: ViewContacts
|
230
|
+
# @param [Hash] opts the optional parameters
|
231
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
232
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
233
|
+
# @return [Array<(Array<Segment>, Integer, Hash)>] Array<Segment> data, response status code and response headers
|
234
|
+
def segments_get_with_http_info(opts = {})
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: SegmentsApi.segments_get ...'
|
237
|
+
end
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/segments'
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = opts[:query_params] || {}
|
243
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
244
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
245
|
+
|
246
|
+
# header parameters
|
247
|
+
header_params = opts[:header_params] || {}
|
248
|
+
# HTTP header 'Accept' (if needed)
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
|
251
|
+
# form parameters
|
252
|
+
form_params = opts[:form_params] || {}
|
253
|
+
|
254
|
+
# http body (model)
|
255
|
+
post_body = opts[:debug_body]
|
256
|
+
|
257
|
+
# return_type
|
258
|
+
return_type = opts[:debug_return_type] || 'Array<Segment>'
|
259
|
+
|
260
|
+
# auth_names
|
261
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
262
|
+
|
263
|
+
new_options = opts.merge(
|
264
|
+
:operation => :"SegmentsApi.segments_get",
|
265
|
+
:header_params => header_params,
|
266
|
+
:query_params => query_params,
|
267
|
+
:form_params => form_params,
|
268
|
+
:body => post_body,
|
269
|
+
:auth_names => auth_names,
|
270
|
+
:return_type => return_type
|
271
|
+
)
|
272
|
+
|
273
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: SegmentsApi#segments_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
|
280
|
+
# Add Segment
|
281
|
+
# Add a new segment, based on specified RULE. Required Access Level: ModifyContacts
|
282
|
+
# @param segment_payload [SegmentPayload]
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @return [Segment]
|
285
|
+
def segments_post(segment_payload, opts = {})
|
286
|
+
data, _status_code, _headers = segments_post_with_http_info(segment_payload, opts)
|
287
|
+
data
|
288
|
+
end
|
289
|
+
|
290
|
+
# Add Segment
|
291
|
+
# Add a new segment, based on specified RULE. Required Access Level: ModifyContacts
|
292
|
+
# @param segment_payload [SegmentPayload]
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @return [Array<(Segment, Integer, Hash)>] Segment data, response status code and response headers
|
295
|
+
def segments_post_with_http_info(segment_payload, opts = {})
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug 'Calling API: SegmentsApi.segments_post ...'
|
298
|
+
end
|
299
|
+
# verify the required parameter 'segment_payload' is set
|
300
|
+
if @api_client.config.client_side_validation && segment_payload.nil?
|
301
|
+
fail ArgumentError, "Missing the required parameter 'segment_payload' when calling SegmentsApi.segments_post"
|
302
|
+
end
|
303
|
+
# resource path
|
304
|
+
local_var_path = '/segments'
|
305
|
+
|
306
|
+
# query parameters
|
307
|
+
query_params = opts[:query_params] || {}
|
308
|
+
|
309
|
+
# header parameters
|
310
|
+
header_params = opts[:header_params] || {}
|
311
|
+
# HTTP header 'Accept' (if needed)
|
312
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
313
|
+
# HTTP header 'Content-Type'
|
314
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
315
|
+
|
316
|
+
# form parameters
|
317
|
+
form_params = opts[:form_params] || {}
|
318
|
+
|
319
|
+
# http body (model)
|
320
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(segment_payload)
|
321
|
+
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type] || 'Segment'
|
324
|
+
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
327
|
+
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"SegmentsApi.segments_post",
|
330
|
+
:header_params => header_params,
|
331
|
+
:query_params => query_params,
|
332
|
+
:form_params => form_params,
|
333
|
+
:body => post_body,
|
334
|
+
:auth_names => auth_names,
|
335
|
+
:return_type => return_type
|
336
|
+
)
|
337
|
+
|
338
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug "API called: SegmentsApi#segments_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
|
+
end
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
@@ -0,0 +1,341 @@
|
|
1
|
+
=begin
|
2
|
+
#Elastic Email REST API
|
3
|
+
|
4
|
+
#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
7
|
+
Contact: support@elasticemail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ElasticEmail
|
16
|
+
class StatisticsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Load Campaign Stats
|
23
|
+
# Retrieve stats of an existing campaign. Required Access Level: ViewChannels
|
24
|
+
# @param name [String] The name of the campaign to get.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ChannelLogStatusSummary]
|
27
|
+
def statistics_campaigns_by_name_get(name, opts = {})
|
28
|
+
data, _status_code, _headers = statistics_campaigns_by_name_get_with_http_info(name, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Load Campaign Stats
|
33
|
+
# Retrieve stats of an existing campaign. Required Access Level: ViewChannels
|
34
|
+
# @param name [String] The name of the campaign to get.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ChannelLogStatusSummary, Integer, Hash)>] ChannelLogStatusSummary data, response status code and response headers
|
37
|
+
def statistics_campaigns_by_name_get_with_http_info(name, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_campaigns_by_name_get ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'name' is set
|
42
|
+
if @api_client.config.client_side_validation && name.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling StatisticsApi.statistics_campaigns_by_name_get"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/statistics/campaigns/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'ChannelLogStatusSummary'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"StatisticsApi.statistics_campaigns_by_name_get",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_campaigns_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Load Campaigns Stats
|
86
|
+
# Returns a list of your Campaigns' stats. Required Access Level: ViewChannels
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
89
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
90
|
+
# @return [Array<ChannelLogStatusSummary>]
|
91
|
+
def statistics_campaigns_get(opts = {})
|
92
|
+
data, _status_code, _headers = statistics_campaigns_get_with_http_info(opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Load Campaigns Stats
|
97
|
+
# Returns a list of your Campaigns' stats. Required Access Level: ViewChannels
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
100
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
101
|
+
# @return [Array<(Array<ChannelLogStatusSummary>, Integer, Hash)>] Array<ChannelLogStatusSummary> data, response status code and response headers
|
102
|
+
def statistics_campaigns_get_with_http_info(opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_campaigns_get ...'
|
105
|
+
end
|
106
|
+
# resource path
|
107
|
+
local_var_path = '/statistics/campaigns'
|
108
|
+
|
109
|
+
# query parameters
|
110
|
+
query_params = opts[:query_params] || {}
|
111
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
112
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
+
|
119
|
+
# form parameters
|
120
|
+
form_params = opts[:form_params] || {}
|
121
|
+
|
122
|
+
# http body (model)
|
123
|
+
post_body = opts[:debug_body]
|
124
|
+
|
125
|
+
# return_type
|
126
|
+
return_type = opts[:debug_return_type] || 'Array<ChannelLogStatusSummary>'
|
127
|
+
|
128
|
+
# auth_names
|
129
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
130
|
+
|
131
|
+
new_options = opts.merge(
|
132
|
+
:operation => :"StatisticsApi.statistics_campaigns_get",
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_campaigns_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Load Channel Stats
|
149
|
+
# Retrieve an existing channel stats. Required Access Level: ViewChannels
|
150
|
+
# @param name [String] The name of the channel to get.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [ChannelLogStatusSummary]
|
153
|
+
def statistics_channels_by_name_get(name, opts = {})
|
154
|
+
data, _status_code, _headers = statistics_channels_by_name_get_with_http_info(name, opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# Load Channel Stats
|
159
|
+
# Retrieve an existing channel stats. Required Access Level: ViewChannels
|
160
|
+
# @param name [String] The name of the channel to get.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(ChannelLogStatusSummary, Integer, Hash)>] ChannelLogStatusSummary data, response status code and response headers
|
163
|
+
def statistics_channels_by_name_get_with_http_info(name, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_channels_by_name_get ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'name' is set
|
168
|
+
if @api_client.config.client_side_validation && name.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling StatisticsApi.statistics_channels_by_name_get"
|
170
|
+
end
|
171
|
+
# resource path
|
172
|
+
local_var_path = '/statistics/channels/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = opts[:query_params] || {}
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:debug_body]
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:debug_return_type] || 'ChannelLogStatusSummary'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:operation => :"StatisticsApi.statistics_channels_by_name_get",
|
196
|
+
:header_params => header_params,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body,
|
200
|
+
:auth_names => auth_names,
|
201
|
+
:return_type => return_type
|
202
|
+
)
|
203
|
+
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_channels_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
|
211
|
+
# Load Channels Stats
|
212
|
+
# Returns a list of your Channels' stats. Required Access Level: ViewChannels
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
215
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
216
|
+
# @return [Array<ChannelLogStatusSummary>]
|
217
|
+
def statistics_channels_get(opts = {})
|
218
|
+
data, _status_code, _headers = statistics_channels_get_with_http_info(opts)
|
219
|
+
data
|
220
|
+
end
|
221
|
+
|
222
|
+
# Load Channels Stats
|
223
|
+
# Returns a list of your Channels' stats. Required Access Level: ViewChannels
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
226
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
227
|
+
# @return [Array<(Array<ChannelLogStatusSummary>, Integer, Hash)>] Array<ChannelLogStatusSummary> data, response status code and response headers
|
228
|
+
def statistics_channels_get_with_http_info(opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_channels_get ...'
|
231
|
+
end
|
232
|
+
# resource path
|
233
|
+
local_var_path = '/statistics/channels'
|
234
|
+
|
235
|
+
# query parameters
|
236
|
+
query_params = opts[:query_params] || {}
|
237
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
238
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
239
|
+
|
240
|
+
# header parameters
|
241
|
+
header_params = opts[:header_params] || {}
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
244
|
+
|
245
|
+
# form parameters
|
246
|
+
form_params = opts[:form_params] || {}
|
247
|
+
|
248
|
+
# http body (model)
|
249
|
+
post_body = opts[:debug_body]
|
250
|
+
|
251
|
+
# return_type
|
252
|
+
return_type = opts[:debug_return_type] || 'Array<ChannelLogStatusSummary>'
|
253
|
+
|
254
|
+
# auth_names
|
255
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
256
|
+
|
257
|
+
new_options = opts.merge(
|
258
|
+
:operation => :"StatisticsApi.statistics_channels_get",
|
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 => return_type
|
265
|
+
)
|
266
|
+
|
267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_channels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
270
|
+
end
|
271
|
+
return data, status_code, headers
|
272
|
+
end
|
273
|
+
|
274
|
+
# Load Statistics
|
275
|
+
# Returns basic statistics. Required Access Level: ViewReports
|
276
|
+
# @param from [Time] Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
277
|
+
# @param [Hash] opts the optional parameters
|
278
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
279
|
+
# @return [LogStatusSummary]
|
280
|
+
def statistics_get(from, opts = {})
|
281
|
+
data, _status_code, _headers = statistics_get_with_http_info(from, opts)
|
282
|
+
data
|
283
|
+
end
|
284
|
+
|
285
|
+
# Load Statistics
|
286
|
+
# Returns basic statistics. Required Access Level: ViewReports
|
287
|
+
# @param from [Time] Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
288
|
+
# @param [Hash] opts the optional parameters
|
289
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
290
|
+
# @return [Array<(LogStatusSummary, Integer, Hash)>] LogStatusSummary data, response status code and response headers
|
291
|
+
def statistics_get_with_http_info(from, opts = {})
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_get ...'
|
294
|
+
end
|
295
|
+
# verify the required parameter 'from' is set
|
296
|
+
if @api_client.config.client_side_validation && from.nil?
|
297
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling StatisticsApi.statistics_get"
|
298
|
+
end
|
299
|
+
# resource path
|
300
|
+
local_var_path = '/statistics'
|
301
|
+
|
302
|
+
# query parameters
|
303
|
+
query_params = opts[:query_params] || {}
|
304
|
+
query_params[:'from'] = from
|
305
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
306
|
+
|
307
|
+
# header parameters
|
308
|
+
header_params = opts[:header_params] || {}
|
309
|
+
# HTTP header 'Accept' (if needed)
|
310
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
311
|
+
|
312
|
+
# form parameters
|
313
|
+
form_params = opts[:form_params] || {}
|
314
|
+
|
315
|
+
# http body (model)
|
316
|
+
post_body = opts[:debug_body]
|
317
|
+
|
318
|
+
# return_type
|
319
|
+
return_type = opts[:debug_return_type] || 'LogStatusSummary'
|
320
|
+
|
321
|
+
# auth_names
|
322
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
323
|
+
|
324
|
+
new_options = opts.merge(
|
325
|
+
:operation => :"StatisticsApi.statistics_get",
|
326
|
+
:header_params => header_params,
|
327
|
+
:query_params => query_params,
|
328
|
+
:form_params => form_params,
|
329
|
+
:body => post_body,
|
330
|
+
:auth_names => auth_names,
|
331
|
+
:return_type => return_type
|
332
|
+
)
|
333
|
+
|
334
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
335
|
+
if @api_client.config.debugging
|
336
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
337
|
+
end
|
338
|
+
return data, status_code, headers
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|