logos-sdk 0.0.25.dev6__tar.gz → 0.0.25.dev7__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.
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/MicrosoftAdvertising.py +47 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk.egg-info/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/LICENSE +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/README.md +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/__init__.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/big_query/BigQuery.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/big_query/__init__.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/logging/LogosLogger.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/logging/__init__.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/CampaignManager.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/Collabim.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/DV360.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/Facebook.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/GoogleAds.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/GoogleSheets.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/MarketMiner.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/MerchantCenter.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/Sklik.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk/services/__init__.py +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk.egg-info/SOURCES.txt +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk.egg-info/dependency_links.txt +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk.egg-info/requires.txt +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/logos_sdk.egg-info/top_level.txt +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/setup.cfg +0 -0
- {logos_sdk-0.0.25.dev6 → logos_sdk-0.0.25.dev7}/setup.py +0 -0
|
@@ -25,6 +25,7 @@ class MicrosoftAdvertising:
|
|
|
25
25
|
self._GET_ACCESSIBLE_ACCOUNTS = self._URL + "/accessible-accounts"
|
|
26
26
|
self._GET_DESTINATION_URL_REPORT = self._URL + "/destination-url-report"
|
|
27
27
|
self._GET_CAMPAIGN_PERFORMANCE_REPORT = self._URL + "/campaign-performance-report"
|
|
28
|
+
self._GET_GEOGRAPHIC_PERFORMANCE_REPORT = self._URL + "/geographic-performance-report"
|
|
28
29
|
self._GET_BUDGET_SUMMARY_REPORT = self._URL + "/budget-summary-report"
|
|
29
30
|
|
|
30
31
|
def get_destination_url_report(
|
|
@@ -74,6 +75,52 @@ class MicrosoftAdvertising:
|
|
|
74
75
|
else:
|
|
75
76
|
raise MicrosoftAdvertisingException(response.content)
|
|
76
77
|
|
|
78
|
+
def get_geographic_report(
|
|
79
|
+
self,
|
|
80
|
+
account_id: str,
|
|
81
|
+
secret_id: str,
|
|
82
|
+
date_from: str,
|
|
83
|
+
date_to: str,
|
|
84
|
+
report_columns: List[str],
|
|
85
|
+
entity_statuses: dict = None,
|
|
86
|
+
) -> List:
|
|
87
|
+
"""
|
|
88
|
+
Calls endpoint for getting geographic stats
|
|
89
|
+
https://learn.microsoft.com/en-us/advertising/reporting-service/geographicperformancereportrequest?view=bingads-13&tabs=xml
|
|
90
|
+
:param account_id: The ID of the account in Microsoft Advertising
|
|
91
|
+
:param secret_id: The ID of the secret in secret manager
|
|
92
|
+
:param date_from: The date we want the report to start from. Must be before date to
|
|
93
|
+
:param date_to: The date we want the report to end at
|
|
94
|
+
:param report_columns: stats we want included in the report
|
|
95
|
+
:param entity_statuses: dict containing status ad_group_status, campaign_status and account_status
|
|
96
|
+
:return: List of campaigns and their geographic stats
|
|
97
|
+
"""
|
|
98
|
+
if entity_statuses is None:
|
|
99
|
+
entity_statuses = {
|
|
100
|
+
"ad_group_status": EntityStatus.ACTIVE,
|
|
101
|
+
"campaign_status": EntityStatus.ACTIVE,
|
|
102
|
+
"account_status": EntityStatus.ACTIVE,
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
body = {
|
|
106
|
+
"account_id": account_id,
|
|
107
|
+
"secret_id": secret_id,
|
|
108
|
+
"date_from": date_from,
|
|
109
|
+
"date_to": date_to,
|
|
110
|
+
"report_columns": report_columns,
|
|
111
|
+
} | entity_statuses
|
|
112
|
+
|
|
113
|
+
header = get_headers(self._GET_GEOGRAPHIC_PERFORMANCE_REPORT)
|
|
114
|
+
response = request(
|
|
115
|
+
"post", url=self._GET_GEOGRAPHIC_PERFORMANCE_REPORT, json=body, headers=header
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
if response.status_code == HTTPStatus.OK:
|
|
119
|
+
service_response = response.json()
|
|
120
|
+
return service_response["data"]
|
|
121
|
+
else:
|
|
122
|
+
raise MicrosoftAdvertisingException(response.content)
|
|
123
|
+
|
|
77
124
|
def get_campaign_performance_report(
|
|
78
125
|
self,
|
|
79
126
|
account_id: str,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|