mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-09 13:19:28 +01:00
Added logging, updated apireference
This commit is contained in:
@@ -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¶meters[&optionalparameters]:
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user