Skip to content
This repository has been archived by the owner. It is now read-only.
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 502 Bytes
local API = require('api')
local class = require('middleclass')
local api = API()
local Peer = class('Peer')
function Peer:get_peer(ip, port)
-- Get a single peer.
-- :param ip: Valid IP of the peer.
-- :param port: Valid port of the peer.
return api:get("api/peers/get", {ip=ip, port=port})
function Peer:get_peers()
-- Get all peers.
return api:get("api/peers")
function Peer:get_peer_version()
-- Get the peer version.
return api:get("api/peers/version")
return Peer
You can’t perform that action at this time.