AppleAPI
基于appstore connect api封装功能。
代码是基于OKAppleAPI原码。只是在原代码基础上,新增了部分接口,封装了些自用功能。
安装
pip3 install appleapi
用法
from AppleAPI import AppStore
if __name__ == '__main__':
issuer_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
key_id = 'XXXXXXXXXX'
key = """
-----BEGIN PRIVATE KEY-----
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXX
-----END PRIVATE KEY-----
"""
bundle_id = 'com.test.test.a.b'
name = 'Test'
email = 'test@test.com'
developer_name = 'Name'
country = 'US'
password = '123'
appstore_version = '1.0'
screenshots = {
'zh-Hans' : {
"APP_IPHONE_67" : "C:/Users/Administrator/Desktop/python/iPhone14PM-6.7",
}
}
devices = {
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx设备id' : '设备名称(可选),比如:iphone6s'
}
capabilitys = ['ASSOCIATED_DOMAINS']
app = AppStore(issuer_id, key_id, key, save_fold_name=email)
app.create_bundle_id(bundle_id=bundle_id, bundle_name=name, capabilitys=capabilitys)
app.add_devices(devices=devices)
app.create_certificate(is_dev=False, email=email, developer_name=developer_name, password=password, country=country)
app.create_profile(is_dev=False,bundle_id=bundle_id, name=name)
app.upload_screenshot(bundle_id=bundle_id, appstore_version=appstore_version, screenshots=screenshots)