diff --git a/duniterpy/api/ws2p/network.py b/duniterpy/api/ws2p/network.py index e05c4652910334a86a8f6c5c426c6d41fb6800e2..d309fbe832973659c9da32b0ae2d8be26042137c 100644 --- a/duniterpy/api/ws2p/network.py +++ b/duniterpy/api/ws2p/network.py @@ -17,43 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. import logging -from duniterpy.api.client import Client - logger = logging.getLogger("duniter/network") -MODULE = "network" - -WS2P_HEADS_SCHEMA = { - "type": "object", - "properties": { - "heads": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": {"type": "string"}, - "sig": {"type": "string"}, - "messageV2": {"type": "string"}, - "sigV2": {"type": "string"}, - "step": {"type": "number"}, - }, - "required": ["message", "sig"], - }, - } - }, - "required": ["heads"], -} - - -def heads(client: Client): - """ - GET Certification data over a member - - :param client: Client to connect to the api - :rtype: dict - """ - return client.get(MODULE + "/ws2p/heads", schema=WS2P_HEADS_SCHEMA) - WS2P_CONNECT_MESSAGE_SCHEMA = { "type": "object", diff --git a/tests/api/ws2p/test_ws2p.py b/tests/api/ws2p/test_ws2p.py index c7a6a5adca96a3ce32f05ee71c6c71f2957b0288..7b191a7ff255ce7bf534cab17dec19dea653cfd7 100644 --- a/tests/api/ws2p/test_ws2p.py +++ b/tests/api/ws2p/test_ws2p.py @@ -21,7 +21,7 @@ import unittest import jsonschema from duniterpy.api.client import parse_text -from duniterpy.api.ws2p.network import WS2P_HEADS_SCHEMA +from duniterpy.api.bma.network import WS2P_HEADS_SCHEMA from duniterpy.api.ws2p.requests import ( BLOCK_RESPONSE_SCHEMA, ERROR_RESPONSE_SCHEMA,