HandleRequest
From DriveCast Wiki
Contents |
Overview
handleRequest is a method of the Drivecast API PHP Libraries, made to send requests to the Drivecast Server API.
Constructor
handleRequest($resource, $method, $postData, $xml)
Parameters
$resource
The type of resource requested
Values
- "feed"
- "feed/<DEVICE_NAME>"
- "feed/<DEVICE_NAME>/<SERIAL>"
- "playlist"
- "playlist/<PLAYLIST_NAME>"
- "library"
- "library/<UID>"
- "recording"
- "recording/<UID>"
- "podcast"
- "podcast/<UID>"
- "thumbnail/<UID>"
If you are using the Drivecast API 2.0 (we recommend to use it) you can also request:
- "device"
- "device/<DEVICE_NAME>"
- "dcst/recording/<RECORDING_UID>"
- "dcst/podcast/<PODCAST_UID>"
$method
The action to perform
Values
- "read"
- "create"
- "delete"
- "modify"
$postData (optional)
Required to perform "create" and "modify" actions
$xml (optional, not implemented yet)
Values
- true
- false (default)
If set to true, the response will be in the XML format.
