Ejemplo n.º 1
0
 def GET(self, id=None, action=None):
     if id == None:
         return json.dumps(rpc_connections.keys())
     elif id in rpc_connections:
         # We have a connection
         if action in (None, 'balance',):
             return self._get_balance(rpc_connections[id])
         elif action == 'info':
             return self._get_info(rpc_connections[id])
         elif action == 'transactions':
             return self._get_transactions(rpc_connections[id])
         else:
             return util.make_error('API call not implemented')
     else:
         return util.make_error('RPC ID not found')
Ejemplo n.º 2
0
 def send(self):
     tmpl = lookup.get_template("send.html")
     out = tmpl.render(rpc_connections=rpc_connections.keys())
     return out