cleaning up MIFOSX-1947

This commit is contained in:
Vishwas Babu A J
2015-04-10 23:57:36 -07:00
parent 72be7a82a5
commit f883158001
12 changed files with 228 additions and 424 deletions
+41 -266
View File
@@ -1796,6 +1796,26 @@
<td><a href="#staff_update">Update a Staff Member</a></td>
<td></td>
</tr>
<tr>
<td><a href="#client_images">Staff Images</a></td>
<td>staff/{staffId}/images</td>
<td><a href="#client_images_create">Upload an Image for a Staff Member (as DATA URI)</a></td>
<td><a href="#client_images_retrieve">Get Staff Image (DATA URI)</a></td>
<td><a href="#client_images_update">Update Staff Image (DATA URI)</a></td>
<td><a href="#client_images_delete">Delete Staff Image</a></td>
</tr>
<tr>
<td></td>
<td></td>
<td><a href="#client_images_create_form">
Upload an Image for a Staff Member (Multi-part form data)</a>
</td>
<td><a href="#client_images_retrieve_binary">Get Staff Image (Binary file)</a></td>
<td><a href="#client_images_update_form">
Update Staff Image (Multi-part form data)</a>
</td>
<td></td>
</tr>
<tr>
<td><a href="#charges">Charges</a></td>
<td>charges</td>
@@ -4709,12 +4729,12 @@ No Request Body:
<a id="client_images" name="client_images" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Client Images</h3>
<h3>Images</h3>
<p>The current API provides support for the addition of a single
image for a Client<br/>
image for entities like Client (URL pattern <i>/clients</i>) and Staff (URL pattern <i>/staff</i>)<br/>
Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png)
</p>
<p> The API supports two different Approaches for manipulating Client Images
<p> The API supports two different Approaches for manipulating Images
<ul>
<li><a href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank"> Data URI's: </a>
For easier manipulation by Javascript clients etc in supported Browsers.
@@ -4731,10 +4751,11 @@ No Request Body:
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Client Image (DATA URI)</h4>
<p>Optional arguments are identical to those of <a href="#client_images_retrieve_binary">Get Client Image (Binary file)</a></p>
<h4>Get Entity Image (DATA URI)</h4>
<p>Optional arguments are identical to those of <a href="#client_images_retrieve_binary">Get Image associated with an Entity (Binary file)</a></p>
<p>Example Requests:</p>
<div class=apiClick>clients/1/images</div>
<div class=apiClick>staff/1/images</div>
<br>
</div>
<div class="method-example">
@@ -4757,7 +4778,7 @@ gAEAOg13B6R/SAgAAAAASUVORK5CYII=
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Client Image (Binary file)</h4>
<h4>Get Image associated with an Entity (Binary file)</h4>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>output</dt>
@@ -4791,7 +4812,7 @@ GET https://DomainName/api/v1/clients/{clientId}/images
Accept: application/octet-stream
</code>
<code class="method-request">
POST clients/1/images
GET clients/1/images
Accept: application/octet-stream
</code>
<code class="method-response">
@@ -4803,7 +4824,7 @@ Accept: application/octet-stream
<a id="client_images_create" name="client_images_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Client (Data URI)</h4>
<h4>Upload an Image for an Entity (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
@@ -4831,7 +4852,7 @@ P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
<a id="client_images_create_form" name="client_images_create_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Client (Multi-part Form data)</h4>
<h4>Upload an Image for an Entity (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
@@ -4871,7 +4892,7 @@ Request Body: <i>Not shown</i>
<a id="client_images_update" name="client_images_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Image (Data URI)</h4>
<h4>Update a Image associated with an Entity (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
@@ -4899,7 +4920,7 @@ P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
<a id="client_images_update_form" name="client_images_update_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Image (Multi-part Form data)</h4>
<h4>Update an Entity's Image (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
@@ -4932,7 +4953,7 @@ Request Body: <i>Not shown</i>
<a id="client_images_delete" name="client_images_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Client Image</h4>
<h4>Delete an Entity's Image</h4>
</div>
<div class="method-example">
<code class="method-declaration">
@@ -16767,252 +16788,7 @@ Request Body:
</div>
</div>
<a id="staff_images" name="staff_images" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Staff Images</h3>
<p>The current API provides support for the addition of a single
image for a Staff Member<br/>
Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png)
</p>
<p> The API supports two different Approaches for manipulating Staff Images
<ul>
<li><a href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank"> Data URI's: </a>
For easier manipulation by Javascript clients etc in supported Browsers.
</li>
<li><a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2">
Multi-part form data:</a>
Images can be uploaded using Multi part forms and downloaded as regular binary files
</li>
<br/>
</div>
</div>
<a id="staff_images_create" name="staff_images_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Staff (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/staff/{staffId}/images
</code>
<code class="method-request">
POST staff/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="staff_images_create_form" name="staff_images_create_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Staff Member (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>file
</td>
</tr>
</table>
<p>
The form should contain a required named body part with the
name "file". <br/> <br/>
If you are using a HTML form, a snippet like
<small> &lt;input type="file" name="file"&gt;&lt;/input&gt; </small>
can be used for uploading the image file
</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/staff/{staffId}/images
</code>
<code class="method-request">
POST staff/1/images
Content-Type: multipart/form-data
Request Body: <i>Not shown</i>
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="staff_images_retrieve" name="staff_images_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Staff Image (DATA URI)</h4>
<p>Optional arguments are identical to those of <a href="#client_images_retrieve_binary">Get Staff Image (Binary file)</a></p>
<p>Example Requests:</p>
<div class=apiClick>staff/1/images</div>
<br>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/staff/{staffId}/images
Accept: text/plain
</code>
<code class="method-response">
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp
DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB
+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA
gAEAOg13B6R/SAgAAAAASUVORK5CYII=
</code>
</div>
</div>
<a id="staff_images_retrieve_binary" name="staff_images_retrieve_binary"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Staff Image (Binary file)</h4>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>output</dt>
<dd>
String <span>optional</span> one of <span>octet or inline_octet</span>
</dd>
<dd>The query parameter overrides the <span>"Accept" Header</span> and sets the Media Type to "application/octet-stream" <br/>
<span><b>octet :</b></span> Returns the image binary file as an attachment. The <span>Content-Disposition</span> header is set to <span>attachment;filename=somefile.ext</span> <br/>
<span><b>inline_octet :</b></span>The <span>Content-Disposition</span> header is set to <span>inline;filename=somefile.ext</span>
</dd>
<dt>maxWidth</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Triggers resizing of the image to the defined width</dd>
<dt>maxHeight</dt>
<dd>
<dd>
Integer <span>optional</span>
</dd>
</dd>
<dd>Triggers resizing of the image to the defined height</dd>
</dl>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/staff/{staffId}/images
Accept: application/octet-stream
</code>
<code class="method-request">
POST staff/1/images
Accept: application/octet-stream
</code>
<code class="method-response">
<i>Not shown</i>: The corresponding binary (image) file
</code>
</div>
</div>
<a id="staff_images_update" name="staff_images_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Staff Image (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/staff/{staffId}/images
</code>
<code class="method-request">
PUT staff/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="staff_images_update_form" name="staff_images_update_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Staff Member Image (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>file
</td>
</tr>
</table>
<p>
The form should contain a required named body part with the
name "file". <br/> <br/>
If you are using a HTML form, a snippet like
<small> &lt;input type="file" name="file"&gt;&lt;/input&gt; </small>
can be used for uploading the image file
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/staff/{staffId}/images
</code>
<code class="method-request">
PUT staff/1/images
Content-Type: multipart/form-data
Request Body: <i>Not shown</i>
</code>
</div>
</div>
<a id="staff_images_delete" name="staff_images_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Staff Image</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/staff/{staffId}/images
</code>
<code class="method-request">
DELETE staff/1/images
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<!--Charges section starts here-->
<a id="charges" name="charges" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
@@ -19705,7 +19481,6 @@ Content-Type: application/json
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequencyType</i> to indicate the length of time that the recurring deposit account is 'locked in' and premature closure is not allowed. e.g. <b>2</b> Months</td></tr>
<tr class=alt><td>lockinPeriodFrequencyType</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequency</i> to indicate the length of time that the recurring deposit account is 'locked in' and premature closure is not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years
e.g. 2 <b>Months</b></td></tr>
<tr class=alt><td>recurringDepositFrequency</td></tr>
@@ -36498,21 +36273,21 @@ No Request Body:
<td></td>
</tr>
<tr>
<td><a href="#staff_images">Staff Images</a></td>
<td><a href="#client_images">Staff Images</a></td>
<td>staff/{staffId}/images</td>
<td><a href="#staff_images_create">Upload an Image for a Staff Member (as DATA URI)</a></td>
<td><a href="#staff_images_retrieve">Get Staff Image (DATA URI)</a></td>
<td><a href="#staff_images_update">Update Staff Image (DATA URI)</a></td>
<td><a href="#staff_images_delete">Delete Staff Image</a></td>
<td><a href="#client_images_create">Upload an Image for a Staff Member (as DATA URI)</a></td>
<td><a href="#client_images_retrieve">Get Staff Image (DATA URI)</a></td>
<td><a href="#client_images_update">Update Staff Image (DATA URI)</a></td>
<td><a href="#client_images_delete">Delete Staff Image</a></td>
</tr>
<tr>
<td></td>
<td></td>
<td><a href="#staff_images_create_form">
<td><a href="#client_images_create_form">
Upload an Image for a Staff Member (Multi-part form data)</a>
</td>
<td><a href="#staff_images_retrieve_binary">Get Staff Image (Binary file)</a></td>
<td><a href="#staff_images_update_form">
<td><a href="#client_images_retrieve_binary">Get Staff Image (Binary file)</a></td>
<td><a href="#client_images_update_form">
Update Staff Image (Multi-part form data)</a>
</td>
<td></td>