Webservice Updated - New commands added, control.php API changed
Slight update to the webservice.
"rtp" and "nortp" options in control.php let you set the "record to profile" status - whether or not listens and actions are logged to your profile.
control.php and tune.php now require HTTP POST requests instead of GET requests. This might be a bit more of a pain from a programming perspective, but it is semantically better. GET is still accepted for now, but GET variables will be ignored when the webservice goes live officially. (eg, moves to ws.audioscrobbler.com)
Feel free to post any apps/code you produce in this forum for other people who are experimenting with the w/s to try out - but i want to avoid wider distribution until the ws is considered stable. I also need to write a simple license agreement for the webservices.. This will basically say: "Non-commercial use only, and don't abuse it". If anyone can point me to a suitable license i can alter for our purposes that would be appreciated :)
I'll update my client tonight and post a beta for people to mess with :-)
Thanks RJ!
EDIT: Now I'm getting this error with post :-(
<b>Notice</b>: Undefined index: session in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/include/radio_session.php</b> on line <b>3</b><br />nERROR=Malformed session
RE-EDIT: Well, that error is because my POST vars are never making it to the server. I've spent about 4 hours trying to debug this! Awk! GET works fine but POST won't work!
Re: Webservice Updated - New commands added, control.php API changed
Quoth RJ:
I also need to write a simple license agreement for the webservices.. This will basically say: "Non-commercial use only, and don't abuse it". If anyone can point me to a suitable license i can alter for our purposes that would be appreciated :)
Whoops, sorry for wasting your time with the session as a post var problem.... session is now accepted as a POST var too :)
Session code was in a different file and i had neglected to change it to accept POST..
It seems there is a problem in handling the 'command' parameter. The response after issuing a command with any 'command' parameter:
<br />
<b>Notice</b>: Undefined index: command in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/control.php</b> on line <b>11</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/control.php:11) in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/control.php</b> on line <b>34</b><br />
response=FAILED
Webservice Updated - New commands added, control.php API changed