Re: [In Development] RESTful API for LMS
philchillbill <philchillbill.a80qrz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
expectingtofly wrote:
> No, really, its essential. Its not a question of bending the rules. It
> needs to use the correct HTTP verb for the operation that you want on
> the resource, otherwise it just doesn't work.
It's your party, but
Code:
--------------------
GET /restapi//Players/{playerid}/status Gets the power status of a player
POST /restapi//Players/{playerid}/status Sets the the power status of a player
--------------------
can be just as easily done as
Code:
--------------------
GET /restapi//Players/{playerid}/status Gets the power status of a player
GET /restapi//Players/{playerid}/status=on Powers on a player
GET /restapi//Players/{playerid}/status=off Powers off a player
--------------------
That's what the Domoticz guys did. I know, I know, it's not RESTful, but
it's certainly useful and even noobs get it.
------------------------------------------------------------------------
philchillbill's Profile: http://forums.slimdevices.com/member.php?userid=68920
View this thread: http://forums.slimdevices.com/showthread.php?t=115143