appleappstoreconnectapi的python包装器
appstoreconnectapi的Python项目详细描述
应用商店连接API
这是围绕apple a p p store api的python包装器:https://developer.apple.com/documentation/appstoreconnectapi
到目前为止,它处理令牌生成/过期、列出资源和下载报告的方法。
安装
项目发布在pypi上,安装时使用:
pip install appstoreconnectapi
用法
请按照Apple documentation中有关如何生成api密钥的说明进行操作。
使用key id,key file和issuer id创建一个新的api实例:
fromappstoreconnectapiimportAppStoreConnectasc=AppStoreConnect(key_id,path_to_key_file,issuer_id)
下面是一些使用api的示例
# list all profilesprofiles=asc.getProfiles()printprofiles#list all certificatescertificates=asc.getCertificates()printprofiles#download profileasc.downloadProfile(profileID='xxxxx',saveFolderPath='./'):#download certificateasc.downloadCertificate(certificatID='xxxxx',saveFolderPath='./'):#other api,for example list all bundleids#method: get or postres=asc.fetch(uri='/v1/bundleIds',method='get',post_data=None)printres
更多API转到https://developer.apple.com/documentation/appstoreconnectapi