<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2940/">https://reviewboard.asterisk.org/r/2940/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Cool, I ran into the same issue while doing python-ari. Below are some suggestions / recommendation on how I named things.
But in general, I think we should use something like the following
get (single)
create (POST)
delete (DELETE)
list (multiple)
add (toggle)
remove (toggle)
addSomething (toggle)
removeSomething (toggle)
Thoughts?
</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47294#file47294line17" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/applications.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">17</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"getA<span class="hl">pplications</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">17</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"getA<span class="hl">ll</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">what about list?</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47296#file47296line17" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/bridges.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">17</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"get<span class="hl">Bridges</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">17</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"get<span class="hl">All</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">same comment... I'll skip the rest.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47296#file47296line76" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/bridges.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">76</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"de<span class="hl">leteBridge</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">76</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"de<span class="hl">stroy</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I prefer delete to destory, seems less violent.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47296#file47296line208" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/bridges.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">208</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">mohS</span>tart<span class="hl">Bridge</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">208</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">s</span>tart<span class="hl">Moh</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This might be for another review, but what about just addMusic?
moh is not very description and add to the fact we already have a hold function.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47296#file47296line249" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/bridges.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">249</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">mohS</span>top<span class="hl">Bridge</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">243</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">s</span>top<span class="hl">Moh</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">removeMusic</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47297#file47297line131" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/channels.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">131</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">deleteC</span>han<span class="hl">nel</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">131</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"han<span class="hl">gup</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">would rather keep this as delete to keep things consistent. Otherwise, we should move this to the /hangup action.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47297#file47297line410" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/channels.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">410</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"hold<span class="hl">Channel</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">404</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"hold"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">We see to flip flop between hold / unhold and addChannel / removeChannel. What about just using add / remove everywhere?
addHold / removeHold seems more consistent </pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2940/diff/1/?file=47297#file47297line475" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/rest-api/api-docs/channels.json</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">475</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">mohS</span>tart<span class="hl">Channel</span>"</span><span class="p">,</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">463</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="nt">"nickname"</span><span class="p">:</span> <span class="s2">"<span class="hl">s</span>tart<span class="hl">Moh</span>"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">same comment as above</pre>
</div>
<br />
<p>- Paul</p>
<br />
<p>On October 18th, 2013, 9:09 p.m. UTC, David Lee wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By David Lee.</div>
<p style="color: grey;"><i>Updated Oct. 18, 2013, 9:09 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hit each ARI resource to ensure it still responded.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/12/res/ari/resource_applications.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_applications.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_asterisk.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_asterisk.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_bridges.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_bridges.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_channels.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_channels.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_endpoints.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_endpoints.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_events.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_events.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_playback.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_playback.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_recordings.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_recordings.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_sounds.h <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/ari/resource_sounds.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_applications.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_asterisk.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_bridges.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_channels.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_endpoints.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_events.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_playback.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_recordings.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/res/res_ari_sounds.c <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/ari_resource.c.mustache <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/ari_resource.h.mustache <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/asterisk_processor.py <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/res_ari_resource.c.mustache <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/rest_handler.mustache <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api-templates/swagger_model.py <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/applications.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/asterisk.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/bridges.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/channels.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/endpoints.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/playback.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/recordings.json <span style="color: grey">(401260)</span></li>
<li>/branches/12/rest-api/api-docs/sounds.json <span style="color: grey">(401260)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2940/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>