logos-sdk 0.0.25.dev5__tar.gz → 0.0.25.dev6__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.dev5 → logos_sdk-0.0.25.dev6}/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/MerchantCenter.py +31 -17
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk.egg-info/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/LICENSE +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/README.md +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/__init__.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/big_query/BigQuery.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/big_query/__init__.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/logging/LogosLogger.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/logging/__init__.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/CampaignManager.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/Collabim.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/DV360.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/Facebook.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/GoogleAds.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/GoogleSheets.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/MarketMiner.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/MicrosoftAdvertising.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/Sklik.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk/services/__init__.py +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk.egg-info/SOURCES.txt +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk.egg-info/dependency_links.txt +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk.egg-info/requires.txt +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/logos_sdk.egg-info/top_level.txt +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/setup.cfg +0 -0
- {logos_sdk-0.0.25.dev5 → logos_sdk-0.0.25.dev6}/setup.py +0 -0
|
@@ -37,7 +37,7 @@ class MerchantCenterService:
|
|
|
37
37
|
raise MerchantServiceException(response.content)
|
|
38
38
|
|
|
39
39
|
def list_account_statuses(
|
|
40
|
-
|
|
40
|
+
self, merchant_account_id: str, account_id: str, secret_id: str
|
|
41
41
|
):
|
|
42
42
|
"""
|
|
43
43
|
Retrieves the statuses of a Merchant Center account.
|
|
@@ -62,21 +62,35 @@ class MerchantCenterService:
|
|
|
62
62
|
else:
|
|
63
63
|
raise MerchantServiceException(response.content)
|
|
64
64
|
|
|
65
|
-
def list_products(self, merchant_account_id: str, secret_id: str):
|
|
65
|
+
def list_products(self, merchant_account_id: str, secret_id: str, page_size: int = 250):
|
|
66
66
|
"""
|
|
67
67
|
Lists the products in your Merchant Center account
|
|
68
68
|
:param merchant_account_id: The ID of the managing account. This account cannot be a multi-client account
|
|
69
69
|
:param secret_id: The ID of the secret in secret manager
|
|
70
|
+
:param page_size: size of the page
|
|
70
71
|
:return: List[Dict]
|
|
71
72
|
"""
|
|
72
|
-
body = {"merchant_account_id": merchant_account_id, "secret_id": secret_id}
|
|
73
|
+
body = {"merchant_account_id": merchant_account_id, "secret_id": secret_id, "page_size": page_size}
|
|
73
74
|
header = get_headers(self._LIST_PRODUCTS)
|
|
74
75
|
response = request("post", url=self._LIST_PRODUCTS, json=body, headers=header)
|
|
76
|
+
|
|
77
|
+
if response.status_code != HTTPStatus.OK:
|
|
78
|
+
raise MerchantServiceException(response.content)
|
|
79
|
+
|
|
75
80
|
service_response = response.json()
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
yield service_response["data"]["results"]
|
|
82
|
+
|
|
83
|
+
while service_response["data"]["nextPageToken"] is not None:
|
|
84
|
+
body["page_token"] = service_response["data"]["nextPageToken"]
|
|
85
|
+
response = request(
|
|
86
|
+
"post", url=self._LIST_PRODUCTS, json=body, headers=header
|
|
87
|
+
)
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
if response.status_code != HTTPStatus.OK:
|
|
90
|
+
raise MerchantServiceException(response.content)
|
|
91
|
+
|
|
92
|
+
service_response = response.json()
|
|
93
|
+
yield service_response["data"]["results"]
|
|
80
94
|
|
|
81
95
|
def list_products_statuses(self, merchant_account_id: str, secret_id: str):
|
|
82
96
|
"""
|
|
@@ -99,12 +113,12 @@ class MerchantCenterService:
|
|
|
99
113
|
raise MerchantServiceException(response.content)
|
|
100
114
|
|
|
101
115
|
def reports_search(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
self,
|
|
117
|
+
merchant_account_id: str,
|
|
118
|
+
secret_id: str,
|
|
119
|
+
query: str,
|
|
120
|
+
page_token: str = None,
|
|
121
|
+
page_size: int = 1000,
|
|
108
122
|
):
|
|
109
123
|
body = {
|
|
110
124
|
"merchant_account_id": merchant_account_id,
|
|
@@ -123,11 +137,11 @@ class MerchantCenterService:
|
|
|
123
137
|
raise MerchantServiceException(response.content)
|
|
124
138
|
|
|
125
139
|
def reports_search_generator(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
self,
|
|
141
|
+
merchant_account_id: str,
|
|
142
|
+
secret_id: str,
|
|
143
|
+
query: str,
|
|
144
|
+
page_size: int = 1000,
|
|
131
145
|
):
|
|
132
146
|
body = {
|
|
133
147
|
"merchant_account_id": merchant_account_id,
|
|
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
|