コード例 #1
0
 def deactivate(self, address):
     validate_address(address)
     res = requests.delete(base('ethereum-scaffolds/' + address),
                           headers=merge_headers(
                               [CONTENT_JSON, self.headers]))
     raise_for_error(res)
     return res.json()
コード例 #2
0
 def deploy(self, data):
     res = requests.post(base('ethereum-scaffolds/doDeploy'),
                         json=data,
                         headers=merge_headers([CONTENT_JSON,
                                                self.headers]))
     raise_for_error(res)
     return res.json()
コード例 #3
0
 def get_transactions(self, address):
     validate_address(address)
     res = requests.get(base('ethereum-scaffolds/' + address +
                             '/transactions'),
                        headers=self.headers)
     raise_for_error(res)
     return res.json()
コード例 #4
0
 def update(self, address, holder_address, data):
     validate_address(address)
     res = requests.put(base('ethereum-scaffolds/' + address + '/holders/' +
                             holder_address),
                        json=data,
                        headers=merge_headers([CONTENT_JSON, self.headers]))
     raise_for_error(res)
     return res.json()
コード例 #5
0
 def set_webhook(self, address, data):
     validate_address(address)
     res = requests.patch(base('ethereum-scaffolds/' + address),
                          json=data,
                          headers=merge_headers(
                              [CONTENT_JSON, self.headers]))
     raise_for_error(res)
     return res.json()
コード例 #6
0
 def get_quota(self):
     res = requests.get(base('ethereum-scaffolds/quota'),
                        headers=self.headers)
     raise_for_error(res)
     return res.json()
コード例 #7
0
 def get_single(self, address):
     validate_address(address)
     res = requests.get(base('ethereum-scaffolds/' + address),
                        headers=self.headers)
     raise_for_error(res)
     return res.json()