Skip to content

Commit

Permalink
deploy: b4c4539
Browse files Browse the repository at this point in the history
  • Loading branch information
oscgonfer committed Nov 9, 2023
1 parent 98855ec commit e099d30
Showing 1 changed file with 76 additions and 25 deletions.
101 changes: 76 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ <h4 id='user-object'>User Object</h4>
</tr>
<tr>
<td><strong>avatar</strong><br/><em>string</em></td>
<td>URL of the user&#39;s avatar</td>
<td>URL of the users avatar</td>
</tr>
<tr>
<td><strong>city</strong><br/><em>string</em></td>
Expand All @@ -663,23 +663,35 @@ <h4 id='user-object'>User Object</h4>
</tr>
</tbody></table>
<h2 id='basic-searching'>Basic Searching</h2>
<p>Similar to the <a href="#pagination">pagination</a>, you can filter and sort most responses that return more than one result. This is done with the <a href="https://github.com/activerecord-hackery/ransack">Ransack</a> library.</p>
<p>Similar to the <a href="#pagination">pagination</a>, you can filter and sort most responses that return more than one result. This is done with the <a href="https://github.com/activerecord-hackery/ransack">Ransack</a> library. You can query different endpoints and filter them by using <a href="https://activerecord-hackery.github.io/ransack/getting-started/search-matches/">search matchers</a>.</p>

<p><a href="https://github.com/activerecord-hackery/ransack/wiki/Basic-Searching">https://github.com/activerecord-hackery/ransack/wiki/Basic-Searching</a></p>

<table><thead>
<tr>
<th>Query</th>
<th>Example</th>
<th>Type</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>/users?q[<strong>first_name_eq</strong>]=adam</td>
<td>/users?q[<strong>username_eq</strong>]=adam</td>
<td>string</td>
<td>adam</td>
<td>Users where first name equals &#39;Adam&#39;</td>
<td>Users where username equals &#39;adam&#39;</td>
</tr>
<tr>
<td>/users?q[<strong>username_cont</strong>]=osc</td>
<td>string</td>
<td>osc</td>
<td>Users where username cotains &#39;osc&#39;</td>
</tr>
<tr>
<td>/devices?q[<strong>name_cont</strong>]=sck</td>
<td>string</td>
<td>sck</td>
<td>Devices where username cotains &#39;sck&#39;</td>
</tr>
<tr>
<td>/devices?q[<strong>owner_id_eq</strong>]=1</td>
Expand Down Expand Up @@ -711,12 +723,6 @@ <h2 id='basic-searching'>Basic Searching</h2>
<td>100</td>
<td>Sensors where ID less than 100</td>
</tr>
<tr>
<td>/users?q[<strong>username_cont</strong>]=sck</td>
<td>string</td>
<td>sck</td>
<td>Users where username contains &#39;sck&#39;</td>
</tr>
</tbody></table>
<h3 id='keys-for-devices'>Keys for devices</h3>
<table><thead>
Expand All @@ -728,16 +734,19 @@ <h3 id='keys-for-devices'>Keys for devices</h3>
<td>id</td>
</tr>
<tr>
<td>owner_id</td>
</tr>
<tr>
<td>name</td>
</tr>
<tr>
<td>description</td>
</tr>
<tr>
<td>mac_address</td>
<td>owner_id</td>
</tr>
<tr>
<td>owner_username</td>
</tr>
<tr>
<td>mac_address (only for admin)</td>
</tr>
<tr>
<td>created_at</td>
Expand All @@ -746,21 +755,41 @@ <h3 id='keys-for-devices'>Keys for devices</h3>
<td>updated_at</td>
</tr>
<tr>
<td>kit_id</td>
<td>last_recorded_at</td>
</tr>
<tr>
<td>geohash</td>
</tr>
<tr>
<td>last_recorded_at</td>
<td>uuid</td>
</tr>
<tr>
<td>state</td>
</tr>
<tr>
<td>exposure (*)</td>
</tr>
<tr>
<td>tag_name</td>
</tr>
<tr>
<td>postprocessing_id</td>
</tr>
<tr>
<td>kit_id (*)</td>
</tr>
<tr>
<td>geohash</td>
</tr>
<tr>
<td>uuid</td>
</tr>
<tr>
<td>state</td>
<td>token (only for admins)</td>
</tr>
</tbody></table>

<aside class='warning'>`kit_id` will be deprecated soon and `exposure` is not available yet.</aside>
<h3 id='keys-for-users'>Keys for users</h3>
<table><thead>
<tr>
Expand All @@ -774,9 +803,6 @@ <h3 id='keys-for-users'>Keys for users</h3>
<td>username</td>
</tr>
<tr>
<td>email</td>
</tr>
<tr>
<td>created_at</td>
</tr>
<tr>
Expand All @@ -789,10 +815,35 @@ <h3 id='keys-for-users'>Keys for users</h3>
<td>country_code</td>
</tr>
<tr>
<td>url</td>
<td>uuid</td>
</tr>
</tbody></table>
<h3 id='keys-for-sensors'>Keys for sensors</h3>
<table><thead>
<tr>
<th>Key</th>
</tr>
</thead><tbody>
<tr>
<td>id</td>
</tr>
<tr>
<td>name</td>
</tr>
<tr>
<td>unit</td>
</tr>
<tr>
<td>avatar_url</td>
<td>measurement_id</td>
</tr>
<tr>
<td>ancestry</td>
</tr>
<tr>
<td>created_at</td>
</tr>
<tr>
<td>updated_at</td>
</tr>
<tr>
<td>uuid</td>
Expand Down Expand Up @@ -1730,11 +1781,11 @@ <h3 id='possible-values-for-system_tag'>Possible values for system_tag</h3>
</tr>
<tr>
<td><strong>indoor</strong></td>
<td>The device is inside</td>
<td>The device is placed indoors</td>
</tr>
<tr>
<td><strong>outdoor</strong></td>
<td>The device is outside</td>
<td>The device is placed outdoors (default)</td>
</tr>
</tbody></table>
<h2 id='add-a-device'>Add a Device</h2>
Expand Down

0 comments on commit e099d30

Please sign in to comment.