Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api endpoints #27

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ <h3>Resources</h3>
{% if page.url contains '/pre_expenses' %}
<nav class="subnav">
<a href="{{ site.baseurl }}/api/v1/pre_expenses#index">List all pre-expenses</a>
<a href="{{ site.baseurl }}/api/v1/pre_expenses#show">Show a pre-expense</a>
<a href="{{ site.baseurl }}/api/v1/pre_expenses#ignore">Ignore a pre-expense</a>
<a href="{{ site.baseurl }}/api/v1/pre_expenses#restore">Restore a pre-expense</a>
<a href="{{ site.baseurl }}/api/v1/pre_expenses#convert">Convert a pre-expense</a>
<a href="{{ site.baseurl }}/api/v1/pre_expenses#destroy">Destroy a pre-expense</a>
</nav>
{% endif %}
Expand Down
22 changes: 5 additions & 17 deletions api/v1/advancement_devolutions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h4>Parameters</h4>
<td><strong>string</strong></td>
</tr>
<tr>
<td valign="top"><strong>receiver_id:</strong></td>
<td valign="top"><strong>receiver:</strong></td>
<td>
<strong>JSON object</strong>
</td>
Expand Down Expand Up @@ -146,24 +146,12 @@ <h4>Parameters</h4>
<table class="parameters">
<tbody>
<tr>
<td valign="top"><strong>payer:</strong></td>
<td>
<strong>payer object attributes</strong> <em>required</em>
<div class="nested">
<strong>id:</strong> integer<br />
<strong>type:</strong> string
</div>
</td>
<td><strong>payer_id:</strong></td>
<td><strong>Integer</strong> <em>required</em></td>
</tr>
<tr>
<td valign="top"><strong>receiver:</strong></td>
<td>
<strong>receiver object attributes</strong> <em>required</em>
<div class="nested">
<strong>id:</strong> integer<br />
<strong>type:</strong> string
</div>
</td>
<td><strong>receiver_id:</strong></td>
<td><strong>Integer</strong> <em>required</em></td>
</tr>
<tr>
<td><strong>amount:</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion api/v1/advancement_participants/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h4>Response Example</h4>
<article id="destroy">
<section class="description">
<h3><a href="#destroy" name="destroy">Leave a participant list</a></h3>
<p>This endpoint removes the user from an Advancement participant list.</p>
<p>This endpoint removes the current user from an Advancement participant list.</p>
</section>
<section class="code">
<h4>Definition</h4>
Expand Down
11 changes: 0 additions & 11 deletions api/v1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,6 @@ <h3>Locale</h3>
</section>
<section class="code">
<h3>List all available Locales</h3>
<h4>Example Request</h4>
<pre>GET /api/v1/locales</pre>
<h4>Example Response</h4>
{% highlight javascript %}
{
"locales": [
{"pt": "Português (Brasil)"},
{"en": "English (US)"}
]
}
{% endhighlight %}

<h3>Use a specific Accept-Language by header</h3>
<h4>Example Request</h4>
Expand Down
34 changes: 2 additions & 32 deletions api/v1/pre_expenses/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,30 +186,6 @@ <h4>Response Example</h4>
</section>
</article>

<article id="show">
<section class="description">
<h3><a href="#show" name="#show">Show pre-expense</a></h3>
<p>Returns the detailed information of a pre-expense.</p>
</section>

<section class="code">
<h4>Definition</h4>
<pre>GET https://app.rexpense.com/api/v1/pre_expenses/:id</pre>
<h4>Example Request</h4>
<pre>$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/pre_expenses/1 \
-H 'Accept: application/json' \
-H 'Content-type: application/json'</pre>
<h4>Response Example</h4>
<pre>HTTP 200 OK</pre>
{% highlight javascript %}
{
"id": 1,
...
}
{% endhighlight %}
</section>
</article>

<article id="ignore">
<section class="description">
<h3><a href="#ignore" name="#ignore">Ignore a Pre-Expense</a></h3>
Expand Down Expand Up @@ -276,14 +252,8 @@ <h4>Parameters</h4>
<td><strong>string</strong></td>
</tr>
<tr>
<td valign="top"><strong>payer:</strong></td>
<td>
<strong>payer object attributes</strong> <em>required</em>
<div class="nested">
<strong>id:</strong> integer<br />
<strong>type:</strong> string
</div>
</td>
<td><strong>payer_id:</strong></td>
<td><strong>integer</strong> <em>required</em></td>
</tr>
<tr>
<td><strong>amount:</strong></td>
Expand Down