From 8293a0b0bda01d71c00c9fbea4a2c8e9dc6eedbc Mon Sep 17 00:00:00 2001 From: dmytrolutsyk Date: Thu, 10 Dec 2020 15:27:37 +0100 Subject: [PATCH 1/2] change list_app_store_info_localizations and add doc ref --- appstoreconnect/api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appstoreconnect/api.py b/appstoreconnect/api.py index d041025..09cb37e 100644 --- a/appstoreconnect/api.py +++ b/appstoreconnect/api.py @@ -603,7 +603,11 @@ def modify_app_store_version_localization(self, AppStoreVersionLocalizations, at return self._modify_resource(AppStoreVersionLocalizations, attributes) # appStoreInfo localization - def get_app_store_info_localization(self, app_information): + def list_app_store_info_localizations(self, app_information): + """ + :reference: https://developer.apple.com/documentation/appstoreconnectapi/list_all_app_info_localizations_for_an_app_info + :return: an iterator over AppInfoLocalization resources + """ full_url = BASE_API + f"/v1/appInfos/{app_information.id}/appInfoLocalizations" return self._get_resources(AppInfoLocalization, None, None, full_url) @@ -637,6 +641,7 @@ def read_app_category_info(self, app_category_id): return self._get_resource(AppCategory, app_category_id) # App info Resources + def modify_app_info(self, app_information: AppInfo, primaryCategory: str = None, secondaryCategory:str = None): """ :reference: https://developer.apple.com/documentation/appstoreconnectapi/modify_an_app_info From 97c11b6ed30ded0aa63cf4e660b05f3153b6d4a5 Mon Sep 17 00:00:00 2001 From: dmytrolutsyk Date: Thu, 10 Dec 2020 19:01:08 +0100 Subject: [PATCH 2/2] - change modify_app_store_info_localization and modify_app_store_version_localization parameters - add reference for list_app_store_version_localizations and list_app_store_info_localizations --- appstoreconnect/api.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/appstoreconnect/api.py b/appstoreconnect/api.py index 09cb37e..a9f7751 100644 --- a/appstoreconnect/api.py +++ b/appstoreconnect/api.py @@ -591,16 +591,20 @@ def get_build_info(self, build_id): return self._get_resource(Build, build_id) # appStoreVersions localization - def get_app_store_version_localizations(self, appstoreversion_id): - full_url = BASE_API + f"/v1/appStoreVersions/{appstoreversion_id}/appStoreVersionLocalizations" + def list_app_store_version_localizations(self, appstoreversion): + """ + :reference: https://developer.apple.com/documentation/appstoreconnectapi/list_all_app_store_version_localizations_for_an_app_store_version + :return: an iterator over AppStoreVersionLocalization resources + """ + full_url = BASE_API + f"/v1/appStoreVersions/{appstoreversion.id}/appStoreVersionLocalizations" return self._get_resources(AppStoreVersionLocalization, None, None, full_url) - def modify_app_store_version_localization(self, AppStoreVersionLocalizations, attributes): + def modify_app_store_version_localization(self, app_store_version_localization: AppStoreVersionLocalization, description: str, keywords: str, marketingUrl: str, promotionalText: str, supportUrl: str, whatsNew: str ): """ :reference: https://developer.apple.com/documentation/appstoreconnectapi/modify_an_app_store_version_localization :return: an iterator over AppInfoLocalization resources """ - return self._modify_resource(AppStoreVersionLocalizations, attributes) + return self._modify_resource(app_store_version_localization, locals()) # appStoreInfo localization def list_app_store_info_localizations(self, app_information): @@ -611,12 +615,12 @@ def list_app_store_info_localizations(self, app_information): full_url = BASE_API + f"/v1/appInfos/{app_information.id}/appInfoLocalizations" return self._get_resources(AppInfoLocalization, None, None, full_url) - def modify_app_store_info_localization(self, AppInfoLocalization, attributes): + def modify_app_store_info_localization(self, app_info_localization: AppInfoLocalization, name: str, privacyPolicyUrl: str, subtitle: str): """ :reference: https://developer.apple.com/documentation/appstoreconnectapi/modify_an_app_info_localization :return: an iterator over AppInfoLocalization resources """ - return self._modify_resource(AppInfoLocalization, attributes) + return self._modify_resource(app_info_localization, locals()) # App Metadata def modify_app_store_version(self, app_store_version: AppStoreVersion, versionString: str, copyright: str, build: Build = None):