1
- # coding: utf-8
2
1
"""
3
- Copyright (c) 2022 Aspose.Cells Cloud
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2
+ <copyright company="Aspose" file="api_clientpy.cs">
3
+ Copyright (c) 2023 Aspose.Cells Cloud
4
+ </copyright>
5
+ <summary>
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
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
+ </summary>
20
24
"""
25
+ # coding: utf-8
21
26
22
27
from __future__ import absolute_import
23
28
@@ -83,7 +88,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
83
88
self .host = host
84
89
self .cookie = cookie
85
90
# Set default User-Agent.
86
- self .user_agent = 'Aspose.Cells.Cloud /23.8 /python'
91
+ self .user_agent = 'Swagger-Codegen /23.11 /python'
87
92
88
93
@property
89
94
def user_agent (self ):
@@ -139,7 +144,7 @@ def __call_api(self, resource_path, method,
139
144
# body
140
145
if body :
141
146
body = self .sanitize_for_serialization (body )
142
-
147
+
143
148
# post parameters
144
149
if post_params or files :
145
150
body = None
@@ -158,7 +163,7 @@ def __call_api(self, resource_path, method,
158
163
159
164
# request url
160
165
url = self .host + resource_path
161
-
166
+
162
167
preload_content = _preload_content
163
168
if response_type == 'file' :
164
169
preload_content = False
@@ -553,7 +558,7 @@ def __deserialize_file(self, response):
553
558
os .close (fd )
554
559
os .remove (path )
555
560
556
- content_disposition = response .headers . get ("Content-Disposition" )
561
+ content_disposition = response .getheader ("Content-Disposition" )
557
562
if content_disposition :
558
563
filename = re .\
559
564
search (r'filename=[\'"]?([^\'"\s]+)[\'"]?' , content_disposition ).\
@@ -745,4 +750,4 @@ def get_access_token(self, grant_type, client_id, client_secret, version, **kwar
745
750
_preload_content = params .get ('_preload_content' , True ),
746
751
_request_timeout = params .get ('_request_timeout' ),
747
752
collection_formats = collection_formats )
748
- return data [0 ].access_token
753
+ return data [0 ].access_token
0 commit comments