Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions appstoreconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,28 +591,36 @@ 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 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)

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):
Expand All @@ -637,6 +645,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
Expand Down