Ruby / Plivo REST API / Stop play audio to a member
Back to Collection Items
require 'chilkat'
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = Chilkat::CkHttp.new()
http.put_BasicAuth(true)
http.put_Login("{{auth_id}}")
http.put_Password("password")
# resp is a CkHttpResponse
resp = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/Play/")
if (http.get_LastMethodSuccess() == false)
print http.lastErrorText() + "\n";
exit
end
print resp.get_StatusCode().to_s() + "\n";
print resp.bodyStr() + "\n";
Curl Command
curl -X DELETE
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/Play/
Postman Collection Item JSON
{
"name": "Stop play audio to a member",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Play/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Conference",
"{conference_name}",
"Member",
"{member_id}",
"Play",
""
]
},
"description": "This API will stop the file which is being played to a member initiated by the Play API\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/conference/member#stop-playing-audio-to-a-member)"
},
"response": [
{
"name": "Stop play audio to a member",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Play/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Conference",
"{conference_name}",
"Member",
"{member_id}",
"Play",
""
]
}
},
"code": 204,
"_postman_previewlanguage": "json",
"header": [
],
"cookie": [
],
"body": "{\n \"message\": \"playing in conference stopped\",\n \"member_id\": \"10\",\n \"api_id\": \"2867b6e2-58c3-11e1-86da-adf28403fe48\"\n}"
}
]
}