@@ -215,6 +215,7 @@ def create(
215
215
body : object ,
216
216
tus_resumable : Literal ["1.0.0" ],
217
217
upload_length : int ,
218
+ direct_user : bool | NotGiven = NOT_GIVEN ,
218
219
upload_creator : str | NotGiven = NOT_GIVEN ,
219
220
upload_metadata : str | NotGiven = NOT_GIVEN ,
220
221
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -240,6 +241,9 @@ def create(
240
241
upload_length: Indicates the size of the entire upload in bytes. The value must be a
241
242
non-negative integer.
242
243
244
+ direct_user: Provisions a URL to let your end users upload videos directly to Cloudflare
245
+ Stream without exposing your API token to clients.
246
+
243
247
upload_creator: A user-defined identifier for the media creator.
244
248
245
249
upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values
@@ -272,7 +276,11 @@ def create(
272
276
f"/accounts/{ account_id } /stream" ,
273
277
body = maybe_transform (body , stream_create_params .StreamCreateParams ),
274
278
options = make_request_options (
275
- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
279
+ extra_headers = extra_headers ,
280
+ extra_query = extra_query ,
281
+ extra_body = extra_body ,
282
+ timeout = timeout ,
283
+ query = maybe_transform ({"direct_user" : direct_user }, stream_create_params .StreamCreateParams ),
276
284
),
277
285
cast_to = NoneType ,
278
286
)
@@ -617,6 +625,7 @@ async def create(
617
625
body : object ,
618
626
tus_resumable : Literal ["1.0.0" ],
619
627
upload_length : int ,
628
+ direct_user : bool | NotGiven = NOT_GIVEN ,
620
629
upload_creator : str | NotGiven = NOT_GIVEN ,
621
630
upload_metadata : str | NotGiven = NOT_GIVEN ,
622
631
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -642,6 +651,9 @@ async def create(
642
651
upload_length: Indicates the size of the entire upload in bytes. The value must be a
643
652
non-negative integer.
644
653
654
+ direct_user: Provisions a URL to let your end users upload videos directly to Cloudflare
655
+ Stream without exposing your API token to clients.
656
+
645
657
upload_creator: A user-defined identifier for the media creator.
646
658
647
659
upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values
@@ -674,7 +686,13 @@ async def create(
674
686
f"/accounts/{ account_id } /stream" ,
675
687
body = await async_maybe_transform (body , stream_create_params .StreamCreateParams ),
676
688
options = make_request_options (
677
- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
689
+ extra_headers = extra_headers ,
690
+ extra_query = extra_query ,
691
+ extra_body = extra_body ,
692
+ timeout = timeout ,
693
+ query = await async_maybe_transform (
694
+ {"direct_user" : direct_user }, stream_create_params .StreamCreateParams
695
+ ),
678
696
),
679
697
cast_to = NoneType ,
680
698
)
0 commit comments