150 lines
4.1 KiB
Plaintext
150 lines
4.1 KiB
Plaintext
<div>
|
|
<%= render 'response' %>
|
|
<h2 id="list_public">List Public Channels</h2>
|
|
</div>
|
|
|
|
<br>
|
|
To view a list of public Channels, send an HTTP GET to
|
|
<br>
|
|
<code><%= @ssl_api_domain %>channels/public<span class="format format-json">.json</span><span class="format format-xml">.xml</span></code> .
|
|
|
|
<br><br>
|
|
Valid parameters:
|
|
<ul>
|
|
<li><b>page</b> (integer) Page number to retrieve (optional)</li>
|
|
<li><b>tag</b> (string) Name of tag to search for (optional)</li>
|
|
<li><b>username</b> (string) Person's username that you want to search Channels for (optional)</li>
|
|
</ul>
|
|
|
|
<br>
|
|
Example GET:
|
|
|
|
<pre>GET <span class="str"><%= @ssl_api_domain %>channels/public<span class="format format-json">.json</span><span class="format format-xml">.xml</span></span></pre>
|
|
|
|
<br>
|
|
|
|
<div class="format format-block-xxxl format-text">
|
|
The response will be a webpage with a <a href="/channels/public">list of public Channels</a>.
|
|
</div>
|
|
|
|
<div class="format format-block-xxxl format-json">
|
|
The response will be a JSON object of public Channels, for example:
|
|
|
|
<pre class="prettyprint">
|
|
{
|
|
"pagination":
|
|
{
|
|
"current_page": 1,
|
|
"per_page": 15,
|
|
"total_entries": 653
|
|
},
|
|
"channels":
|
|
[
|
|
{
|
|
"id": 9,
|
|
"name": "my_house",
|
|
"description": "Netduino Plus connected to sensors around the house",
|
|
"latitude": "40.44",
|
|
"longitude": "-79.996",
|
|
"created_at": "2010-12-13T20:20:06-05:00",
|
|
"elevation": "",
|
|
"last_entry_id": 6062691,
|
|
"ranking" :100,
|
|
"username":"hans",
|
|
"tags":
|
|
[
|
|
{
|
|
"id": 9,
|
|
"name": "temp"
|
|
},{
|
|
"id": 25,
|
|
"name": "light"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 5683,
|
|
"name": "Residential Data Points",
|
|
"description": "Arduino Uno + Ethernet Shield",
|
|
"latitude": "35.664548",
|
|
"longitude": "-78.654972",
|
|
"created_at": "2013-05-15T12:33:57-04:00",
|
|
"elevation": "100",
|
|
"last_entry_id": 731713,
|
|
"ranking": 100,
|
|
"username": "samlro",
|
|
"tags":
|
|
[
|
|
{
|
|
"id": 950,
|
|
"name": "Analog Inputs"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
<div class="format format-block-xxxl format-xml">
|
|
The response will be an XML object of public Channels, for example:
|
|
|
|
<pre class="prettyprint">
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<response>
|
|
<pagination>
|
|
<current-page type="WillPaginate::PageNumber">1</current-page>
|
|
<per-page type="integer">15</per-page>
|
|
<total-entries type="integer">654</total-entries>
|
|
</pagination>
|
|
<channels type="array">
|
|
<channel>
|
|
<id type="integer">9</id>
|
|
<name>my_house</name>
|
|
<description>
|
|
Netduino Plus connected to sensors around the house
|
|
</description>
|
|
<latitude type="decimal">40.44</latitude>
|
|
<longitude type="decimal">-79.996</longitude>
|
|
<created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at>
|
|
<elevation/>
|
|
<last-entry-id type="integer">6062720</last-entry-id>
|
|
<ranking type="integer">100</ranking>
|
|
<username>hans</username>
|
|
<tags type="array">
|
|
<tag>
|
|
<id type="integer">9</id>
|
|
<name>temp</name>
|
|
</tag>
|
|
<tag>
|
|
<id type="integer">25</id>
|
|
<name>light</name>
|
|
</tag>
|
|
</tags>
|
|
</channel>
|
|
<channel>
|
|
<id type="integer">5683</id>
|
|
<name>Residential Data Points</name>
|
|
<description>Arduino Uno + Ethernet Shield</description>
|
|
<latitude type="decimal">35.664548</latitude>
|
|
<longitude type="decimal">-78.654972</longitude>
|
|
<created-at type="dateTime">2013-05-15T12:33:57-04:00</created-at>
|
|
<elevation>100</elevation>
|
|
<last-entry-id type="integer">731720</last-entry-id>
|
|
<ranking type="integer">100</ranking>
|
|
<username>samlro</username>
|
|
<tags type="array">
|
|
<tag>
|
|
<id type="integer">950</id>
|
|
<name>Analog Inputs</name>
|
|
</tag>
|
|
</tags>
|
|
</channel>
|
|
</channels>
|
|
</response>
|
|
</pre>
|
|
|
|
</div>
|
|
|