Class: AsposeEmailCloud::CalendarApi
- Inherits:
-
Object
- Object
- AsposeEmailCloud::CalendarApi
- Defined in:
- lib/aspose-email-cloud/api/calendar_api.rb
Overview
CalendarApi operations.
Instance Attribute Summary collapse
-
#api_invoker ⇒ Object
readonly
Returns the value of attribute api_invoker.
Instance Method Summary collapse
-
#as_alternate(request) ⇒ AlternateView
Convert iCalendar to AlternateView.
-
#as_file(request) ⇒ File
Converts calendar model to specified format and returns as file.
-
#as_mapi(calendar_dto) ⇒ MapiCalendarDto
Converts CalendarDto to MapiCalendarDto.
-
#convert(request) ⇒ File
Converts calendar document to specified format and returns as file.
-
#from_file(request) ⇒ CalendarDto
Converts calendar document to a model representation.
-
#get(request) ⇒ CalendarDto
Get calendar file from storage.
-
#get_as_alternate(request) ⇒ AlternateView
Get iCalendar from storage as AlternateView.
-
#get_as_file(request) ⇒ File
Converts calendar document from storage to specified format and returns as file.
-
#get_list(request) ⇒ CalendarStorageList
Get iCalendar list from storage folder.
-
#initialize(api_invoker) ⇒ CalendarApi
constructor
Initializes a new instance of the CalendarApi class.
-
#save(request) ⇒ nil
Save iCalendar.
Constructor Details
#initialize(api_invoker) ⇒ CalendarApi
Initializes a new instance of the CalendarApi class.
45 46 47 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 45 def initialize(api_invoker) @api_invoker = api_invoker end |
Instance Attribute Details
#api_invoker ⇒ Object (readonly)
Returns the value of attribute api_invoker.
31 32 33 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 31 def api_invoker @api_invoker end |
Instance Method Details
#as_alternate(request) ⇒ AlternateView
Convert iCalendar to AlternateView
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 52 def as_alternate(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling CalendarApi.as_alternate" end local_var_path = '/email/Calendar/as-alternate' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'AlternateView') end |
#as_file(request) ⇒ File
Converts calendar model to specified format and returns as file.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 79 def as_file(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling CalendarApi.as_file" end local_var_path = '/email/Calendar/as-file' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'File') end |
#as_mapi(calendar_dto) ⇒ MapiCalendarDto
Converts CalendarDto to MapiCalendarDto.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 106 def as_mapi(calendar_dto) # verify the required parameter 'calendar_dto' is set if @api_invoker.api_client.config.client_side_validation && calendar_dto.nil? raise ArgumentError, "Missing the required parameter 'calendar_dto' when calling CalendarApi.as_mapi" end local_var_path = '/email/Calendar/as-mapi' post_body = @api_invoker.api_client.object_to_http_body(calendar_dto) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'MapiCalendarDto') end |
#convert(request) ⇒ File
Converts calendar document to specified format and returns as file.
133 134 135 136 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 133 def convert(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :PUT, 'File') end |
#from_file(request) ⇒ CalendarDto
Converts calendar document to a model representation.
141 142 143 144 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 141 def from_file(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :PUT, 'CalendarDto') end |
#get(request) ⇒ CalendarDto
Get calendar file from storage.
149 150 151 152 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 149 def get(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'CalendarDto') end |
#get_as_alternate(request) ⇒ AlternateView
Get iCalendar from storage as AlternateView
157 158 159 160 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 157 def get_as_alternate(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AlternateView') end |
#get_as_file(request) ⇒ File
Converts calendar document from storage to specified format and returns as file.
165 166 167 168 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 165 def get_as_file(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'File') end |
#get_list(request) ⇒ CalendarStorageList
Get iCalendar list from storage folder.
173 174 175 176 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 173 def get_list(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'CalendarStorageList') end |
#save(request) ⇒ nil
Save iCalendar
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/aspose-email-cloud/api/calendar_api.rb', line 181 def save(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling CalendarApi.save" end local_var_path = '/email/Calendar' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, nil) nil end |