def create_profile(self, url: str, name, type, bundle_id, cerificate_id, devices): params = { 'data': { 'attributes': { 'name': name, 'profileType': type }, 'relationships': { 'bundleId': { 'data': { 'id': bundle_id, 'type': 'bundleIds' } }, 'certificates': { 'data': [{ 'id': cerificate_id, 'type': 'certificates' }] }, }, 'type': 'profiles' } } # App Store profile must not include devices relationship if type != 'IOS_APP_STORE': params['data']['relationships']['devices'] = {'data': devices} connectool.prints(url) connectool.prints(params) return netmanager.post(url, params=params, header=self.__header)
def register_certificate(self, url: str, csr, type): connectool.prints(url) params = { 'data': { 'attributes': { 'certificateType': type, 'csrContent': csr }, 'type': 'certificates' } } connectool.prints(params) return netmanager.post(url, params=params, header=self.__header)
def create_profile(self,url:str,name,type,bundle_id,cerificate_id,devices): params = {'data':{ 'attributes':{'name':name,'profileType':type}, 'relationships':{ 'bundleId':{'data':{'id':bundle_id,'type':'bundleIds'}}, 'certificates':{'data':[{'id':cerificate_id,'type':'certificates'}]}, 'devices':{'data':devices}}, 'type':'profiles' } } connectool.prints(url) connectool.prints(params) return netmanager.post(url,params=params,header=self.__header)
def register_device(self, url: str, name, udid): params = { 'data': { 'attributes': { 'name': name, 'udid': udid, 'platform': 'IOS' }, 'type': 'devices' } } connectool.prints(url) connectool.prints(params) return netmanager.post(url, params=params, header=self.__header)
def register_bundle_id(self, url: str, bundle_id, team_id, name): params = { 'data': { 'attributes': { 'identifier': bundle_id, 'name': name, 'platform': 'IOS', 'seedId': team_id }, 'type': 'bundleIds' } } connectool.prints(url) connectool.prints(params) return netmanager.post(url, params=params, header=self.__header)
def create_app_version( self, url: str, app_id, version_string, platform='IOS', # required fields release_type='MANUAL', copyright=None, build_id=None, earliest_release_date=None, uses_idfa=False): params = { "data": { "relationships": { "app": { "data": { "id": app_id, "type": "apps" } } }, "attributes": { "versionString": version_string, "platform": platform, "releaseType": release_type, "earliestReleaseDate": earliest_release_date, "usesIdfa": uses_idfa }, "type": "appStoreVersions" } } if copyright != None: params['data']['attributes']['copyright'] = copyright # Add build relationship if there is a build ID if build_id != None: params['data']['relationships']['build'] = { "data": { "id": build_id, "type": "builds" } } return netmanager.post(url, params=params, header=self.__header)