Class: GroupDocsMergerCloud::PagesApi
- Inherits:
-
Object
- Object
- GroupDocsMergerCloud::PagesApi
- Defined in:
- lib/groupdocs_merger_cloud/api/pages_api.rb
Overview
GroupDocs.Merger Cloud API
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
-
.from_config(config) ⇒ PagesApi
Initializes new instance of PagesApi.
-
.from_keys(app_sid, app_key) ⇒ PagesApi
Initializes new instance of PagesApi.
Instance Method Summary collapse
-
#extract(request) ⇒ DocumentResult
Make new document with some pages from source document.
-
#extract_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Make new document with some pages from source document.
-
#initialize(config) ⇒ PagesApi
constructor
Initializes new instance of PagesApi.
-
#move(request) ⇒ DocumentResult
Move page to a new position within document.
-
#move_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Move page to a new position within document.
-
#orientation(request) ⇒ DocumentResult
Make new document and apply new orientation mode for specified pages.
-
#orientation_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Make new document and apply new orientation mode for specified pages.
-
#remove(request) ⇒ DocumentResult
Remove pages from document.
-
#remove_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Remove pages from document.
-
#rotate(request) ⇒ DocumentResult
Rotate pages in document.
-
#rotate_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Rotate pages in document.
-
#swap(request) ⇒ DocumentResult
Swap two pages within document.
-
#swap_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Swap two pages within document.
Constructor Details
#initialize(config) ⇒ PagesApi
Initializes new instance of PagesApi
43 44 45 46 47 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 43 def initialize(config) @config = config @api_client = ApiClient.new(config) @access_token = nil end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
34 35 36 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 34 def config @config end |
Class Method Details
.from_config(config) ⇒ PagesApi
Initializes new instance of PagesApi
63 64 65 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 63 def self.from_config(config) return new(config) end |
.from_keys(app_sid, app_key) ⇒ PagesApi
Initializes new instance of PagesApi
54 55 56 57 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 54 def self.from_keys(app_sid, app_key) config = Configuration.new(app_sid, app_key) return new(config) end |
Instance Method Details
#extract(request) ⇒ DocumentResult
Make new document with some pages from source document
71 72 73 74 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 71 def extract(request) data, _status_code, _headers = extract_with_http_info(request) data end |
#extract_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Make new document with some pages from source document
DocumentResult data, response status code and response headers
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 81 def extract_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? ExtractRequest @api_client.config.logger.debug 'Calling API: PagesApi.extract ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.extract' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/extract' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#move(request) ⇒ DocumentResult
Move page to a new position within document
123 124 125 126 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 123 def move(request) data, _status_code, _headers = move_with_http_info(request) data end |
#move_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Move page to a new position within document
DocumentResult data, response status code and response headers
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 133 def move_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? MoveRequest @api_client.config.logger.debug 'Calling API: PagesApi.move ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.move' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/move' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#move\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#orientation(request) ⇒ DocumentResult
Make new document and apply new orientation mode for specified pages
175 176 177 178 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 175 def orientation(request) data, _status_code, _headers = orientation_with_http_info(request) data end |
#orientation_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Make new document and apply new orientation mode for specified pages
DocumentResult data, response status code and response headers
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 185 def orientation_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? OrientationRequest @api_client.config.logger.debug 'Calling API: PagesApi.orientation ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.orientation' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/orientation' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#orientation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#remove(request) ⇒ DocumentResult
Remove pages from document
227 228 229 230 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 227 def remove(request) data, _status_code, _headers = remove_with_http_info(request) data end |
#remove_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Remove pages from document
DocumentResult data, response status code and response headers
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 237 def remove_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? RemoveRequest @api_client.config.logger.debug 'Calling API: PagesApi.remove ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.remove' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/remove' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#rotate(request) ⇒ DocumentResult
Rotate pages in document
279 280 281 282 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 279 def rotate(request) data, _status_code, _headers = rotate_with_http_info(request) data end |
#rotate_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Rotate pages in document
DocumentResult data, response status code and response headers
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 289 def rotate_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? RotateRequest @api_client.config.logger.debug 'Calling API: PagesApi.rotate ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.rotate' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/rotate' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#swap(request) ⇒ DocumentResult
Swap two pages within document
331 332 333 334 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 331 def swap(request) data, _status_code, _headers = swap_with_http_info(request) data end |
#swap_with_http_info(request) ⇒ Array<(DocumentResult, Fixnum, Hash)>
Swap two pages within document
DocumentResult data, response status code and response headers
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/groupdocs_merger_cloud/api/pages_api.rb', line 341 def swap_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? SwapRequest @api_client.config.logger.debug 'Calling API: PagesApi.swap ...' if @api_client.config.debugging # verify the required parameter 'options' is set raise ArgumentError, 'Missing the required parameter options when calling PagesApi.swap' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/merger/pages/swap' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'DocumentResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: PagesApi#swap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |