Removed long-unused code

This commit is contained in:
2016-08-05 16:09:33 +02:00
parent 3c39506014
commit 66c9200f0c

View File

@@ -73,26 +73,6 @@ class Api(object):
"""Generate new token by making a POST request
"""
return self.token
"""
path = "/tokens"
payload = {'username': self.username}
if self.token:
return self.token
else:
# If token is not set we do initial request with username and password
self.token = self.http_call(
utils.join_url(self.endpoint, path), "POST",
data=payload,
headers={
"Authorization": ("Basic {0}".format(self.basic_auth())),
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json",
"User-Agent": self.user_agent
})
return self.token
"""
def request(self, url, method, body=None, headers=None, files=None):
"""Make HTTP call, formats response and does error handling.