@@ -160,11 +160,15 @@ def get_asset_by_name(self, publisher_name, extension_name, version, asset_type,
160160 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
161161 if accept_default is not None :
162162 query_parameters ['acceptDefault' ] = self ._serialize .query ('accept_default' , accept_default , 'bool' )
163+ additional_headers = {}
164+ if account_token_header is not None :
165+ additional_headers ['X-Market-AccountToken' ] = account_token_header
163166 response = self ._send (http_method = 'GET' ,
164167 location_id = '7529171f-a002-4180-93ba-685f358a0482' ,
165168 version = '5.0-preview.1' ,
166169 route_values = route_values ,
167170 query_parameters = query_parameters ,
171+ additional_headers = additional_headers ,
168172 accept_media_type = 'application/octet-stream' )
169173 if "callback" in kwargs :
170174 callback = kwargs ["callback" ]
@@ -195,11 +199,15 @@ def get_asset(self, extension_id, version, asset_type, account_token=None, accep
195199 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
196200 if accept_default is not None :
197201 query_parameters ['acceptDefault' ] = self ._serialize .query ('accept_default' , accept_default , 'bool' )
202+ additional_headers = {}
203+ if account_token_header is not None :
204+ additional_headers ['X-Market-AccountToken' ] = account_token_header
198205 response = self ._send (http_method = 'GET' ,
199206 location_id = '5d545f3d-ef47-488b-8be3-f5ee1517856c' ,
200207 version = '5.0-preview.1' ,
201208 route_values = route_values ,
202209 query_parameters = query_parameters ,
210+ additional_headers = additional_headers ,
203211 accept_media_type = 'application/octet-stream' )
204212 if "callback" in kwargs :
205213 callback = kwargs ["callback" ]
@@ -230,11 +238,15 @@ def get_asset_authenticated(self, publisher_name, extension_name, version, asset
230238 query_parameters = {}
231239 if account_token is not None :
232240 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
241+ additional_headers = {}
242+ if account_token_header is not None :
243+ additional_headers ['X-Market-AccountToken' ] = account_token_header
233244 response = self ._send (http_method = 'GET' ,
234245 location_id = '506aff36-2622-4f70-8063-77cce6366d20' ,
235246 version = '5.0-preview.1' ,
236247 route_values = route_values ,
237248 query_parameters = query_parameters ,
249+ additional_headers = additional_headers ,
238250 accept_media_type = 'application/octet-stream' )
239251 if "callback" in kwargs :
240252 callback = kwargs ["callback" ]
@@ -490,6 +502,9 @@ def update_payload_in_draft_for_edit_extension(self, upload_stream, publisher_na
490502 route_values ['extensionName' ] = self ._serialize .url ('extension_name' , extension_name , 'str' )
491503 if draft_id is not None :
492504 route_values ['draftId' ] = self ._serialize .url ('draft_id' , draft_id , 'str' )
505+ additional_headers = {}
506+ if file_name is not None :
507+ additional_headers ['X-Market-UploadFileName' ] = file_name
493508 if "callback" in kwargs :
494509 callback = kwargs ["callback" ]
495510 else :
@@ -499,6 +514,7 @@ def update_payload_in_draft_for_edit_extension(self, upload_stream, publisher_na
499514 location_id = '02b33873-4e61-496e-83a2-59d1df46b7d8' ,
500515 version = '5.0-preview.1' ,
501516 route_values = route_values ,
517+ additional_headers = additional_headers ,
502518 content = content ,
503519 media_type = 'application/octet-stream' )
504520 return self ._deserialize ('ExtensionDraft' , response )
@@ -547,6 +563,11 @@ def create_draft_for_new_extension(self, upload_stream, publisher_name, product,
547563 route_values = {}
548564 if publisher_name is not None :
549565 route_values ['publisherName' ] = self ._serialize .url ('publisher_name' , publisher_name , 'str' )
566+ additional_headers = {}
567+ if product is not None :
568+ additional_headers ['X-Market-UploadFileProduct' ] = product
569+ if file_name is not None :
570+ additional_headers ['X-Market-UploadFileName' ] = file_name
550571 if "callback" in kwargs :
551572 callback = kwargs ["callback" ]
552573 else :
@@ -556,6 +577,7 @@ def create_draft_for_new_extension(self, upload_stream, publisher_name, product,
556577 location_id = 'b3ab127d-ebb9-4d22-b611-4e09593c8d79' ,
557578 version = '5.0-preview.1' ,
558579 route_values = route_values ,
580+ additional_headers = additional_headers ,
559581 content = content ,
560582 media_type = 'application/octet-stream' )
561583 return self ._deserialize ('ExtensionDraft' , response )
@@ -595,6 +617,9 @@ def update_payload_in_draft_for_new_extension(self, upload_stream, publisher_nam
595617 route_values ['publisherName' ] = self ._serialize .url ('publisher_name' , publisher_name , 'str' )
596618 if draft_id is not None :
597619 route_values ['draftId' ] = self ._serialize .url ('draft_id' , draft_id , 'str' )
620+ additional_headers = {}
621+ if file_name is not None :
622+ additional_headers ['X-Market-UploadFileName' ] = file_name
598623 if "callback" in kwargs :
599624 callback = kwargs ["callback" ]
600625 else :
@@ -604,6 +629,7 @@ def update_payload_in_draft_for_new_extension(self, upload_stream, publisher_nam
604629 location_id = 'b3ab127d-ebb9-4d22-b611-4e09593c8d79' ,
605630 version = '5.0-preview.1' ,
606631 route_values = route_values ,
632+ additional_headers = additional_headers ,
607633 content = content ,
608634 media_type = 'application/octet-stream' )
609635 return self ._deserialize ('ExtensionDraft' , response )
@@ -748,11 +774,15 @@ def query_extensions(self, extension_query, account_token=None, account_token_he
748774 query_parameters = {}
749775 if account_token is not None :
750776 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
777+ additional_headers = {}
778+ if account_token_header is not None :
779+ additional_headers ['X-Market-AccountToken' ] = account_token_header
751780 content = self ._serialize .body (extension_query , 'ExtensionQuery' )
752781 response = self ._send (http_method = 'POST' ,
753782 location_id = 'eb9d5ee1-6d43-456b-b80e-8a96fbc014b6' ,
754783 version = '5.0-preview.1' ,
755784 query_parameters = query_parameters ,
785+ additional_headers = additional_headers ,
756786 content = content )
757787 return self ._deserialize ('ExtensionQueryResult' , response )
758788
@@ -897,11 +927,15 @@ def get_extension(self, publisher_name, extension_name, version=None, flags=None
897927 query_parameters ['flags' ] = self ._serialize .query ('flags' , flags , 'str' )
898928 if account_token is not None :
899929 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
930+ additional_headers = {}
931+ if account_token_header is not None :
932+ additional_headers ['X-Market-AccountToken' ] = account_token_header
900933 response = self ._send (http_method = 'GET' ,
901934 location_id = 'e11ea35a-16fe-4b80-ab11-c4cab88a0966' ,
902935 version = '5.0-preview.2' ,
903936 route_values = route_values ,
904- query_parameters = query_parameters )
937+ query_parameters = query_parameters ,
938+ additional_headers = additional_headers )
905939 return self ._deserialize ('PublishedExtension' , response )
906940
907941 def update_extension (self , upload_stream , publisher_name , extension_name , bypass_scope_check = None , ** kwargs ):
@@ -1047,11 +1081,15 @@ def get_package(self, publisher_name, extension_name, version, account_token=Non
10471081 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
10481082 if accept_default is not None :
10491083 query_parameters ['acceptDefault' ] = self ._serialize .query ('accept_default' , accept_default , 'bool' )
1084+ additional_headers = {}
1085+ if account_token_header is not None :
1086+ additional_headers ['X-Market-AccountToken' ] = account_token_header
10501087 response = self ._send (http_method = 'GET' ,
10511088 location_id = '7cb576f8-1cae-4c4b-b7b1-e4af5759e965' ,
10521089 version = '5.0-preview.1' ,
10531090 route_values = route_values ,
10541091 query_parameters = query_parameters ,
1092+ additional_headers = additional_headers ,
10551093 accept_media_type = 'application/octet-stream' )
10561094 if "callback" in kwargs :
10571095 callback = kwargs ["callback" ]
@@ -1088,11 +1126,15 @@ def get_asset_with_token(self, publisher_name, extension_name, version, asset_ty
10881126 query_parameters ['accountToken' ] = self ._serialize .query ('account_token' , account_token , 'str' )
10891127 if accept_default is not None :
10901128 query_parameters ['acceptDefault' ] = self ._serialize .query ('accept_default' , accept_default , 'bool' )
1129+ additional_headers = {}
1130+ if account_token_header is not None :
1131+ additional_headers ['X-Market-AccountToken' ] = account_token_header
10911132 response = self ._send (http_method = 'GET' ,
10921133 location_id = '364415a1-0077-4a41-a7a0-06edd4497492' ,
10931134 version = '5.0-preview.1' ,
10941135 route_values = route_values ,
10951136 query_parameters = query_parameters ,
1137+ additional_headers = additional_headers ,
10961138 accept_media_type = 'application/octet-stream' )
10971139 if "callback" in kwargs :
10981140 callback = kwargs ["callback" ]
@@ -1158,6 +1200,9 @@ def update_publisher_asset(self, upload_stream, publisher_name, asset_type=None,
11581200 query_parameters = {}
11591201 if asset_type is not None :
11601202 query_parameters ['assetType' ] = self ._serialize .query ('asset_type' , asset_type , 'str' )
1203+ additional_headers = {}
1204+ if file_name is not None :
1205+ additional_headers ['X-Market-UploadFileName' ] = file_name
11611206 if "callback" in kwargs :
11621207 callback = kwargs ["callback" ]
11631208 else :
@@ -1168,6 +1213,7 @@ def update_publisher_asset(self, upload_stream, publisher_name, asset_type=None,
11681213 version = '5.0-preview.1' ,
11691214 route_values = route_values ,
11701215 query_parameters = query_parameters ,
1216+ additional_headers = additional_headers ,
11711217 content = content ,
11721218 media_type = 'application/octet-stream' )
11731219 return self ._deserialize ('{str}' , self ._unwrap_collection (response ))
0 commit comments