Forum » Controlling a Last.fm Stream

Webservice Updated - New commands added, control.php API changed

 
    • RJ said...
    • Staff
    • 17 Jan 2005, 19:51

    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 :)

    Information wants to be beer.
    • superic said...
    • User
    • 17 Jan 2005, 20:06
    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!

    Edited by superic on 18 Jan 2005, 05:16
    • superic said...
    • User
    • 18 Jan 2005, 03:08

    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 :)


    What about a Creative Commons license?

    • RJ said...
    • Staff
    • 18 Jan 2005, 11:28

    session as a POST var

    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..

    Information wants to be beer.
    • kentaro said...
    • User
    • 18 Jan 2005, 12:10

    command as a POST var

    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

    Edited by kentaro on 18 Jan 2005, 12:12
    • RJ said...
    • Staff
    • 18 Jan 2005, 12:15
    Sorry about that, i'm editing this stuff as i test it out. Should be fixed now

    Information wants to be beer.
Anonymous users may not post messages. Please log in or create an account to post in the forums.