def get_peer_statistic(peer_ip): """ Get one peer's message statistic, include sending and receiving. **Example request** .. sourcecode:: http GET /v1/peer/10.124.1.245/statistic HTTP/1.1 Host: example.com Accept: application/json **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Vary: Accept Content-Type: text/json { "receive": { "Keepalives": 3, "Notifications": 0, "Opens": 1, "Route Refresh": 0, "Updates": 5 }, "send": { "Keepalives": 3, "Notifications": 0, "Opens": 1, "Route Refresh": 0, "Updates": 0 } } :param peer_ip: peer ip address :status 200: the api can work. """ return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))
def get_peer_statistic(peer_ip): """ Get one peer's message statistic, include sending and receiving. """ return flask.jsonify(api_utils.get_peer_msg_statistic(peer_ip))