@daemux/store-automator 0.10.25 → 0.10.26
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.
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "App Store & Google Play automation for Flutter apps",
|
|
8
|
-
"version": "0.10.
|
|
8
|
+
"version": "0.10.26"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "store-automator",
|
|
13
13
|
"source": "./plugins/store-automator",
|
|
14
14
|
"description": "3 agents for app store publishing: reviewer, meta-creator, media-designer",
|
|
15
|
-
"version": "0.10.
|
|
15
|
+
"version": "0.10.26",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"flutter",
|
|
18
18
|
"app-store",
|
package/package.json
CHANGED
|
@@ -97,20 +97,28 @@ def get_subscription_prices(headers: dict, sub_id: str) -> list:
|
|
|
97
97
|
def get_price_points_for_territory(
|
|
98
98
|
headers: dict, sub_id: str, territory: str,
|
|
99
99
|
) -> list:
|
|
100
|
-
"""Get available price points for a subscription in a given territory.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
"""Get all available price points for a subscription in a given territory.
|
|
101
|
+
|
|
102
|
+
Uses limit=200 (ASC API max) and follows pagination links to ensure
|
|
103
|
+
higher price tiers (e.g. $9.99, $69.99) beyond the first page are included.
|
|
104
|
+
"""
|
|
105
|
+
url: str | None = f"{BASE_URL}/subscriptions/{sub_id}/pricePoints"
|
|
106
|
+
params: dict | None = {
|
|
107
|
+
"filter[territory]": territory,
|
|
108
|
+
"include": "territory",
|
|
109
|
+
"limit": 200,
|
|
110
|
+
}
|
|
111
|
+
all_points: list = []
|
|
112
|
+
while url:
|
|
113
|
+
resp = requests.get(url, headers=headers, params=params, timeout=TIMEOUT)
|
|
114
|
+
if not resp.ok:
|
|
115
|
+
print_api_errors(resp, f"get price points for {territory}")
|
|
116
|
+
return all_points
|
|
117
|
+
data = resp.json()
|
|
118
|
+
all_points.extend(data.get("data", []))
|
|
119
|
+
url = data.get("links", {}).get("next")
|
|
120
|
+
params = None # next URL already contains query parameters
|
|
121
|
+
return all_points
|
|
114
122
|
|
|
115
123
|
|
|
116
124
|
def find_price_point_by_amount(
|