ari: User better nicknames for ARI operations

While working on building client libraries from the Swagger API, I
noticed a problem with the nicknames.

    channel.deleteChannel()
    channel.answerChannel()
    channel.muteChannel()

Etc. We put the object name in the nickname (since we were generating C
code), but it makes OO generators redundant.

This patch makes the nicknames more OO friendly. This resulted in a lot
of name changing within the res_ari_*.so modules, but not much else.

There were a couple of other fixed I made in the process.

 * When reversible operations (POST /hold, POST /unhold) were made more
   RESTful (POST /hold, DELETE /unhold), the path for the second operation
   was left in the API declaration. This worked, but really the two
   operations should have been on the same API.
 * The POST /unmute operation had still not been REST-ified.

Review: https://reviewboard.asterisk.org/r/2940/
........

Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
David M. Lee
2013-11-07 21:10:31 +00:00
parent cdfbc02df1
commit 7d0d1a1efb
41 changed files with 614 additions and 619 deletions

View File

@@ -14,7 +14,7 @@
{
"httpMethod": "GET",
"summary": "List recordings that are complete.",
"nickname": "getStoredRecordings",
"nickname": "listStored",
"responseClass": "List[StoredRecording]"
}
]
@@ -26,7 +26,7 @@
{
"httpMethod": "GET",
"summary": "Get a stored recording's details.",
"nickname": "getStoredRecording",
"nickname": "getStored",
"responseClass": "StoredRecording",
"parameters": [
{
@@ -48,7 +48,7 @@
{
"httpMethod": "DELETE",
"summary": "Delete a stored recording.",
"nickname": "deleteStoredRecording",
"nickname": "deleteStored",
"responseClass": "void",
"parameters": [
{
@@ -76,7 +76,7 @@
{
"httpMethod": "GET",
"summary": "List live recordings.",
"nickname": "getLiveRecording",
"nickname": "getLive",
"responseClass": "LiveRecording",
"parameters": [
{
@@ -98,7 +98,7 @@
{
"httpMethod": "DELETE",
"summary": "Stop a live recording and discard it.",
"nickname": "cancelRecording",
"nickname": "cancel",
"responseClass": "void",
"parameters": [
{
@@ -125,7 +125,7 @@
{
"httpMethod": "POST",
"summary": "Stop a live recording and store it.",
"nickname": "stopRecording",
"nickname": "stop",
"responseClass": "void",
"parameters": [
{
@@ -153,7 +153,7 @@
"httpMethod": "POST",
"summary": "Pause a live recording.",
"notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.",
"nickname": "pauseRecording",
"nickname": "pause",
"responseClass": "void",
"parameters": [
{
@@ -175,16 +175,11 @@
"reason": "Recording not in session"
}
]
}
]
},
{
"path": "/recordings/live/{recordingName}/unpause",
"operations": [
},
{
"httpMethod": "POST",
"httpMethod": "DELETE",
"summary": "Unpause a live recording.",
"nickname": "unpauseRecording",
"nickname": "unpause",
"responseClass": "void",
"parameters": [
{
@@ -216,7 +211,7 @@
"httpMethod": "POST",
"summary": "Mute a live recording.",
"notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.",
"nickname": "muteRecording",
"nickname": "mute",
"responseClass": "void",
"parameters": [
{
@@ -238,16 +233,11 @@
"reason": "Recording not in session"
}
]
}
]
},
{
"path": "/recordings/live/{recordingName}/unmute",
"operations": [
},
{
"httpMethod": "POST",
"httpMethod": "DELETE",
"summary": "Unmute a live recording.",
"nickname": "unmuteRecording",
"nickname": "unmute",
"responseClass": "void",
"parameters": [
{