async def history(connection, pubkey): """ Get transactions history of public key :param duniterpy.api.bma.ConnectionHandler connection: Connection handler instance :param str pubkey: Public key :rtype: dict """ client = API(connection, URL_PATH) r = await client.requests_get('/history/%s' % pubkey) return await parse_response(r, HISTORY_SCHEMA)
def test_reverse_url_only_ipv4(self): endpoint = BMAEndpoint(None, "124.2.2.1", None, 9092) api = API(next(endpoint.conn_handler()), "any") self.assertEqual(api.reverse_url("http", "/test/url"), "http://124.2.2.1:9092/any/test/url")