Пример #1
0
 def register_bundle_id(cls, bundle_id, team_id, name):
     result = ConnectManager().register_bundle_id(
         ConnectApi.connect_api_bundle_ids.value[0], bundle_id, team_id,
         name)
     if result['status'] == 201:
         return {'status': 200, 'data': result['data']}
     return result
Пример #2
0
 def register_certificate(cls,out_path,csr_path,type):
     csr = Certificate.get_certSigningRequest(path=csr_path)
     result = ConnectManager().register_certificate(ConnectApi.connect_api_certificates.value[0],csr,type=type)
     if result['status'] == 201:
         res = result["data"]['data']
         file_path = os.path.join(out_path,res['id']+'.cer')
         decode_content = connectool.base64decode(res['attributes']['certificateContent'])
         connectool.saveByteFile(decode_content,file_path)
         return {'status':200,'path':file_path,'data':result['data']}
     return result
Пример #3
0
 def create_profile(cls, name, bundle_id, certificate_id, devices, type,
                    out_path):
     result = ConnectManager().create_profile(
         ConnectApi.connect_api_profiles.value[0],
         name=name,
         bundle_id=bundle_id,
         cerificate_id=certificate_id,
         devices=devices,
         type=type)
     if result['status'] == 201:
         res = result['data']['data']['attributes']
         path = os.path.join(out_path, res['name'] + '.mobileprovision')
         decode_content = connectool.base64decode(res['profileContent'])
         connectool.saveByteFile(decode_content, path)
         return {
             'status': 200,
             'data': result['data']['data'],
             'path': path
         }
     return result
Пример #4
0
 def create_app_version(cls,
                        app_id,
                        version_string,
                        platform='IOS',
                        release_type='MANUAL',
                        copyright=None,
                        build_id=None,
                        earliest_release_date=None,
                        uses_idfa=False):
     result = ConnectManager().create_app_version(
         ConnectApi.connect_api_app_versions.value[0],
         app_id=app_id,
         version_string=version_string,
         platform=platform,
         release_type=release_type,
         copyright=copyright,
         build_id=build_id,
         earliest_release_date=earliest_release_date,
         uses_idfa=uses_idfa)
     if result['status'] == 201:
         return {'status': 200, 'data': result['data']}
     return result
Пример #5
0
 def get_bundle_id_profiles(cls, id):
     return ConnectManager().get_bundle_id_profiles(
         ConnectApi.connect_api_bundle_ids.value[0], id)
Пример #6
0
 def delete_bundle_id(cls, id):
     return ConnectManager().delete_bundle_id(
         ConnectApi.connect_api_bundle_ids.value[0], id)
Пример #7
0
 def list_bundle_ids(cls, limit, sort):
     return ConnectManager().list_bundle_ids(
         ConnectApi.connect_api_bundle_ids.value[0], limit, sort)
Пример #8
0
 def __init__(self, api_key, issuer_id, private_path=None, timeout=15):
     token_object = ConnectToken(api_key,
                                 issuer_id,
                                 key_path=private_path,
                                 timeout=timeout)
     ConnectManager().tokenConfig = token_object
Пример #9
0
 def list_devices(cls, limit, sort):
     result = ConnectManager().list_devices(
         ConnectApi.connect_api_devices.value[0], limit, sort)
     if result['status'] == 200:
         return {'status': 200, 'data': result['data']['data']}
     return result
Пример #10
0
 def get_app_version_localizations(cls, id):
     return ConnectManager().get_app_version_localizations(
         ConnectApi.connect_api_app_versions.value[0], id)
Пример #11
0
 def request_profile(cls, id):
     return ConnectManager().request_profile(
         ConnectApi.connect_api_profiles.value[0], id)
Пример #12
0
 def list_profiles(cls, limit, sort):
     return ConnectManager().list_profiles(
         ConnectApi.connect_api_profiles.value[0], limit=limit, sort=sort)
Пример #13
0
 def delete_profile(cls, id):
     return ConnectManager().delete_profile(
         ConnectApi.connect_api_profiles.value[0], id)
Пример #14
0
 def list_cerificate(cls,limit,sort):
     return ConnectManager().list_certificates(ConnectApi.connect_api_certificates.value[0],limit,sort)
Пример #15
0
 def delete_certificate(cls,id):
     return ConnectManager().delete_certificate(ConnectApi.connect_api_certificates.value[0],id)
Пример #16
0
 def list_apps(cls, limit, sort, filter_bundle_id=None):
     return ConnectManager().list_apps(ConnectApi.connect_api_apps.value,
                                       limit, sort, filter_bundle_id)
Пример #17
0
 def get_app_versions(cls, id):
     return ConnectManager().get_app_versions(
         ConnectApi.connect_api_apps.value, id)
Пример #18
0
 def regist_device(cls, name, udid):
     return ConnectManager().register_device(
         ConnectApi.connect_api_devices.value[0], name, udid)