<%= render 'response' %>

Create a Channel


To create a new Channel, send an HTTP POST to <%= @ssl_api_domain %>channels.json.xml .

Valid parameters:
Example POST:
POST <%= @ssl_api_domain %>channels.json.xml
     api_key=<%= @user_api_key %>
     name=My New Channel

The response will be a webpage with your newly created Channel.
The response will be a JSON object of the new channel, for example:
{
  "id": 4,
  "name": "My New Channel",
  "description": null,
  "latitude": null,
  "longitude": null,
  "created_at": "2014-03-25T13:12:50-04:00",
  "elevation": null,
  "last_entry_id": null,
  "ranking": 15,
  "username": "hans",
  "tags": [],
  "api_keys":
  [
    {
      "api_key": "XXXXXXXXXXXXXXXX",
      "write_flag": true
    }
  ]
}
The response will be an XML object of the new channel, for example:
<?xml version="1.0" encoding="UTF-8"?>
<channel>
    <id type="integer">4</id>
    <name>My New Channel</name>
    <description nil="true" />
    <latitude type="decimal" nil="true" />
    <longitude type="decimal" nil="true" />
    <created-at type="dateTime">2014-03-25T20:17:44-04:00</created-at>
    <elevation nil="true" />
    <last-entry-id type="integer" nil="true" />
    <ranking type="integer">15</ranking>
    <username>hans</username>
    <tags type="array" />
    <api-keys type="array">
        <api-key>
            <api-key>XXXXXXXXXXXXXXXX</api-key>
            <write-flag type="boolean">true</write-flag>
        </api-key>
    </api-keys>
</channel>