@@ -475,7 +475,7 @@ def update_target(
475475 width : Optional [Union [int , float ]] = None ,
476476 image : Optional [io .BytesIO ] = None ,
477477 active_flag : Optional [bool ] = None ,
478- application_metadata : Optional [bytes ] = None ,
478+ application_metadata : Optional [str ] = None ,
479479 ) -> None :
480480 """
481481 Add a target to a Vuforia Web Services database.
@@ -491,8 +491,11 @@ def update_target(
491491 image: The image of the target.
492492 active_flag: Whether or not the target is active for query.
493493 application_metadata: The application metadata of the target.
494- This will be base64 encoded. Giving ``None`` will not change
495- the application metadata.
494+ This must be base64 encoded, for example by using::
495+
496+ base64.b64encode('input_string').decode('ascii')
497+
498+ Giving ``None`` will not change the application metadata.
496499
497500 Raises:
498501 ~vws.exceptions.AuthenticationFailure: The secret key is not
@@ -528,9 +531,7 @@ def update_target(
528531 data ['active_flag' ] = active_flag
529532
530533 if application_metadata is not None :
531- metadata_encoded_str = base64 .b64encode (application_metadata )
532- metadata_encoded = metadata_encoded_str .decode ('ascii' )
533- data ['application_metadata' ] = metadata_encoded
534+ data ['application_metadata' ] = application_metadata
534535
535536 content = bytes (json .dumps (data ), encoding = 'utf-8' )
536537
0 commit comments