コード例 #1
0
 def test(self):
     base_url = self.connection.server
     token = self.connection.token
     request_url = base_url + "usage"
     if token != "" and token != None:
         return utils.test_api(request_url, token)
     else:
         return {
             'response': {
                 'Errors': [{
                     'Error':
                     'This call requires a token to identify the requested account'
                 }]
             }
         }
コード例 #2
0
 def test(self):
     base_url = self.connection.server
     token = self.connection.token
     request_url = base_url + "usage"
     if token != "" and token != None:  # noqa: B105
         return utils.test_api(request_url, token)
     else:
         return {
             "response": {
                 "Errors": [{
                     "Error":
                     "This call requires a token to identify the requested account"
                 }]
             }
         }
コード例 #3
0
 def test(self):
     base_url = self.connection.server
     token = self.connection.token
     request_url = base_url + "lookup/blacklist/example.com"
     return utils.test_api(request_url, token)