Пример #1
0
def cli(ctx, apikey, issuer_id,privatekey_path):
    '''
    app store connect api cli with python use apikey private_key and issuer_id to authorize
    
    how to get apikey,private_key and issuer_id ? https://developer.apple.com/documentation/appstoreconnectapi
    '''
    
    if privatekey_path:
        if apikey in privatekey_path:
            ctx.obj = ConnectApi(apikey,issuer_id,privatekey_path)
        else:
            connectool.raiseError('private key path error apikey '+apikey+' not in '+privatekey_path)
    else:
        ctx.obj = ConnectApi(apikey,issuer_id,privatekey_path)
Пример #2
0
cli.add_command(downloadcerts)

cli.add_command(registerbundleid)
cli.add_command(bundleids)
cli.add_command(deletebundleid)
cli.add_command(getbundleid)
cli.add_command(getbundleidprofiles)

cli.add_command(createprofile)
cli.add_command(deleteprofile)
cli.add_command(profiles)
cli.add_command(requestprofile)

if __name__ == '__main__':
    cli()
    api = ConnectApi('T5VR6D3TZY', '5127e6a3-99ef-458f-9ea3-ba6b76e9cc13')

    devices = api.list_devices(limit=1)
    print(devices)

    result = api.register_device('test', 'test')
    print(result)

    result = api.register_certificate(
        csr_path=
        '/Users/last/Desktop/CertificateSigningRequest.certSigningRequest')
    print(result)

    result = api.delete_certificate('N9P79WJTHK')
    print(result)
Пример #3
0
cli.add_command(deletebundleid)
cli.add_command(getbundleid)
cli.add_command(getbundleidprofiles)

cli.add_command(createprofile)
cli.add_command(deleteprofile)
cli.add_command(profiles)
cli.add_command(requestprofile)
cli.add_command(downloadprofiles)

cli.add_command(apps)
cli.add_command(getappversions)

if __name__ == '__main__':
    cli()
    api = ConnectApi('T5VR6D3TZY', '5127e6a3-99ef-458f-9ea3-ba6b76e9cc13')

    devices = api.list_devices(limit=1)
    print(devices)

    result = api.register_device('test', 'test')
    print(result)

    result = api.register_certificate(
        csr_path=
        '/Users/last/Desktop/CertificateSigningRequest.certSigningRequest')
    print(result)

    result = api.delete_certificate('N9P79WJTHK')
    print(result)