cloudmersive-convert-api-client 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/DocxMetadataCustomProperty.md +13 -0
- data/docs/DocxSetCustomMetadataPropertiesRequest.md +10 -0
- data/docs/EditDocumentApi.md +110 -0
- data/docs/GetDocxMetadataPropertiesResponse.md +16 -0
- data/lib/cloudmersive-convert-api-client.rb +3 -0
- data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +109 -0
- data/lib/cloudmersive-convert-api-client/models/docx_metadata_custom_property.rb +236 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_custom_metadata_properties_request.rb +223 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_metadata_properties_response.rb +268 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/edit_document_api_spec.rb +24 -0
- data/spec/models/docx_metadata_custom_property_spec.rb +71 -0
- data/spec/models/docx_set_custom_metadata_properties_request_spec.rb +53 -0
- data/spec/models/get_docx_metadata_properties_response_spec.rb +89 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e039f137f65a46bf9bf724b775e5c7e44da26c3a54c9029c3a06ec5234401ad3
|
4
|
+
data.tar.gz: 23268f6b96ccfd0ad5e5cb337328fa05db3089196bca5e3389a23e2d34472b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e08309024dd891b418d7731f82e2a11b5a1b385699865fbc871007cdb5cee257b04d6f2ef4748458797c98728734fb67d529ae4a3d73ff2e392457f17183a84b
|
7
|
+
data.tar.gz: 283f31636fdeaa78c28b1b8df9226af6a33fb00269a2ea1c701f546ebfc9aeceb3cc7cc6032400b590ffde88caea01d92b67a6e1e29cdd8e6ae2beef4861539c
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 2.1.
|
10
|
+
- Package version: 2.1.3
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-convert-api-client-2.1.
|
26
|
+
gem install ./cloudmersive-convert-api-client-2.1.3.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.1.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.1.3.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-convert-api-client', '~> 2.1.
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 2.1.3'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -210,6 +210,7 @@ Class | Method | HTTP request | Description
|
|
210
210
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_comments_hierarchical**](docs/EditDocumentApi.md#edit_document_docx_get_comments_hierarchical) | **POST** /convert/edit/docx/get-comments/hierarchical | Get comments from a Word DOCX document hierarchically
|
211
211
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_headers_and_footers**](docs/EditDocumentApi.md#edit_document_docx_get_headers_and_footers) | **POST** /convert/edit/docx/get-headers-and-footers | Get content of a footer from a Word DOCX document
|
212
212
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_images**](docs/EditDocumentApi.md#edit_document_docx_get_images) | **POST** /convert/edit/docx/get-images | Get images from a Word DOCX document
|
213
|
+
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_metadata_properties**](docs/EditDocumentApi.md#edit_document_docx_get_metadata_properties) | **POST** /convert/edit/docx/get-metadata | Get all metadata properties in Word DOCX document
|
213
214
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_sections**](docs/EditDocumentApi.md#edit_document_docx_get_sections) | **POST** /convert/edit/docx/get-sections | Get sections from a Word DOCX document
|
214
215
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_styles**](docs/EditDocumentApi.md#edit_document_docx_get_styles) | **POST** /convert/edit/docx/get-styles | Get styles from a Word DOCX document
|
215
216
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_get_table_by_index**](docs/EditDocumentApi.md#edit_document_docx_get_table_by_index) | **POST** /convert/edit/docx/get-table/by-index | Get a specific table by index in a Word DOCX document
|
@@ -227,6 +228,7 @@ Class | Method | HTTP request | Description
|
|
227
228
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace**](docs/EditDocumentApi.md#edit_document_docx_replace) | **POST** /convert/edit/docx/replace-all | Replace string in Word DOCX document
|
228
229
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_multi**](docs/EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document
|
229
230
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_paragraph**](docs/EditDocumentApi.md#edit_document_docx_replace_paragraph) | **POST** /convert/edit/docx/replace/paragraph | Replace matching paragraphs in a Word DOCX document
|
231
|
+
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_custom_metadata_properties**](docs/EditDocumentApi.md#edit_document_docx_set_custom_metadata_properties) | **POST** /convert/edit/docx/set-metadata/custom-property | Set custom property metadata properties in Word DOCX document
|
230
232
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_footer**](docs/EditDocumentApi.md#edit_document_docx_set_footer) | **POST** /convert/edit/docx/set-footer | Set the footer in a Word DOCX document
|
231
233
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_footer_add_page_number**](docs/EditDocumentApi.md#edit_document_docx_set_footer_add_page_number) | **POST** /convert/edit/docx/set-footer/add-page-number | Add page number to footer in a Word DOCX document
|
232
234
|
*CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_header**](docs/EditDocumentApi.md#edit_document_docx_set_header) | **POST** /convert/edit/docx/set-header | Set the header in a Word DOCX document
|
@@ -393,12 +395,14 @@ Class | Method | HTTP request | Description
|
|
393
395
|
- [CloudmersiveConvertApiClient::DocxInsertCommentOnParagraphRequest](docs/DocxInsertCommentOnParagraphRequest.md)
|
394
396
|
- [CloudmersiveConvertApiClient::DocxInsertImageRequest](docs/DocxInsertImageRequest.md)
|
395
397
|
- [CloudmersiveConvertApiClient::DocxInsertImageResponse](docs/DocxInsertImageResponse.md)
|
398
|
+
- [CloudmersiveConvertApiClient::DocxMetadataCustomProperty](docs/DocxMetadataCustomProperty.md)
|
396
399
|
- [CloudmersiveConvertApiClient::DocxPage](docs/DocxPage.md)
|
397
400
|
- [CloudmersiveConvertApiClient::DocxParagraph](docs/DocxParagraph.md)
|
398
401
|
- [CloudmersiveConvertApiClient::DocxRemoveObjectRequest](docs/DocxRemoveObjectRequest.md)
|
399
402
|
- [CloudmersiveConvertApiClient::DocxRemoveObjectResponse](docs/DocxRemoveObjectResponse.md)
|
400
403
|
- [CloudmersiveConvertApiClient::DocxRun](docs/DocxRun.md)
|
401
404
|
- [CloudmersiveConvertApiClient::DocxSection](docs/DocxSection.md)
|
405
|
+
- [CloudmersiveConvertApiClient::DocxSetCustomMetadataPropertiesRequest](docs/DocxSetCustomMetadataPropertiesRequest.md)
|
402
406
|
- [CloudmersiveConvertApiClient::DocxSetFooterAddPageNumberRequest](docs/DocxSetFooterAddPageNumberRequest.md)
|
403
407
|
- [CloudmersiveConvertApiClient::DocxSetFooterRequest](docs/DocxSetFooterRequest.md)
|
404
408
|
- [CloudmersiveConvertApiClient::DocxSetFooterResponse](docs/DocxSetFooterResponse.md)
|
@@ -440,6 +444,7 @@ Class | Method | HTTP request | Description
|
|
440
444
|
- [CloudmersiveConvertApiClient::GetDocxHeadersAndFootersResponse](docs/GetDocxHeadersAndFootersResponse.md)
|
441
445
|
- [CloudmersiveConvertApiClient::GetDocxImagesRequest](docs/GetDocxImagesRequest.md)
|
442
446
|
- [CloudmersiveConvertApiClient::GetDocxImagesResponse](docs/GetDocxImagesResponse.md)
|
447
|
+
- [CloudmersiveConvertApiClient::GetDocxMetadataPropertiesResponse](docs/GetDocxMetadataPropertiesResponse.md)
|
443
448
|
- [CloudmersiveConvertApiClient::GetDocxPagesRequest](docs/GetDocxPagesRequest.md)
|
444
449
|
- [CloudmersiveConvertApiClient::GetDocxPagesResponse](docs/GetDocxPagesResponse.md)
|
445
450
|
- [CloudmersiveConvertApiClient::GetDocxSectionsRequest](docs/GetDocxSectionsRequest.md)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::DocxMetadataCustomProperty
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**property_name** | **String** | Name of the property | [optional]
|
7
|
+
**property_data_type** | **String** | Data type of the property; possible values are \"string\", \"integer\", \"double\" or \"date\" | [optional]
|
8
|
+
**string_value** | **String** | If the property is of a string data type, then provides the string value if available | [optional]
|
9
|
+
**integer_value** | **Integer** | If the property is of a integer data type, then provides the integer value if available | [optional]
|
10
|
+
**double_value** | **Float** | If the property is of a double floating point data type, then provides the double value if available | [optional]
|
11
|
+
**date_value** | **DateTime** | If the property is of a date time data type, then provides the date time value if available | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::DocxSetCustomMetadataPropertiesRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_file_bytes** | **String** | Optional: Bytes of the input file to operate on | [optional]
|
7
|
+
**input_file_url** | **String** | Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). | [optional]
|
8
|
+
**properties_to_set** | [**Array<DocxMetadataCustomProperty>**](DocxMetadataCustomProperty.md) | Required: properties to set in the Word Document; provide one or more property definitions to set - be sure to specify the data type and value, together with the property name | [optional]
|
9
|
+
|
10
|
+
|
data/docs/EditDocumentApi.md
CHANGED
@@ -18,6 +18,7 @@ Method | HTTP request | Description
|
|
18
18
|
[**edit_document_docx_get_comments_hierarchical**](EditDocumentApi.md#edit_document_docx_get_comments_hierarchical) | **POST** /convert/edit/docx/get-comments/hierarchical | Get comments from a Word DOCX document hierarchically
|
19
19
|
[**edit_document_docx_get_headers_and_footers**](EditDocumentApi.md#edit_document_docx_get_headers_and_footers) | **POST** /convert/edit/docx/get-headers-and-footers | Get content of a footer from a Word DOCX document
|
20
20
|
[**edit_document_docx_get_images**](EditDocumentApi.md#edit_document_docx_get_images) | **POST** /convert/edit/docx/get-images | Get images from a Word DOCX document
|
21
|
+
[**edit_document_docx_get_metadata_properties**](EditDocumentApi.md#edit_document_docx_get_metadata_properties) | **POST** /convert/edit/docx/get-metadata | Get all metadata properties in Word DOCX document
|
21
22
|
[**edit_document_docx_get_sections**](EditDocumentApi.md#edit_document_docx_get_sections) | **POST** /convert/edit/docx/get-sections | Get sections from a Word DOCX document
|
22
23
|
[**edit_document_docx_get_styles**](EditDocumentApi.md#edit_document_docx_get_styles) | **POST** /convert/edit/docx/get-styles | Get styles from a Word DOCX document
|
23
24
|
[**edit_document_docx_get_table_by_index**](EditDocumentApi.md#edit_document_docx_get_table_by_index) | **POST** /convert/edit/docx/get-table/by-index | Get a specific table by index in a Word DOCX document
|
@@ -35,6 +36,7 @@ Method | HTTP request | Description
|
|
35
36
|
[**edit_document_docx_replace**](EditDocumentApi.md#edit_document_docx_replace) | **POST** /convert/edit/docx/replace-all | Replace string in Word DOCX document
|
36
37
|
[**edit_document_docx_replace_multi**](EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document
|
37
38
|
[**edit_document_docx_replace_paragraph**](EditDocumentApi.md#edit_document_docx_replace_paragraph) | **POST** /convert/edit/docx/replace/paragraph | Replace matching paragraphs in a Word DOCX document
|
39
|
+
[**edit_document_docx_set_custom_metadata_properties**](EditDocumentApi.md#edit_document_docx_set_custom_metadata_properties) | **POST** /convert/edit/docx/set-metadata/custom-property | Set custom property metadata properties in Word DOCX document
|
38
40
|
[**edit_document_docx_set_footer**](EditDocumentApi.md#edit_document_docx_set_footer) | **POST** /convert/edit/docx/set-footer | Set the footer in a Word DOCX document
|
39
41
|
[**edit_document_docx_set_footer_add_page_number**](EditDocumentApi.md#edit_document_docx_set_footer_add_page_number) | **POST** /convert/edit/docx/set-footer/add-page-number | Add page number to footer in a Word DOCX document
|
40
42
|
[**edit_document_docx_set_header**](EditDocumentApi.md#edit_document_docx_set_header) | **POST** /convert/edit/docx/set-header | Set the header in a Word DOCX document
|
@@ -821,6 +823,60 @@ Name | Type | Description | Notes
|
|
821
823
|
|
822
824
|
|
823
825
|
|
826
|
+
# **edit_document_docx_get_metadata_properties**
|
827
|
+
> GetDocxMetadataPropertiesResponse edit_document_docx_get_metadata_properties(input_file)
|
828
|
+
|
829
|
+
Get all metadata properties in Word DOCX document
|
830
|
+
|
831
|
+
Returns all the metadata properties in an Office Word Document (docx)
|
832
|
+
|
833
|
+
### Example
|
834
|
+
```ruby
|
835
|
+
# load the gem
|
836
|
+
require 'cloudmersive-convert-api-client'
|
837
|
+
# setup authorization
|
838
|
+
CloudmersiveConvertApiClient.configure do |config|
|
839
|
+
# Configure API key authorization: Apikey
|
840
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
841
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
842
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
843
|
+
end
|
844
|
+
|
845
|
+
api_instance = CloudmersiveConvertApiClient::EditDocumentApi.new
|
846
|
+
|
847
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
848
|
+
|
849
|
+
|
850
|
+
begin
|
851
|
+
#Get all metadata properties in Word DOCX document
|
852
|
+
result = api_instance.edit_document_docx_get_metadata_properties(input_file)
|
853
|
+
p result
|
854
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
855
|
+
puts "Exception when calling EditDocumentApi->edit_document_docx_get_metadata_properties: #{e}"
|
856
|
+
end
|
857
|
+
```
|
858
|
+
|
859
|
+
### Parameters
|
860
|
+
|
861
|
+
Name | Type | Description | Notes
|
862
|
+
------------- | ------------- | ------------- | -------------
|
863
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
864
|
+
|
865
|
+
### Return type
|
866
|
+
|
867
|
+
[**GetDocxMetadataPropertiesResponse**](GetDocxMetadataPropertiesResponse.md)
|
868
|
+
|
869
|
+
### Authorization
|
870
|
+
|
871
|
+
[Apikey](../README.md#Apikey)
|
872
|
+
|
873
|
+
### HTTP request headers
|
874
|
+
|
875
|
+
- **Content-Type**: multipart/form-data
|
876
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
877
|
+
|
878
|
+
|
879
|
+
|
824
880
|
# **edit_document_docx_get_sections**
|
825
881
|
> GetDocxSectionsResponse edit_document_docx_get_sections(req_config)
|
826
882
|
|
@@ -1739,6 +1795,60 @@ Name | Type | Description | Notes
|
|
1739
1795
|
|
1740
1796
|
|
1741
1797
|
|
1798
|
+
# **edit_document_docx_set_custom_metadata_properties**
|
1799
|
+
> String edit_document_docx_set_custom_metadata_properties(input)
|
1800
|
+
|
1801
|
+
Set custom property metadata properties in Word DOCX document
|
1802
|
+
|
1803
|
+
Sets the custom property metadata for the metadata properties in an Office Word Document (docx)
|
1804
|
+
|
1805
|
+
### Example
|
1806
|
+
```ruby
|
1807
|
+
# load the gem
|
1808
|
+
require 'cloudmersive-convert-api-client'
|
1809
|
+
# setup authorization
|
1810
|
+
CloudmersiveConvertApiClient.configure do |config|
|
1811
|
+
# Configure API key authorization: Apikey
|
1812
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
1813
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1814
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
api_instance = CloudmersiveConvertApiClient::EditDocumentApi.new
|
1818
|
+
|
1819
|
+
input = CloudmersiveConvertApiClient::DocxSetCustomMetadataPropertiesRequest.new # DocxSetCustomMetadataPropertiesRequest |
|
1820
|
+
|
1821
|
+
|
1822
|
+
begin
|
1823
|
+
#Set custom property metadata properties in Word DOCX document
|
1824
|
+
result = api_instance.edit_document_docx_set_custom_metadata_properties(input)
|
1825
|
+
p result
|
1826
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
1827
|
+
puts "Exception when calling EditDocumentApi->edit_document_docx_set_custom_metadata_properties: #{e}"
|
1828
|
+
end
|
1829
|
+
```
|
1830
|
+
|
1831
|
+
### Parameters
|
1832
|
+
|
1833
|
+
Name | Type | Description | Notes
|
1834
|
+
------------- | ------------- | ------------- | -------------
|
1835
|
+
**input** | [**DocxSetCustomMetadataPropertiesRequest**](DocxSetCustomMetadataPropertiesRequest.md)| |
|
1836
|
+
|
1837
|
+
### Return type
|
1838
|
+
|
1839
|
+
**String**
|
1840
|
+
|
1841
|
+
### Authorization
|
1842
|
+
|
1843
|
+
[Apikey](../README.md#Apikey)
|
1844
|
+
|
1845
|
+
### HTTP request headers
|
1846
|
+
|
1847
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
1848
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
1849
|
+
|
1850
|
+
|
1851
|
+
|
1742
1852
|
# **edit_document_docx_set_footer**
|
1743
1853
|
> DocxSetFooterResponse edit_document_docx_set_footer(req_config)
|
1744
1854
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::GetDocxMetadataPropertiesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**company** | **String** | Name of the Company that authored the document, if available | [optional]
|
7
|
+
**manager** | **String** | Name of the Manager that authored the document, if available | [optional]
|
8
|
+
**application_version** | **String** | Application version that authored the document, if available | [optional]
|
9
|
+
**word_count** | **Integer** | Word count of the document | [optional]
|
10
|
+
**line_count** | **Integer** | Line count of the document | [optional]
|
11
|
+
**paragraph_count** | **Integer** | Paragraph count of the document | [optional]
|
12
|
+
**page_count** | **Integer** | Page count of the document | [optional]
|
13
|
+
**custom_properties** | [**Array<DocxMetadataCustomProperty>**](DocxMetadataCustomProperty.md) | Custom properties applied to the document | [optional]
|
14
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
15
|
+
|
16
|
+
|
@@ -66,12 +66,14 @@ require 'cloudmersive-convert-api-client/models/docx_image'
|
|
66
66
|
require 'cloudmersive-convert-api-client/models/docx_insert_comment_on_paragraph_request'
|
67
67
|
require 'cloudmersive-convert-api-client/models/docx_insert_image_request'
|
68
68
|
require 'cloudmersive-convert-api-client/models/docx_insert_image_response'
|
69
|
+
require 'cloudmersive-convert-api-client/models/docx_metadata_custom_property'
|
69
70
|
require 'cloudmersive-convert-api-client/models/docx_page'
|
70
71
|
require 'cloudmersive-convert-api-client/models/docx_paragraph'
|
71
72
|
require 'cloudmersive-convert-api-client/models/docx_remove_object_request'
|
72
73
|
require 'cloudmersive-convert-api-client/models/docx_remove_object_response'
|
73
74
|
require 'cloudmersive-convert-api-client/models/docx_run'
|
74
75
|
require 'cloudmersive-convert-api-client/models/docx_section'
|
76
|
+
require 'cloudmersive-convert-api-client/models/docx_set_custom_metadata_properties_request'
|
75
77
|
require 'cloudmersive-convert-api-client/models/docx_set_footer_add_page_number_request'
|
76
78
|
require 'cloudmersive-convert-api-client/models/docx_set_footer_request'
|
77
79
|
require 'cloudmersive-convert-api-client/models/docx_set_footer_response'
|
@@ -113,6 +115,7 @@ require 'cloudmersive-convert-api-client/models/get_docx_headers_and_footers_req
|
|
113
115
|
require 'cloudmersive-convert-api-client/models/get_docx_headers_and_footers_response'
|
114
116
|
require 'cloudmersive-convert-api-client/models/get_docx_images_request'
|
115
117
|
require 'cloudmersive-convert-api-client/models/get_docx_images_response'
|
118
|
+
require 'cloudmersive-convert-api-client/models/get_docx_metadata_properties_response'
|
116
119
|
require 'cloudmersive-convert-api-client/models/get_docx_pages_request'
|
117
120
|
require 'cloudmersive-convert-api-client/models/get_docx_pages_response'
|
118
121
|
require 'cloudmersive-convert-api-client/models/get_docx_sections_request'
|
@@ -779,6 +779,61 @@ module CloudmersiveConvertApiClient
|
|
779
779
|
end
|
780
780
|
return data, status_code, headers
|
781
781
|
end
|
782
|
+
# Get all metadata properties in Word DOCX document
|
783
|
+
# Returns all the metadata properties in an Office Word Document (docx)
|
784
|
+
# @param input_file Input file to perform the operation on.
|
785
|
+
# @param [Hash] opts the optional parameters
|
786
|
+
# @return [GetDocxMetadataPropertiesResponse]
|
787
|
+
def edit_document_docx_get_metadata_properties(input_file, opts = {})
|
788
|
+
data, _status_code, _headers = edit_document_docx_get_metadata_properties_with_http_info(input_file, opts)
|
789
|
+
data
|
790
|
+
end
|
791
|
+
|
792
|
+
# Get all metadata properties in Word DOCX document
|
793
|
+
# Returns all the metadata properties in an Office Word Document (docx)
|
794
|
+
# @param input_file Input file to perform the operation on.
|
795
|
+
# @param [Hash] opts the optional parameters
|
796
|
+
# @return [Array<(GetDocxMetadataPropertiesResponse, Fixnum, Hash)>] GetDocxMetadataPropertiesResponse data, response status code and response headers
|
797
|
+
def edit_document_docx_get_metadata_properties_with_http_info(input_file, opts = {})
|
798
|
+
if @api_client.config.debugging
|
799
|
+
@api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_get_metadata_properties ...'
|
800
|
+
end
|
801
|
+
# verify the required parameter 'input_file' is set
|
802
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
803
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditDocumentApi.edit_document_docx_get_metadata_properties"
|
804
|
+
end
|
805
|
+
# resource path
|
806
|
+
local_var_path = '/convert/edit/docx/get-metadata'
|
807
|
+
|
808
|
+
# query parameters
|
809
|
+
query_params = {}
|
810
|
+
|
811
|
+
# header parameters
|
812
|
+
header_params = {}
|
813
|
+
# HTTP header 'Accept' (if needed)
|
814
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
815
|
+
# HTTP header 'Content-Type'
|
816
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
817
|
+
|
818
|
+
# form parameters
|
819
|
+
form_params = {}
|
820
|
+
form_params['inputFile'] = input_file
|
821
|
+
|
822
|
+
# http body (model)
|
823
|
+
post_body = nil
|
824
|
+
auth_names = ['Apikey']
|
825
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
826
|
+
:header_params => header_params,
|
827
|
+
:query_params => query_params,
|
828
|
+
:form_params => form_params,
|
829
|
+
:body => post_body,
|
830
|
+
:auth_names => auth_names,
|
831
|
+
:return_type => 'GetDocxMetadataPropertiesResponse')
|
832
|
+
if @api_client.config.debugging
|
833
|
+
@api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_get_metadata_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
834
|
+
end
|
835
|
+
return data, status_code, headers
|
836
|
+
end
|
782
837
|
# Get sections from a Word DOCX document
|
783
838
|
# Returns the sections defined in the Word Document (DOCX) format file
|
784
839
|
# @param req_config Document input request
|
@@ -1698,6 +1753,60 @@ module CloudmersiveConvertApiClient
|
|
1698
1753
|
end
|
1699
1754
|
return data, status_code, headers
|
1700
1755
|
end
|
1756
|
+
# Set custom property metadata properties in Word DOCX document
|
1757
|
+
# Sets the custom property metadata for the metadata properties in an Office Word Document (docx)
|
1758
|
+
# @param input
|
1759
|
+
# @param [Hash] opts the optional parameters
|
1760
|
+
# @return [String]
|
1761
|
+
def edit_document_docx_set_custom_metadata_properties(input, opts = {})
|
1762
|
+
data, _status_code, _headers = edit_document_docx_set_custom_metadata_properties_with_http_info(input, opts)
|
1763
|
+
data
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
# Set custom property metadata properties in Word DOCX document
|
1767
|
+
# Sets the custom property metadata for the metadata properties in an Office Word Document (docx)
|
1768
|
+
# @param input
|
1769
|
+
# @param [Hash] opts the optional parameters
|
1770
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
1771
|
+
def edit_document_docx_set_custom_metadata_properties_with_http_info(input, opts = {})
|
1772
|
+
if @api_client.config.debugging
|
1773
|
+
@api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_set_custom_metadata_properties ...'
|
1774
|
+
end
|
1775
|
+
# verify the required parameter 'input' is set
|
1776
|
+
if @api_client.config.client_side_validation && input.nil?
|
1777
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling EditDocumentApi.edit_document_docx_set_custom_metadata_properties"
|
1778
|
+
end
|
1779
|
+
# resource path
|
1780
|
+
local_var_path = '/convert/edit/docx/set-metadata/custom-property'
|
1781
|
+
|
1782
|
+
# query parameters
|
1783
|
+
query_params = {}
|
1784
|
+
|
1785
|
+
# header parameters
|
1786
|
+
header_params = {}
|
1787
|
+
# HTTP header 'Accept' (if needed)
|
1788
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
1789
|
+
# HTTP header 'Content-Type'
|
1790
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
1791
|
+
|
1792
|
+
# form parameters
|
1793
|
+
form_params = {}
|
1794
|
+
|
1795
|
+
# http body (model)
|
1796
|
+
post_body = @api_client.object_to_http_body(input)
|
1797
|
+
auth_names = ['Apikey']
|
1798
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1799
|
+
:header_params => header_params,
|
1800
|
+
:query_params => query_params,
|
1801
|
+
:form_params => form_params,
|
1802
|
+
:body => post_body,
|
1803
|
+
:auth_names => auth_names,
|
1804
|
+
:return_type => 'String')
|
1805
|
+
if @api_client.config.debugging
|
1806
|
+
@api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_set_custom_metadata_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1807
|
+
end
|
1808
|
+
return data, status_code, headers
|
1809
|
+
end
|
1701
1810
|
# Set the footer in a Word DOCX document
|
1702
1811
|
# Set the footer in a Word Document (DOCX). Call Finish Editing on the output URL to complete the operation.
|
1703
1812
|
# @param req_config Document input request
|
@@ -0,0 +1,236 @@
|
|
1
|
+
=begin
|
2
|
+
#convertapi
|
3
|
+
|
4
|
+
#Convert API lets you effortlessly convert file formats and types.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
# Name and value pair for a custom-defined DOCX metadata property
|
17
|
+
class DocxMetadataCustomProperty
|
18
|
+
# Name of the property
|
19
|
+
attr_accessor :property_name
|
20
|
+
|
21
|
+
# Data type of the property; possible values are \"string\", \"integer\", \"double\" or \"date\"
|
22
|
+
attr_accessor :property_data_type
|
23
|
+
|
24
|
+
# If the property is of a string data type, then provides the string value if available
|
25
|
+
attr_accessor :string_value
|
26
|
+
|
27
|
+
# If the property is of a integer data type, then provides the integer value if available
|
28
|
+
attr_accessor :integer_value
|
29
|
+
|
30
|
+
# If the property is of a double floating point data type, then provides the double value if available
|
31
|
+
attr_accessor :double_value
|
32
|
+
|
33
|
+
# If the property is of a date time data type, then provides the date time value if available
|
34
|
+
attr_accessor :date_value
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'property_name' => :'PropertyName',
|
40
|
+
:'property_data_type' => :'PropertyDataType',
|
41
|
+
:'string_value' => :'StringValue',
|
42
|
+
:'integer_value' => :'IntegerValue',
|
43
|
+
:'double_value' => :'DoubleValue',
|
44
|
+
:'date_value' => :'DateValue'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'property_name' => :'String',
|
52
|
+
:'property_data_type' => :'String',
|
53
|
+
:'string_value' => :'String',
|
54
|
+
:'integer_value' => :'Integer',
|
55
|
+
:'double_value' => :'Float',
|
56
|
+
:'date_value' => :'DateTime'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
return unless attributes.is_a?(Hash)
|
64
|
+
|
65
|
+
# convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
67
|
+
|
68
|
+
if attributes.has_key?(:'PropertyName')
|
69
|
+
self.property_name = attributes[:'PropertyName']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'PropertyDataType')
|
73
|
+
self.property_data_type = attributes[:'PropertyDataType']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'StringValue')
|
77
|
+
self.string_value = attributes[:'StringValue']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'IntegerValue')
|
81
|
+
self.integer_value = attributes[:'IntegerValue']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'DoubleValue')
|
85
|
+
self.double_value = attributes[:'DoubleValue']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'DateValue')
|
89
|
+
self.date_value = attributes[:'DateValue']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
property_name == o.property_name &&
|
112
|
+
property_data_type == o.property_data_type &&
|
113
|
+
string_value == o.string_value &&
|
114
|
+
integer_value == o.integer_value &&
|
115
|
+
double_value == o.double_value &&
|
116
|
+
date_value == o.date_value
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculates hash code according to all attributes.
|
126
|
+
# @return [Fixnum] Hash code
|
127
|
+
def hash
|
128
|
+
[property_name, property_data_type, string_value, integer_value, double_value, date_value].hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
self.class.swagger_types.each_pair do |key, type|
|
137
|
+
if type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :BOOLEAN
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
temp_model = CloudmersiveConvertApiClient.const_get(type).new
|
189
|
+
temp_model.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
next if value.nil?
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
236
|
+
end
|