python-amazon-ad-api 2.2.1__tar.gz → 2.2.3__tar.gz
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.
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/PKG-INFO +1 -1
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/__init__.py +1 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/__init__.py +21 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/ad_groups.py +129 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/ads.py +111 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/campaigns.py +112 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/creatives.py +76 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/creatives_moderations.py +58 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/creatives_preview.py +36 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/forecasts.py +36 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/locations.py +76 -0
- python_amazon_ad_api-2.2.3/ad_api/api/st/targets.py +111 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/stores.py +1 -1
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/stream.py +1 -1
- python_amazon_ad_api-2.2.3/ad_api/version.py +1 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/python_amazon_ad_api.egg-info/SOURCES.txt +10 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/setup.cfg +1 -1
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/setup.py +2 -1
- python_amazon_ad_api-2.2.1/ad_api/version.py +0 -1
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/LICENSE +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/README.md +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/account.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/account_budgets.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/advertising_invitations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/advertising_test_account.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/advertising_user_permissions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/attribution.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/audiences.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/billing.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/brand_benchmarks.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/brand_metrics.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/creative_assets.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/dsp_advertiser.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/eligibility.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/exports.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/history.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/insights.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/localization.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/marketing_mix_modeling.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/metadata.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/portfolios.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/portfolios_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/profiles.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/reports.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/ad_creatives_v4.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/ad_groups_v4.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/ads_v4.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/benchmarks.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/brands.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/campaigns_v4.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/forecast.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/keywords.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/landing_page_asins.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/media.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/migration.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/negative_keywords.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/optimization_rules.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/reports.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/stores.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/targeting_categories.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sb/themes.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/brand_safety.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/creatives.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/forecast.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/product_ads.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/reports.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/snapshots.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sd/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/ad_groups_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/budget_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaign_negative_targets.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaigns_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/campaings_optimization.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/global_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/keyword_groups_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/product_ads_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/product_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/sp/target_promotion_groups.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/ad_associations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/ad_extensions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/ads.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/advertiser_accounts.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/brand_store_editions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/brand_store_pages.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/brand_stores.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/geo_locations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/label_object_associations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/labels.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/location_indexes.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/portfolios.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/recommendation_types.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/reports.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/selling_accounts.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/v1/targets.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/api/validation_configurations.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/auth/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/auth/access_token_client.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/auth/access_token_response.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/auth/credentials.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/auth/exceptions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/api_response.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/client.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/config.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/credential_provider.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/exceptions.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/helpers.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/marketplaces.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/base/utils.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/shared/__init__.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/ad_api/shared/base_client.py +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/pyproject.toml +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/python_amazon_ad_api.egg-info/requires.txt +0 -0
- {python_amazon_ad_api-2.2.1 → python_amazon_ad_api-2.2.3}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
|
@@ -16,6 +16,7 @@ from . import v1 as ads_api_v1
|
|
|
16
16
|
from . import sp as sponsored_products
|
|
17
17
|
from . import sb as sponsored_brands
|
|
18
18
|
from . import sd as sponsored_display
|
|
19
|
+
from . import st as sponsored_tv
|
|
19
20
|
from .attribution import Attribution
|
|
20
21
|
from .brand_metrics import BrandMetrics
|
|
21
22
|
from .brand_benchmarks import BrandBenchmarks
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from .ad_groups import AdGroups
|
|
2
|
+
from .ads import Ads
|
|
3
|
+
from .campaigns import Campaigns
|
|
4
|
+
from .creatives import Creatives
|
|
5
|
+
from .creatives_moderations import CreativesModerations
|
|
6
|
+
from .creatives_preview import CreativesPreview
|
|
7
|
+
from .forecasts import Forecasts
|
|
8
|
+
from .locations import Locations
|
|
9
|
+
from .targets import Targets
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"AdGroups",
|
|
13
|
+
"Ads",
|
|
14
|
+
"Campaigns",
|
|
15
|
+
"Creatives",
|
|
16
|
+
"CreativesModerations",
|
|
17
|
+
"CreativesPreview",
|
|
18
|
+
"Forecasts",
|
|
19
|
+
"Locations",
|
|
20
|
+
"Targets",
|
|
21
|
+
]
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Sponsored TV ad groups.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/adGroups``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``application/vnd.stAdGroup.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header. The contract allows
|
|
8
|
+
``include=extendedData`` on list and ``return=representation`` on create,
|
|
9
|
+
update and delete, optionally combined. The parameter takes the value as text
|
|
10
|
+
and the caller decides.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AdGroups(Client):
|
|
17
|
+
r"""Sponsored TV - AdGroups"""
|
|
18
|
+
|
|
19
|
+
@sp_endpoint('/st/adGroups', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
20
|
+
def create_ad_groups(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
21
|
+
r"""
|
|
22
|
+
Creates Sponsored TV ad groups.
|
|
23
|
+
|
|
24
|
+
Request Body [Required]
|
|
25
|
+
| **adGroups** (list): 1 to 100 ad groups. Each one carries:
|
|
26
|
+
| **campaignId** (string) [required]: the Campaign the ad group belongs to.
|
|
27
|
+
| **name** (string) [required]: 1 to 255 characters.
|
|
28
|
+
| **state** (string) [required]: ENABLED or PAUSED.
|
|
29
|
+
| **defaultBid** (object) [optional]: ``{"bid": number}``, used when no bid is given.
|
|
30
|
+
|
|
31
|
+
Keyword Args
|
|
32
|
+
|
|
33
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
34
|
+
- ``prefer`` (str): ``return=representation`` to get the full objects back,
|
|
35
|
+
optionally ``return=representation,include=extendedData``. [optional]
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
ApiResponse with ``adGroups``: ``success`` and ``error`` lists, so one
|
|
39
|
+
call can accept some entries and refuse others. Check both.
|
|
40
|
+
"""
|
|
41
|
+
schema = 'application/vnd.stAdGroup.v' + str(version) + '+json'
|
|
42
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
43
|
+
if prefer:
|
|
44
|
+
headers.update({'Prefer': prefer})
|
|
45
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
46
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
47
|
+
|
|
48
|
+
@sp_endpoint('/st/adGroups', method='PUT', headers=['Amazon-Advertising-API-Scope'])
|
|
49
|
+
def update_ad_groups(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
50
|
+
r"""
|
|
51
|
+
Updates Sponsored TV ad groups.
|
|
52
|
+
|
|
53
|
+
Request Body [Required]
|
|
54
|
+
| **adGroups** (list): 1 to 100 ad groups. Each one carries:
|
|
55
|
+
| **adGroupId** (string) [required]
|
|
56
|
+
| **name** (string) [optional]: 1 to 255 characters.
|
|
57
|
+
| **state** (string) [optional]: ENABLED or PAUSED.
|
|
58
|
+
| **defaultBid** (object) [optional]: ``{"bid": number}``.
|
|
59
|
+
|
|
60
|
+
Keyword Args
|
|
61
|
+
|
|
62
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
63
|
+
- ``prefer`` (str): ``return=representation``, optionally with
|
|
64
|
+
``include=extendedData``. [optional]
|
|
65
|
+
|
|
66
|
+
Returns
|
|
67
|
+
ApiResponse with ``adGroups``: ``success`` and ``error`` lists.
|
|
68
|
+
"""
|
|
69
|
+
schema = 'application/vnd.stAdGroup.v' + str(version) + '+json'
|
|
70
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
71
|
+
if prefer:
|
|
72
|
+
headers.update({'Prefer': prefer})
|
|
73
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
74
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
75
|
+
|
|
76
|
+
@sp_endpoint('/st/adGroups/delete', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
77
|
+
def delete_ad_groups(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
78
|
+
r"""
|
|
79
|
+
Deletes Sponsored TV ad groups. The ids travel in the **body**.
|
|
80
|
+
|
|
81
|
+
Request Body [Required]
|
|
82
|
+
| **adGroupIdFilter** (object) [required]: ``{"include": [adGroupId, ...]}``,
|
|
83
|
+
1 to 100 ids.
|
|
84
|
+
|
|
85
|
+
Keyword Args
|
|
86
|
+
|
|
87
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
88
|
+
- ``prefer`` (str): ``return=representation``, optionally with
|
|
89
|
+
``include=extendedData``. [optional]
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
ApiResponse with ``adGroups``: ``success`` and ``error`` lists.
|
|
93
|
+
"""
|
|
94
|
+
schema = 'application/vnd.stAdGroup.v' + str(version) + '+json'
|
|
95
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
96
|
+
if prefer:
|
|
97
|
+
headers.update({'Prefer': prefer})
|
|
98
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
99
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
100
|
+
|
|
101
|
+
@sp_endpoint('/st/adGroups/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
102
|
+
def list_ad_groups(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
103
|
+
r"""
|
|
104
|
+
Lists Sponsored TV ad groups.
|
|
105
|
+
|
|
106
|
+
Request Body [Optional]
|
|
107
|
+
| **adGroupIdFilter** (object): ``{"include": [...]}``, 1 to 100 ids.
|
|
108
|
+
| **campaignIdFilter** (object): ``{"include": [...]}``, 1 to 100 ids.
|
|
109
|
+
| **fullFunnelCampaignIdFilter** (object): ``{"include": [...]}``, 1 to 100 ids.
|
|
110
|
+
| **nameFilter** (object): ``{"include": [...], "queryTermMatchType": BROAD_MATCH|EXACT_MATCH}``.
|
|
111
|
+
| **stateFilter** (object): ``{"include": [ARCHIVED|ENABLED|PAUSED, ...]}``, 1 to 10 values.
|
|
112
|
+
| **maxResults** (int): 1 to 100, defaults to the maximum page size.
|
|
113
|
+
| **nextToken** (string): pagination token from a previous answer.
|
|
114
|
+
|
|
115
|
+
Keyword Args
|
|
116
|
+
|
|
117
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
118
|
+
- ``prefer`` (str): ``include=extendedData``, optionally with
|
|
119
|
+
``return=representation``. [optional]
|
|
120
|
+
|
|
121
|
+
Returns
|
|
122
|
+
ApiResponse with the ad groups, ``nextToken`` and ``totalResults``.
|
|
123
|
+
"""
|
|
124
|
+
schema = 'application/vnd.stAdGroup.v' + str(version) + '+json'
|
|
125
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
126
|
+
if prefer:
|
|
127
|
+
headers.update({'Prefer': prefer})
|
|
128
|
+
body = kwargs.pop('body', None)
|
|
129
|
+
return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"""Sponsored TV /st/ads.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/ads``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stAd.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header. The contract allows
|
|
8
|
+
``include=extendedData`` on list and ``return=representation`` on create,
|
|
9
|
+
update and delete, optionally combined.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Ads(Client):
|
|
16
|
+
r"""Sponsored TV - /st/ads"""
|
|
17
|
+
|
|
18
|
+
@sp_endpoint('/st/ads', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
19
|
+
def create_ads(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
20
|
+
r"""
|
|
21
|
+
Creates Sponsored TV ads.
|
|
22
|
+
|
|
23
|
+
Request Body [Required]
|
|
24
|
+
| **ads** (list): 1 to 100 ads.
|
|
25
|
+
|
|
26
|
+
Keyword Args
|
|
27
|
+
|
|
28
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
29
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
ApiResponse with ``ads``: ``success`` and ``error`` lists.
|
|
33
|
+
"""
|
|
34
|
+
schema = 'application/vnd.stAd.v' + str(version) + '+json'
|
|
35
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
36
|
+
if prefer:
|
|
37
|
+
headers.update({'Prefer': prefer})
|
|
38
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
39
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
40
|
+
|
|
41
|
+
@sp_endpoint('/st/ads', method='PUT', headers=['Amazon-Advertising-API-Scope'])
|
|
42
|
+
def update_ads(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
43
|
+
r"""
|
|
44
|
+
Updates Sponsored TV ads.
|
|
45
|
+
|
|
46
|
+
Request Body [Required]
|
|
47
|
+
| **ads** (list): 1 to 100 ads, each with **adId**.
|
|
48
|
+
|
|
49
|
+
Keyword Args
|
|
50
|
+
|
|
51
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
52
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
53
|
+
|
|
54
|
+
Returns
|
|
55
|
+
ApiResponse with ``ads``: ``success`` and ``error`` lists.
|
|
56
|
+
"""
|
|
57
|
+
schema = 'application/vnd.stAd.v' + str(version) + '+json'
|
|
58
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
59
|
+
if prefer:
|
|
60
|
+
headers.update({'Prefer': prefer})
|
|
61
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
62
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
63
|
+
|
|
64
|
+
@sp_endpoint('/st/ads/delete', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
65
|
+
def delete_ads(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
66
|
+
r"""
|
|
67
|
+
Deletes Sponsored TV ads. The ids travel in the **body**.
|
|
68
|
+
|
|
69
|
+
Request Body [Required]
|
|
70
|
+
| **adIdFilter** (object) [required]: ``{"include": [adId, ...]}``.
|
|
71
|
+
|
|
72
|
+
Keyword Args
|
|
73
|
+
|
|
74
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
75
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
ApiResponse with ``ads``: ``success`` and ``error`` lists.
|
|
79
|
+
"""
|
|
80
|
+
schema = 'application/vnd.stAd.v' + str(version) + '+json'
|
|
81
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
82
|
+
if prefer:
|
|
83
|
+
headers.update({'Prefer': prefer})
|
|
84
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
85
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
86
|
+
|
|
87
|
+
@sp_endpoint('/st/ads/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
88
|
+
def list_ads(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
89
|
+
r"""
|
|
90
|
+
Lists Sponsored TV ads.
|
|
91
|
+
|
|
92
|
+
Request Body [Optional]
|
|
93
|
+
| **adIdFilter**, **adGroupIdFilter**, **campaignIdFilter**, **fullFunnelCampaignIdFilter** (objects): each ``{"include": [...]}``.
|
|
94
|
+
| **stateFilter** (object): ``{"include": [ARCHIVED|ENABLED|PAUSED, ...]}``.
|
|
95
|
+
| **maxResults** (int): 1 to 100.
|
|
96
|
+
| **nextToken** (string): pagination token.
|
|
97
|
+
|
|
98
|
+
Keyword Args
|
|
99
|
+
|
|
100
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
101
|
+
- ``prefer`` (str): ``include=extendedData``, optionally with ``return=representation``. [optional]
|
|
102
|
+
|
|
103
|
+
Returns
|
|
104
|
+
ApiResponse with the ads, ``nextToken`` and ``totalResults``.
|
|
105
|
+
"""
|
|
106
|
+
schema = 'application/vnd.stAd.v' + str(version) + '+json'
|
|
107
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
108
|
+
if prefer:
|
|
109
|
+
headers.update({'Prefer': prefer})
|
|
110
|
+
body = kwargs.pop('body', None)
|
|
111
|
+
return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""Sponsored TV /st/campaigns.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/campaigns``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stCampaign.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header. The contract allows
|
|
8
|
+
``include=extendedData`` on list and ``return=representation`` on create,
|
|
9
|
+
update and delete, optionally combined.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Campaigns(Client):
|
|
16
|
+
r"""Sponsored TV - /st/campaigns"""
|
|
17
|
+
|
|
18
|
+
@sp_endpoint('/st/campaigns', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
19
|
+
def create_campaigns(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
20
|
+
r"""
|
|
21
|
+
Creates Sponsored TV campaigns.
|
|
22
|
+
|
|
23
|
+
Request Body [Required]
|
|
24
|
+
| **campaigns** (list): 1 to 100 campaigns.
|
|
25
|
+
|
|
26
|
+
Keyword Args
|
|
27
|
+
|
|
28
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
29
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
ApiResponse with ``campaigns``: ``success`` and ``error`` lists.
|
|
33
|
+
"""
|
|
34
|
+
schema = 'application/vnd.stCampaign.v' + str(version) + '+json'
|
|
35
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
36
|
+
if prefer:
|
|
37
|
+
headers.update({'Prefer': prefer})
|
|
38
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
39
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
40
|
+
|
|
41
|
+
@sp_endpoint('/st/campaigns', method='PUT', headers=['Amazon-Advertising-API-Scope'])
|
|
42
|
+
def update_campaigns(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
43
|
+
r"""
|
|
44
|
+
Updates Sponsored TV campaigns.
|
|
45
|
+
|
|
46
|
+
Request Body [Required]
|
|
47
|
+
| **campaigns** (list): 1 to 100 campaigns, each with **campaignId**.
|
|
48
|
+
|
|
49
|
+
Keyword Args
|
|
50
|
+
|
|
51
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
52
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
53
|
+
|
|
54
|
+
Returns
|
|
55
|
+
ApiResponse with ``campaigns``: ``success`` and ``error`` lists.
|
|
56
|
+
"""
|
|
57
|
+
schema = 'application/vnd.stCampaign.v' + str(version) + '+json'
|
|
58
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
59
|
+
if prefer:
|
|
60
|
+
headers.update({'Prefer': prefer})
|
|
61
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
62
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
63
|
+
|
|
64
|
+
@sp_endpoint('/st/campaigns/delete', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
65
|
+
def delete_campaigns(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
66
|
+
r"""
|
|
67
|
+
Deletes Sponsored TV campaigns. The ids travel in the **body**.
|
|
68
|
+
|
|
69
|
+
Request Body [Required]
|
|
70
|
+
| **campaignIdFilter** (object) [required]: ``{"include": [campaignId, ...]}``.
|
|
71
|
+
|
|
72
|
+
Keyword Args
|
|
73
|
+
|
|
74
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
75
|
+
- ``prefer`` (str): ``return=representation``, optionally with ``include=extendedData``. [optional]
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
ApiResponse with ``campaigns``: ``success`` and ``error`` lists.
|
|
79
|
+
"""
|
|
80
|
+
schema = 'application/vnd.stCampaign.v' + str(version) + '+json'
|
|
81
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
82
|
+
if prefer:
|
|
83
|
+
headers.update({'Prefer': prefer})
|
|
84
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
85
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
86
|
+
|
|
87
|
+
@sp_endpoint('/st/campaigns/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
88
|
+
def list_campaigns(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
89
|
+
r"""
|
|
90
|
+
Lists Sponsored TV campaigns.
|
|
91
|
+
|
|
92
|
+
Request Body [Optional]
|
|
93
|
+
| **campaignIdFilter**, **fullFunnelCampaignIdFilter** (objects): each ``{"include": [...]}``.
|
|
94
|
+
| **nameFilter** (object): ``{"include": [...], "queryTermMatchType": BROAD_MATCH|EXACT_MATCH}``.
|
|
95
|
+
| **stateFilter**, **targetingTypeFilter**: each ``{"include": [...]}``.
|
|
96
|
+
| **maxResults** (int): 1 to 100.
|
|
97
|
+
| **nextToken** (string): pagination token.
|
|
98
|
+
|
|
99
|
+
Keyword Args
|
|
100
|
+
|
|
101
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
102
|
+
- ``prefer`` (str): ``include=extendedData``, optionally with ``return=representation``. [optional]
|
|
103
|
+
|
|
104
|
+
Returns
|
|
105
|
+
ApiResponse with the campaigns, ``nextToken`` and ``totalResults``.
|
|
106
|
+
"""
|
|
107
|
+
schema = 'application/vnd.stCampaign.v' + str(version) + '+json'
|
|
108
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
109
|
+
if prefer:
|
|
110
|
+
headers.update({'Prefer': prefer})
|
|
111
|
+
body = kwargs.pop('body', None)
|
|
112
|
+
return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Sponsored TV /st/creatives.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/creatives``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stCreative.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Creatives(Client):
|
|
14
|
+
r"""Sponsored TV - /st/creatives"""
|
|
15
|
+
|
|
16
|
+
@sp_endpoint('/st/creatives', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
17
|
+
def create_creatives(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
18
|
+
r"""
|
|
19
|
+
Creates Sponsored TV creatives.
|
|
20
|
+
|
|
21
|
+
Request Body [Required]
|
|
22
|
+
| **creatives** (list): each one with **adGroupId**, **assetId** and **assetVersion**.
|
|
23
|
+
|
|
24
|
+
Keyword Args
|
|
25
|
+
|
|
26
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
27
|
+
|
|
28
|
+
Returns
|
|
29
|
+
ApiResponse with ``creatives``: ``success`` and ``error`` lists.
|
|
30
|
+
"""
|
|
31
|
+
schema = 'application/vnd.stCreative.v' + str(version) + '+json'
|
|
32
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
33
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
34
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
35
|
+
|
|
36
|
+
@sp_endpoint('/st/creatives', method='PUT', headers=['Amazon-Advertising-API-Scope'])
|
|
37
|
+
def update_creatives(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
38
|
+
r"""
|
|
39
|
+
Updates Sponsored TV creatives.
|
|
40
|
+
|
|
41
|
+
Request Body [Required]
|
|
42
|
+
| **creatives** (list): each one with **creativeId**, **assetId** and **assetVersion**.
|
|
43
|
+
|
|
44
|
+
Keyword Args
|
|
45
|
+
|
|
46
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
47
|
+
|
|
48
|
+
Returns
|
|
49
|
+
ApiResponse with ``creatives``: ``success`` and ``error`` lists.
|
|
50
|
+
"""
|
|
51
|
+
schema = 'application/vnd.stCreative.v' + str(version) + '+json'
|
|
52
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
53
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
54
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
55
|
+
|
|
56
|
+
@sp_endpoint('/st/creatives/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
57
|
+
def list_creatives(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
58
|
+
r"""
|
|
59
|
+
Lists Sponsored TV creatives.
|
|
60
|
+
|
|
61
|
+
Request Body [Optional]
|
|
62
|
+
| **adGroupIdFilter**, **creativeIdFilter**, **fullFunnelCampaignIdFilter** (objects): each ``{"include": [...]}``.
|
|
63
|
+
| **maxResults** (int): 1 to 100.
|
|
64
|
+
| **nextToken** (string): pagination token.
|
|
65
|
+
|
|
66
|
+
Keyword Args
|
|
67
|
+
|
|
68
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
69
|
+
|
|
70
|
+
Returns
|
|
71
|
+
ApiResponse with the creatives, ``nextToken`` and ``totalResults``.
|
|
72
|
+
"""
|
|
73
|
+
schema = 'application/vnd.stCreative.v' + str(version) + '+json'
|
|
74
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
75
|
+
body = kwargs.pop('body', None)
|
|
76
|
+
return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Sponsored TV /st/creatives/moderations.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/creatives/moderations``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stCreativesModerations.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CreativesModerations(Client):
|
|
14
|
+
r"""Sponsored TV - /st/creatives/moderations"""
|
|
15
|
+
|
|
16
|
+
@sp_endpoint('/st/creatives/moderations/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
17
|
+
def list_creatives_moderations(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
18
|
+
r"""
|
|
19
|
+
Lists the moderation results of Sponsored TV creatives.
|
|
20
|
+
|
|
21
|
+
Request Body [Optional]
|
|
22
|
+
| **adGroupIdFilter**, **creativeIdFilter** (objects): each ``{"include": [...]}``.
|
|
23
|
+
| **locale** (string): locale of the moderation text.
|
|
24
|
+
| **maxResults** (int): 1 to 100.
|
|
25
|
+
| **nextToken** (string): pagination token.
|
|
26
|
+
|
|
27
|
+
Keyword Args
|
|
28
|
+
|
|
29
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
ApiResponse with the moderation results.
|
|
33
|
+
"""
|
|
34
|
+
schema = 'application/vnd.stCreativesModerations.v' + str(version) + '+json'
|
|
35
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
36
|
+
body = kwargs.pop('body', None)
|
|
37
|
+
return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
|
|
38
|
+
|
|
39
|
+
@sp_endpoint('/st/creatives/moderations/policyViolations/list', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
40
|
+
def list_creatives_moderations_policy_violations(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
41
|
+
r"""
|
|
42
|
+
Lists the policy violations found in the moderation of Sponsored TV creatives.
|
|
43
|
+
|
|
44
|
+
Request Body [Required]
|
|
45
|
+
| **adGroupIdFilter**, **creativeIdFilter** (objects): each ``{"include": [...]}``.
|
|
46
|
+
| **locale** (string): locale of the moderation text.
|
|
47
|
+
|
|
48
|
+
Keyword Args
|
|
49
|
+
|
|
50
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
ApiResponse with the policy violations.
|
|
54
|
+
"""
|
|
55
|
+
schema = 'application/vnd.stCreativesModerations.v' + str(version) + '+json'
|
|
56
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
57
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
58
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Sponsored TV /st/creatives/preview.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/creatives/preview``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stCreativesPreview.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CreativesPreview(Client):
|
|
14
|
+
r"""Sponsored TV - /st/creatives/preview"""
|
|
15
|
+
|
|
16
|
+
@sp_endpoint('/st/creatives/preview', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
17
|
+
def preview_creative(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
18
|
+
r"""
|
|
19
|
+
Previews a Sponsored TV creative.
|
|
20
|
+
|
|
21
|
+
Request Body [Required]
|
|
22
|
+
| **previewConfiguration** (object) [required].
|
|
23
|
+
| **creativeId** (string) [optional]: either this or **assetProperties**.
|
|
24
|
+
| **assetProperties** (object) [optional]: alternative to ``creativeId``; the two cannot be combined.
|
|
25
|
+
|
|
26
|
+
Keyword Args
|
|
27
|
+
|
|
28
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
29
|
+
|
|
30
|
+
Returns
|
|
31
|
+
ApiResponse with the preview.
|
|
32
|
+
"""
|
|
33
|
+
schema = 'application/vnd.stCreativesPreview.v' + str(version) + '+json'
|
|
34
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
35
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
36
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Sponsored TV /st/forecasts.
|
|
2
|
+
|
|
3
|
+
Contract: Sponsored TV 3.0, ``/st/forecasts``. Every route needs the profile
|
|
4
|
+
scope, so each one declares ``Amazon-Advertising-API-Scope``; the body media
|
|
5
|
+
type is ``stForecast.v<version>+json``.
|
|
6
|
+
|
|
7
|
+
``Prefer`` is not an identity header.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Forecasts(Client):
|
|
14
|
+
r"""Sponsored TV - /st/forecasts"""
|
|
15
|
+
|
|
16
|
+
@sp_endpoint('/st/forecasts', method='POST', headers=['Amazon-Advertising-API-Scope'])
|
|
17
|
+
def forecast(self, version: int = 1, prefer: str = '', **kwargs) -> ApiResponse:
|
|
18
|
+
r"""
|
|
19
|
+
Asks for a performance forecast of a Sponsored TV configuration.
|
|
20
|
+
|
|
21
|
+
Request Body [Required]
|
|
22
|
+
| **adGroup**, **campaign**, **creative** (objects).
|
|
23
|
+
| **ads** (list): 1 to 100 product ads.
|
|
24
|
+
| **locationTargetingClauses** (list).
|
|
25
|
+
|
|
26
|
+
Keyword Args
|
|
27
|
+
|
|
28
|
+
- ``version`` (int): media type version. Defaults to 1.
|
|
29
|
+
|
|
30
|
+
Returns
|
|
31
|
+
ApiResponse with the forecast.
|
|
32
|
+
"""
|
|
33
|
+
schema = 'application/vnd.stForecast.v' + str(version) + '+json'
|
|
34
|
+
headers = {'Accept': schema, 'Content-Type': schema}
|
|
35
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
36
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|