Skip to content

Commit 6cbc108

Browse files
Merge pull request #1 from kaferi/master
Update to version 18.3.0
2 parents 11ffb92 + f0e3470 commit 6cbc108

File tree

87 files changed

+4818
-1281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+4818
-1281
lines changed

.swagger-codegen/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.2.3

__init__.py

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# coding: utf-8
2+
3+
"""
4+
Aspose.PDF for Cloud API Reference
5+
6+
7+
Copyright (c) 2018 Aspose.Pdf for Cloud
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
24+
25+
26+
OpenAPI spec version: 1.1
27+
28+
Generated by: https://github.com/swagger-api/swagger-codegen.git
29+
"""
30+
31+
32+
from __future__ import absolute_import
33+
34+
# import models into model package
35+
from .append_document import AppendDocument
36+
from .color import Color
37+
from .color_depth import ColorDepth
38+
from .compression_type import CompressionType
39+
from .doc_format import DocFormat
40+
from .field_type import FieldType
41+
from .font_styles import FontStyles
42+
from .horizontal_alignment import HorizontalAlignment
43+
from .http_status_code import HttpStatusCode
44+
from .images_list_request import ImagesListRequest
45+
from .line_spacing import LineSpacing
46+
from .link import Link
47+
from .link_action_type import LinkActionType
48+
from .link_element import LinkElement
49+
from .link_highlighting_mode import LinkHighlightingMode
50+
from .merge_documents import MergeDocuments
51+
from .optimize_options import OptimizeOptions
52+
from .page_word_count import PageWordCount
53+
from .paragraph import Paragraph
54+
from .pdf_a_type import PdfAType
55+
from .recognition_mode import RecognitionMode
56+
from .rectangle import Rectangle
57+
from .rotation import Rotation
58+
from .saa_spose_response import SaaSposeResponse
59+
from .segment import Segment
60+
from .shape_type import ShapeType
61+
from .signature import Signature
62+
from .signature_type import SignatureType
63+
from .split_result import SplitResult
64+
from .stamp import Stamp
65+
from .stamp_type import StampType
66+
from .text_horizontal_alignment import TextHorizontalAlignment
67+
from .text_line import TextLine
68+
from .text_rect import TextRect
69+
from .text_rects import TextRects
70+
from .text_replace import TextReplace
71+
from .text_replace_list_request import TextReplaceListRequest
72+
from .text_state import TextState
73+
from .tiff_export_options import TiffExportOptions
74+
from .vertical_alignment import VerticalAlignment
75+
from .word_count import WordCount
76+
from .wrap_mode import WrapMode
77+
from .annotation import Annotation
78+
from .annotation_response import AnnotationResponse
79+
from .annotations import Annotations
80+
from .annotations_response import AnnotationsResponse
81+
from .attachment import Attachment
82+
from .attachment_response import AttachmentResponse
83+
from .attachments import Attachments
84+
from .attachments_response import AttachmentsResponse
85+
from .document import Document
86+
from .document_pages_response import DocumentPagesResponse
87+
from .document_properties import DocumentProperties
88+
from .document_properties_response import DocumentPropertiesResponse
89+
from .document_property import DocumentProperty
90+
from .document_property_response import DocumentPropertyResponse
91+
from .document_response import DocumentResponse
92+
from .field import Field
93+
from .field_response import FieldResponse
94+
from .fields import Fields
95+
from .fields_response import FieldsResponse
96+
from .image import Image
97+
from .image_response import ImageResponse
98+
from .images import Images
99+
from .images_response import ImagesResponse
100+
from .link_annotation import LinkAnnotation
101+
from .link_annotation_response import LinkAnnotationResponse
102+
from .link_annotations import LinkAnnotations
103+
from .link_annotations_response import LinkAnnotationsResponse
104+
from .page import Page
105+
from .pages import Pages
106+
from .split_result_document import SplitResultDocument
107+
from .split_result_response import SplitResultResponse
108+
from .text_format import TextFormat
109+
from .text_format_response import TextFormatResponse
110+
from .text_item import TextItem
111+
from .text_item_response import TextItemResponse
112+
from .text_items import TextItems
113+
from .text_items_response import TextItemsResponse
114+
from .text_rects_response import TextRectsResponse
115+
from .text_replace_request import TextReplaceRequest
116+
from .text_replace_response import TextReplaceResponse
117+
from .word_count_response import WordCountResponse
118+
from .document_text_replace_response import DocumentTextReplaceResponse
119+
from .page_text_replace_response import PageTextReplaceResponse

