def authenticate_request(self): accessToken=ZCRMConfigUtil.get_instance().get_access_token() if(self.request_headers==None): self.request_headers={APIConstants.AUTHORIZATION:APIConstants.OAUTH_HEADER_PREFIX+accessToken} else: self.request_headers[APIConstants.AUTHORIZATION]=APIConstants.OAUTH_HEADER_PREFIX+accessToken self.request_headers['User-Agent']='ZohoCRM Python SDK'
def initialize(): ZCRMConfigUtil.initialize(True)
def initialize(config_dict=None): ZCRMConfigUtil.initialize(True, config_dict)
def construct_api_url(self): hit_sand_box = ZCRMConfigUtil.config_prop_dict['sandbox'] base_url = ZCRMConfigUtil.get_api_base_url().replace( 'www', 'sandbox') if hit_sand_box.lower( ) == 'true' else ZCRMConfigUtil.get_api_base_url() self.url = base_url + "/crm/" + ZCRMConfigUtil.get_api_version() + "/"