def get_dynamic_share_request_url(self, no_params=False): if no_params: return "/qrcodes/apps/{appid}".format(appid=self.sdk_id) return "/qrcodes/apps/{appid}?nonce={nonce}×tamp={timestamp}".format( appid=self.sdk_id, nonce=create_nonce(), timestamp=create_timestamp())
def get_activity_details_request_path(self, decrypted_request_token, no_params=False): if no_params: return "/profile/{0}".format(decrypted_request_token) return "/profile/{0}?nonce={1}×tamp={2}&appId={3}".format( decrypted_request_token, create_nonce(), create_timestamp(), self.sdk_id)
def __append_query_params(self, query_params=None): """ Appends supplied query params in a dict to default query params. Returns a url encoded query param string """ required = {"nonce": create_nonce(), "timestamp": create_timestamp()} query_params = self.__merge_dictionary(query_params, required) return "?{}".format(urlencode(query_params))
def get_aml_request_url(self, no_params=False): if no_params: return "/aml-check" return "/aml-check?appId={0}×tamp={1}&nonce={2}".format( self.sdk_id, create_timestamp(), create_nonce())
def get_sandbox_path(self): return "/apps/{sdk_id}/tokens?timestamp={timestamp}&nonce={nonce}".format( sdk_id=self.sdk_id, nonce=create_nonce(), timestamp=create_timestamp())