asposepdfcloud/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coding: utf-8
22

33
"""
4-
Aspose.Pdf for Cloud API Reference
4+
Aspose.PDF for Cloud API Reference
55
66
77
Copyright (c) 2018 Aspose.Pdf for Cloud
@@ -34,6 +34,9 @@
3434
# import models into sdk package
3535
from .models.append_document import AppendDocument
3636
from .models.color import Color
37+
from .models.color_depth import ColorDepth
38+
from .models.compression_type import CompressionType
39+
from .models.doc_format import DocFormat
3740
from .models.field_type import FieldType
3841
from .models.font_styles import FontStyles
3942
from .models.horizontal_alignment import HorizontalAlignment
@@ -48,10 +51,13 @@
4851
from .models.optimize_options import OptimizeOptions
4952
from .models.page_word_count import PageWordCount
5053
from .models.paragraph import Paragraph
54+
from .models.pdf_a_type import PdfAType
55+
from .models.recognition_mode import RecognitionMode
5156
from .models.rectangle import Rectangle
5257
from .models.rotation import Rotation
5358
from .models.saa_spose_response import SaaSposeResponse
5459
from .models.segment import Segment
60+
from .models.shape_type import ShapeType
5561
from .models.signature import Signature
5662
from .models.signature_type import SignatureType
5763
from .models.split_result import SplitResult
@@ -76,8 +82,6 @@
7682
from .models.attachment_response import AttachmentResponse
7783
from .models.attachments import Attachments
7884
from .models.attachments_response import AttachmentsResponse
79-
from .models.bookmarks import Bookmarks
80-
from .models.bookmarks_response import BookmarksResponse
8185
from .models.document import Document
8286
from .models.document_pages_response import DocumentPagesResponse
8387
from .models.document_properties import DocumentProperties

asposepdfcloud/api_client.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22
"""
3-
Aspose.Pdf for Cloud API Reference
3+
Aspose.PDF for Cloud API Reference
44
55
66
Copyright (c) 2018 Aspose.Pdf for Cloud
@@ -93,7 +93,7 @@ def __init__(self, app_key, app_sid, host=None):
9393
self.host = host
9494

9595
# Set default User-Agent.
96-
self.user_agent = 'Swagger-Codegen/18.2.0/python'
96+
self.user_agent = 'aspose pdf cloud python sdk'
9797

9898
@property
9999
def user_agent(self):
@@ -147,11 +147,26 @@ def __call_api(self, resource_path, method,
147147
collection_formats)
148148

149149
# post parameters
150-
if post_params or files:
151-
post_params = self.prepare_post_parameters(post_params, files)
150+
if post_params:
151+
# post_params = self.prepare_post_parameters(post_params, files)
152152
post_params = self.sanitize_for_serialization(post_params)
153153
post_params = self.parameters_to_tuples(post_params,
154154
collection_formats)
155+
# ASPOSE HEADER ISSUE
156+
# body
157+
if files:
158+
for k, v in iteritems(files):
159+
if not v:
160+
continue
161+
file_names = v if type(v) is list else [v]
162+
for n in file_names:
163+
with open(n, 'rb') as f:
164+
filename = os.path.basename(f.name)
165+
body = f.read()
166+
mimetype = mimetypes.\
167+
guess_type(filename)[0] or 'application/octet-stream'
168+
header_params['Content-Type'] = mimetype
169+
155170

156171
# auth setting
157172
self.update_params_for_auth(header_params, query_params, auth_settings)
@@ -605,7 +620,7 @@ def __deserialize_file(self, response):
605620
#TEMPLATE CHANGE
606621
content_type = response.urllib3_response.getheader('Content-Type')
607622
open_file_keys = 'wb'
608-
if 'application/json' in content_type:
623+
if content_type and 'application/json' in content_type:
609624
open_file_keys = 'w'
610625

611626
with open(path, open_file_keys) as f:

asposepdfcloud/apis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coding: utf-8
22

33
"""
4-
Aspose.Pdf for Cloud API Reference
4+
Aspose.PDF for Cloud API Reference
55
66
77
Copyright (c) 2018 Aspose.Pdf for Cloud

0 commit comments

Comments
 (0)