File tree Expand file tree Collapse file tree 7 files changed +15
-7
lines changed
Expand file tree Collapse file tree 7 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 88 "test:py" : " python test_published_sdk.py"
99 },
1010 "dependencies" : {
11- "@numbersprotocol/capture-sdk" : " 0.2.0 " ,
11+ "@numbersprotocol/capture-sdk" : " ^ 0.2.1 " ,
1212 "sharp" : " ^0.33.0"
1313 },
1414 "devDependencies" : {
Original file line number Diff line number Diff line change 11# Python dependencies for integration tests
2- numbersprotocol-capture-sdk == 0.2.0
2+ numbersprotocol-capture-sdk >= 0.2.1
33Pillow >= 10.0.0
Original file line number Diff line number Diff line change 4040 UpdateOptions ,
4141)
4242
43- __version__ = "0.2.0 "
43+ __version__ = "0.2.1 "
4444
4545__all__ = [
4646 # Main client
Original file line number Diff line number Diff line change @@ -654,7 +654,7 @@ def search_asset(
654654 ):
655655 raise ValidationError ("sample_count must be a positive integer" )
656656
657- form_data : dict [str , Any ] = {"token" : self . _token }
657+ form_data : dict [str , Any ] = {}
658658
659659 # Add input source
660660 files_data : dict [str , Any ] | None = None
@@ -672,16 +672,21 @@ def search_asset(
672672 if options .sample_count is not None :
673673 form_data ["sample_count" ] = str (options .sample_count )
674674
675+ # Verify Engine API requires token in Authorization header, not form data
676+ headers = {"Authorization" : f"token { self ._token } " }
677+
675678 try :
676679 if files_data :
677680 response = self ._client .post (
678681 ASSET_SEARCH_API_URL ,
682+ headers = headers ,
679683 data = form_data ,
680684 files = files_data ,
681685 )
682686 else :
683687 response = self ._client .post (
684688 ASSET_SEARCH_API_URL ,
689+ headers = headers ,
685690 data = form_data ,
686691 )
687692 except httpx .RequestError as e :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " numbersprotocol-capture-sdk"
7- version = " 0.2.0 "
7+ version = " 0.2.1 "
88description = " Python SDK for Numbers Protocol Capture API"
99readme = " README.md"
1010license = " MIT"
Original file line number Diff line number Diff line change 11{
22 "name" : " @numbersprotocol/capture-sdk" ,
3- "version" : " 0.2.0 " ,
3+ "version" : " 0.2.1 " ,
44 "description" : " TypeScript SDK for Numbers Protocol Capture API" ,
55 "type" : " module" ,
66 "main" : " ./dist/index.cjs" ,
Original file line number Diff line number Diff line change @@ -494,7 +494,6 @@ export class Capture {
494494 }
495495
496496 const formData = new FormData ( )
497- formData . append ( 'token' , this . token )
498497
499498 // Add input source
500499 if ( options . fileUrl ) {
@@ -517,8 +516,12 @@ export class Capture {
517516 formData . append ( 'sample_count' , String ( options . sampleCount ) )
518517 }
519518
519+ // Verify Engine API requires token in Authorization header, not form data
520520 const response = await fetch ( ASSET_SEARCH_API_URL , {
521521 method : 'POST' ,
522+ headers : {
523+ Authorization : `token ${ this . token } ` ,
524+ } ,
522525 body : formData ,
523526 } )
524527
You can’t perform that action at this time.
0 commit comments