Added logging, updated apireference

This commit is contained in:
rembo10
2012-03-27 15:40:03 +01:00
parent b057a1add5
commit bbba22f911
2 changed files with 2 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ reasonably functional. There are no error codes yet,
General structure:
http://localhost:8181 + HTTP_ROOT + /api?apikey=$apikey&cmd=$command
Data returned in json format
Data returned in json format. If executing a command like "delArtist" or "addArtist" you'll get back an "OK", else, you'll get the data you requested
$commands&parameters[&optionalparameters]:

View File

@@ -61,6 +61,7 @@ class Api(object):
def fetchData(self):
if self.data == 'OK':
logger.info('Recieved API command: ' + self.cmd)
methodToCall = getattr(self, "_" + self.cmd)
result = methodToCall(**self.kwargs)