@@ -2048,3 +2048,130 @@ def post_reverse_with_http_info(self, file, rotate_type, format, **kwargs):
2048
2048
_preload_content = params .get ('_preload_content' , True ),
2049
2049
_request_timeout = params .get ('_request_timeout' ),
2050
2050
collection_formats = collection_formats )
2051
+
2052
+ def post_rotate (self , file , rotate_type , format , ** kwargs ):
2053
+ """
2054
+ This method makes a synchronous HTTP request by default. To make an
2055
+ asynchronous HTTP request, please define a `callback` function
2056
+ to be invoked when receiving the response.
2057
+ >>> def callback_function(response):
2058
+ >>> pprint(response)
2059
+ >>>
2060
+ >>> thread = api.post_rotate(file, text, color, callback=callback_function)
2061
+
2062
+ :param callback function: The callback function
2063
+ for asynchronous request. (optional)
2064
+ :param file file: File to upload (required)
2065
+ :param str rotate_type: (required)
2066
+ :param str format: (required)
2067
+ :param str type:checkExcelRestriction
2068
+ :return: FilesResult
2069
+ If the method is called asynchronously,
2070
+ returns the request thread.
2071
+ """
2072
+ kwargs ['_return_http_data_only' ] = True
2073
+ self .check_access_token ()
2074
+ if kwargs .get ('callback' ):
2075
+ return self .post_rotate_with_http_info (file , rotate_type , format , ** kwargs )
2076
+ else :
2077
+ (data ) = self .post_rotate_with_http_info (file , rotate_type , format , ** kwargs )
2078
+ return data
2079
+
2080
+ def post_rotate_with_http_info (self , file , rotate_type , format , ** kwargs ):
2081
+ """
2082
+ This method makes a synchronous HTTP request by default. To make an
2083
+ asynchronous HTTP request, please define a `callback` function
2084
+ to be invoked when receiving the response.
2085
+ >>> def callback_function(response):
2086
+ >>> pprint(response)
2087
+ >>>
2088
+ >>> thread = api.post_rotate_with_http_info(file, rotateType, format, callback=callback_function)
2089
+
2090
+ :param callback function: The callback function
2091
+ for asynchronous request. (optional)
2092
+ :param file file: File to upload (required)
2093
+ :param str rotateType: (required)
2094
+ :param str format: (required)
2095
+ :param str type:checkExcelRestriction
2096
+ :return: FilesResult
2097
+ If the method is called asynchronously,
2098
+ returns the request thread.
2099
+ """
2100
+
2101
+ all_params = ['file' , 'rotate_type' , 'format' ,'check_excel_restriction' ]
2102
+ all_params .append ('callback' )
2103
+ all_params .append ('_return_http_data_only' )
2104
+ all_params .append ('_preload_content' )
2105
+ all_params .append ('_request_timeout' )
2106
+
2107
+ params = locals ()
2108
+ for key , val in iteritems (params ['kwargs' ]):
2109
+ if key not in all_params :
2110
+ raise TypeError (
2111
+ "Got an unexpected keyword argument '%s'"
2112
+ " to method post_replace" % key
2113
+ )
2114
+ params [key ] = val
2115
+ del params ['kwargs' ]
2116
+ # verify the required parameter 'file' is set
2117
+ if ('file' not in params ) or (params ['file' ] is None ):
2118
+ raise ValueError ("Missing the required parameter `file` when calling `post_reverse`" )
2119
+ # verify the required parameter 'rotateType' is set
2120
+ if ('rotate_type' not in params ) or (params ['rotate_type' ] is None ):
2121
+ raise ValueError ("Missing the required parameter `text` when calling `post_reverse`" )
2122
+ # verify the required parameter 'format' is set
2123
+ if ('format' not in params ) or (params ['format' ] is None ):
2124
+ raise ValueError ("Missing the required parameter `newtext` when calling `post_reverse`" )
2125
+
2126
+
2127
+ collection_formats = {}
2128
+
2129
+ path_params = {}
2130
+
2131
+ query_params = []
2132
+ if 'format' in params :
2133
+ query_params .append (('format' , params ['format' ]))
2134
+ if 'rotate_type' in params :
2135
+ query_params .append (('rotateType' , params ['rotate_type' ]))
2136
+ if 'check_excel_restriction' in params :
2137
+ query_params .append (('checkExcelRestriction' , params ['check_excel_restriction' ]))
2138
+
2139
+ header_params = {}
2140
+
2141
+ form_params = []
2142
+ local_var_files = {}
2143
+ if 'file' in params :
2144
+
2145
+ if isinstance (params ['file' ],dict ):
2146
+ for filename , filecontext in params ['file' ].items ():
2147
+ local_var_files [filename ] = filecontext
2148
+ else :
2149
+ local_var_files ['File' ] = params ['file' ]
2150
+
2151
+
2152
+ body_params = None
2153
+ # HTTP header `Accept`
2154
+ header_params ['Accept' ] = self .api_client .\
2155
+ select_header_accept (['application/json' ])
2156
+
2157
+ # HTTP header `Content-Type`
2158
+ header_params ['Content-Type' ] = self .api_client .\
2159
+ select_header_content_type (['multipart/form-data' ])
2160
+
2161
+ # Authentication setting
2162
+ auth_settings = []
2163
+
2164
+ return self .api_client .call_api ('/cells/rotate' , 'POST' ,
2165
+ path_params ,
2166
+ query_params ,
2167
+ header_params ,
2168
+ body = body_params ,
2169
+ post_params = form_params ,
2170
+ files = local_var_files ,
2171
+ response_type = 'FilesResult' ,
2172
+ auth_settings = auth_settings ,
2173
+ callback = params .get ('callback' ),
2174
+ _return_http_data_only = params .get ('_return_http_data_only' ),
2175
+ _preload_content = params .get ('_preload_content' , True ),
2176
+ _request_timeout = params .get ('_request_timeout' ),
2177
+ collection_formats = collection_formats )
0 commit comments