adcp 2.9.0__py3-none-any.whl → 2.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adcp/__init__.py +1 -1
- adcp/simple.py +104 -0
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/METADATA +1 -1
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/RECORD +8 -8
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/WHEEL +0 -0
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.9.0.dist-info → adcp-2.10.0.dist-info}/top_level.txt +0 -0
adcp/__init__.py
CHANGED
adcp/simple.py
CHANGED
|
@@ -26,6 +26,10 @@ from adcp.exceptions import ADCPSimpleAPIError
|
|
|
26
26
|
from adcp.types.stable import (
|
|
27
27
|
ActivateSignalRequest,
|
|
28
28
|
ActivateSignalResponse,
|
|
29
|
+
BuildCreativeRequest,
|
|
30
|
+
BuildCreativeResponse,
|
|
31
|
+
CreateMediaBuyRequest,
|
|
32
|
+
CreateMediaBuyResponse,
|
|
29
33
|
GetMediaBuyDeliveryRequest,
|
|
30
34
|
GetMediaBuyDeliveryResponse,
|
|
31
35
|
GetProductsRequest,
|
|
@@ -44,6 +48,8 @@ from adcp.types.stable import (
|
|
|
44
48
|
ProvidePerformanceFeedbackResponse,
|
|
45
49
|
SyncCreativesRequest,
|
|
46
50
|
SyncCreativesResponse,
|
|
51
|
+
UpdateMediaBuyRequest,
|
|
52
|
+
UpdateMediaBuyResponse,
|
|
47
53
|
)
|
|
48
54
|
|
|
49
55
|
if TYPE_CHECKING:
|
|
@@ -345,3 +351,101 @@ class SimpleAPI:
|
|
|
345
351
|
agent_id=self._client.agent_config.id,
|
|
346
352
|
)
|
|
347
353
|
return result.data
|
|
354
|
+
|
|
355
|
+
async def create_media_buy(
|
|
356
|
+
self,
|
|
357
|
+
**kwargs: Any,
|
|
358
|
+
) -> CreateMediaBuyResponse:
|
|
359
|
+
"""Create media buy.
|
|
360
|
+
|
|
361
|
+
Args:
|
|
362
|
+
**kwargs: Arguments passed to CreateMediaBuyRequest
|
|
363
|
+
|
|
364
|
+
Returns:
|
|
365
|
+
CreateMediaBuyResponse
|
|
366
|
+
|
|
367
|
+
Raises:
|
|
368
|
+
Exception: If the request fails
|
|
369
|
+
|
|
370
|
+
Example:
|
|
371
|
+
media_buy = await client.simple.create_media_buy(
|
|
372
|
+
brand_manifest=brand,
|
|
373
|
+
packages=[package_request],
|
|
374
|
+
publisher_properties=properties
|
|
375
|
+
)
|
|
376
|
+
print(f"Created media buy: {media_buy.media_buy_id}")
|
|
377
|
+
"""
|
|
378
|
+
request = CreateMediaBuyRequest(**kwargs)
|
|
379
|
+
result = await self._client.create_media_buy(request)
|
|
380
|
+
if not result.success or not result.data:
|
|
381
|
+
raise ADCPSimpleAPIError(
|
|
382
|
+
operation="create_media_buy",
|
|
383
|
+
error_message=result.error,
|
|
384
|
+
agent_id=self._client.agent_config.id,
|
|
385
|
+
)
|
|
386
|
+
return result.data
|
|
387
|
+
|
|
388
|
+
async def update_media_buy(
|
|
389
|
+
self,
|
|
390
|
+
**kwargs: Any,
|
|
391
|
+
) -> UpdateMediaBuyResponse:
|
|
392
|
+
"""Update media buy.
|
|
393
|
+
|
|
394
|
+
Args:
|
|
395
|
+
**kwargs: Arguments passed to UpdateMediaBuyRequest
|
|
396
|
+
|
|
397
|
+
Returns:
|
|
398
|
+
UpdateMediaBuyResponse
|
|
399
|
+
|
|
400
|
+
Raises:
|
|
401
|
+
Exception: If the request fails
|
|
402
|
+
|
|
403
|
+
Example:
|
|
404
|
+
updated = await client.simple.update_media_buy(
|
|
405
|
+
media_buy_id="mb_123",
|
|
406
|
+
packages=[updated_package]
|
|
407
|
+
)
|
|
408
|
+
print(f"Updated media buy: {updated.media_buy_id}")
|
|
409
|
+
"""
|
|
410
|
+
request = UpdateMediaBuyRequest(**kwargs)
|
|
411
|
+
result = await self._client.update_media_buy(request)
|
|
412
|
+
if not result.success or not result.data:
|
|
413
|
+
raise ADCPSimpleAPIError(
|
|
414
|
+
operation="update_media_buy",
|
|
415
|
+
error_message=result.error,
|
|
416
|
+
agent_id=self._client.agent_config.id,
|
|
417
|
+
)
|
|
418
|
+
return result.data
|
|
419
|
+
|
|
420
|
+
async def build_creative(
|
|
421
|
+
self,
|
|
422
|
+
**kwargs: Any,
|
|
423
|
+
) -> BuildCreativeResponse:
|
|
424
|
+
"""Build creative.
|
|
425
|
+
|
|
426
|
+
Args:
|
|
427
|
+
**kwargs: Arguments passed to BuildCreativeRequest
|
|
428
|
+
|
|
429
|
+
Returns:
|
|
430
|
+
BuildCreativeResponse
|
|
431
|
+
|
|
432
|
+
Raises:
|
|
433
|
+
Exception: If the request fails
|
|
434
|
+
|
|
435
|
+
Example:
|
|
436
|
+
creative = await client.simple.build_creative(
|
|
437
|
+
manifest=creative_manifest,
|
|
438
|
+
target_format_id="vast_2.0",
|
|
439
|
+
inputs={"duration": 30}
|
|
440
|
+
)
|
|
441
|
+
print(f"Built creative: {creative.assets[0].url}")
|
|
442
|
+
"""
|
|
443
|
+
request = BuildCreativeRequest(**kwargs)
|
|
444
|
+
result = await self._client.build_creative(request)
|
|
445
|
+
if not result.success or not result.data:
|
|
446
|
+
raise ADCPSimpleAPIError(
|
|
447
|
+
operation="build_creative",
|
|
448
|
+
error_message=result.error,
|
|
449
|
+
agent_id=self._client.agent_config.id,
|
|
450
|
+
)
|
|
451
|
+
return result.data
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
adcp/__init__.py,sha256=
|
|
1
|
+
adcp/__init__.py,sha256=TjVlE3AZVVRUi-eyAK8IOFtG4ZFoZOJS_y4kglIQorM,9254
|
|
2
2
|
adcp/__main__.py,sha256=HVsuiixW-PesPtBlG1Pofot7svrl2KdSFDFLoBxxUPo,14198
|
|
3
3
|
adcp/adagents.py,sha256=o-vTBmdZvu9aER-TAlLLL3s-WGYY8N67jnrAH24lST8,22333
|
|
4
4
|
adcp/client.py,sha256=m-GrXVXJN7xd1UI35ktGtIf5Sn5QH_Q2wysffuXIEEg,36658
|
|
5
5
|
adcp/config.py,sha256=Vsy7ZPOI8G3fB_i5Nk-CHbC7wdasCUWuKlos0fwA0kY,2017
|
|
6
6
|
adcp/exceptions.py,sha256=1aZEWpaM92OxD2jl9yKsqJp5ReSWaj0S0DFhxChhLlA,6732
|
|
7
7
|
adcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
adcp/simple.py,sha256=
|
|
8
|
+
adcp/simple.py,sha256=wVpl09oJRrM_QVWLisliLRJCIdRopsFNbCz5ROVwx-s,13568
|
|
9
9
|
adcp/validation.py,sha256=NsTwTQbLmd1Z1bMcztR1llJB21ai1xuw5aVrca7LoE8,6793
|
|
10
10
|
adcp/protocols/__init__.py,sha256=6UFwACQ0QadBUzy17wUROHqsJDp8ztPW2jzyl53Zh_g,262
|
|
11
11
|
adcp/protocols/a2a.py,sha256=6xUerMXFfPLU8JmZNRwqKaBJVkIjzVCM8GIkX90zbG0,13010
|
|
@@ -123,9 +123,9 @@ adcp/utils/__init__.py,sha256=uetvSJB19CjQbtwEYZiTnumJG11GsafQmXm5eR3hL7E,153
|
|
|
123
123
|
adcp/utils/operation_id.py,sha256=wQX9Bb5epXzRq23xoeYPTqzu5yLuhshg7lKJZihcM2k,294
|
|
124
124
|
adcp/utils/preview_cache.py,sha256=PH9bSDOPQzLKqkC_o0a9Xn2i4cNC2oy76dkJdS3j7ck,18491
|
|
125
125
|
adcp/utils/response_parser.py,sha256=uPk2vIH-RYZmq7y3i8lC4HTMQ3FfKdlgXKTjgJ1955M,6253
|
|
126
|
-
adcp-2.
|
|
127
|
-
adcp-2.
|
|
128
|
-
adcp-2.
|
|
129
|
-
adcp-2.
|
|
130
|
-
adcp-2.
|
|
131
|
-
adcp-2.
|
|
126
|
+
adcp-2.10.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
|
|
127
|
+
adcp-2.10.0.dist-info/METADATA,sha256=rikVWVlTsv7uI4XDGUd3mc2AmEALTb2CSQeROQqAa2k,31358
|
|
128
|
+
adcp-2.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
129
|
+
adcp-2.10.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
|
|
130
|
+
adcp-2.10.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
|
|
131
|
+
adcp-2.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|