TON 2.0 Developers API Documentation


The TON 2.0 API is available to both commerical and non-commercial developers.  Use of the TON 2.0 API requires a developer account and API Key.

 

Overview

The TON API consists of a set of callable methods executed via GET or POST requests to the TON API Server.  To form a request, make a call to the API Server with your developers key, the appropriate method name and any required or optional paramaters.

The TON API Server is located at http://api.totaloutdoornetwork.com/api/v1/.  Future releases of the API will use a new "v[#]" in the path


Responses are returned via 2 possible formats depending on the optional format parameter.

  • REST
  • JSON
At a minimum the 2 REQUIRED parameters are method and key.

Encoding
 

All requests to the TON API expect UTF-8 Encoded data

Example Call and Response
 

A sample call to the TON API is listed below.  Here we request the current version of the TON API

 REQUEST
 http://api.totaloutdoornetwork.com/api/v1/?key=YOUR-API-KEY&method=ton.api.getVer
   

 RESPONSE

<ton>
  
<status state="ok" timestamp="1227810008" key="YOUR-API-KEY">
   </status>
   <method name="ton.api.getVer">
   </method>
   <response>
     
<rest>
        
<data version="0.1" />
     
</rest>
   </response>
</ton>

The above returns a our status which for all succesfull calls is set to "ok".  A timestamp, a copy of your api key and a reference to the method that was called.

The response tag contains the actual response from the server, and usually, is wrapped in a rest/data tagset.

Most variables returned are attributes of data and most custom XML Data returned (e.g. list of nodes, etc.) is returned as child nodes of data

ERRORS


An error response sets the status to "error" and provides detailed information in an error node.

<ton>
  
<status state="error" timestamp="1227810249" key="YOUR-API-KEY">
  
</status>
  
<method name="ton.api.NotAMethod">
  
</method>
  
<response>
  
</response>
  
<error details="The Method Name: do_NotAMethod Is Not Valid for this object" number="65">
  
</error>
</ton>


Note the addition of an error node in the response above.  This error is indicating that we supplied an invalid method.

GLOBAL ERROR CODES
The following error codes apply to all methods called via the TON 2.0 API.  Individual methods may provide additional error codes

201 - Bad Method
202 - Invalid API Key
203 - Bad Format
204 - Namespace Not Authorized
205 - Operation Not Authorized
206 - API Request Limit Exceeded
207 - Expired API Key
208 - Service unavailable



Authentication 

There are 2 types of authentication to the TON Api.  Simple and Token Based.

Many "get" methods (such as those in the ton namespace) only require Simple Authentication which is a matter of just supplying a valid API Key to the TON API.

Token Based authentication is handled via a handshake / response system in which the client initiates a handshake to the API.  The API returns data for encoding, the client sends back a hashed key using their "secret key" and the server, if valid, sends back an authentication token that can be used on subsequent requests.

Most methods in namespaces other than ton require Token Authentication

 


 API Reference


Api Methods
 
namespace: ton


API Object
System Object
Content Object
  • ton.content.getRecent
  • ton.content.getOwnedByUser
  • ton.content.getSite
  • ton.content.getCategories
  • ton.content.getTags
Articles Object

Photos Object

Videos Object

Forums Object
  • ton.forums.getRecent
  • ton.forums.getSearch

Places Object
  • ton.places.getSearch
  • ton.places.getWeather
  • ton.places.getMaps

Maps Object
  • ton.maps.getSearch
  • ton.maps.getMapForPlace

Users Object

Tags Object
  • ton.tags.getSearch
 Calendar Object

  • ton.calendar.getEvents 
 Reports Object
Businesses Object
  • ton.businesses.getBusinesses
  • ton.businesses.getCategories


Comments Object
  • ton.comments.getComments

namespace: tonify

Content Object


namespace: tonadmin


Content Object
  • tonadmin.content.moveContent
  • tonadmin.content.deleteContent
  • tonadmin.content.archiveContent
  • tonadmin.content.addRating
  • tonadmin.content.addComment
  • tonadmin.content.addTags
  • tonadmin.content.modifyTags
  • tonadmin.content.addPhoto
  • tonadmin.content.setPrimaryPhoto
  • tonadmin.content.getGeo
  • tonadmin.content.modifyExternalInfo
  • tonadmin.content.setCreatedDateTime

Articles Object
Photos Object
  • tonadmin.articles.submitPhoto
  • tonadmin.articles.modifyPhoto
  • tonadmin.articles.uploadPhoto 
Videos Object
  • tonadmin.videos.submitVideo
  • tonadmin.videos.modifyVideo
  • tonadmin.videos.uploadVideo
Places
  • tonadmin.places.submitPlace
  • tonadmin.places.modifyPlace
Maps
  • tonadmin.maps.submitMap
  • tonadmin.maps.modifyMap
  • tonadmin.maps.createMap
Users
  • tonadmin.users.createUser
  • tonadmin.users.requestWrite
  • tonadmin.users.modifyUser

 
 
ton Namespace

The ton namespace is a set of objects and methods designed for data retrieval, but usually offer no abilities to update or change the TON 2.0 Data.

By default, every API key has access to all of the ton namespace objects and methods.

In addition, any implementations of the TON Javascript Api Client Library cannot access any other namespaces except for ton

ton namespace methods can be requested by GET and POST requests.


ton.api.getVer

This method returns the current version of the TON 2.0 API Interface

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

 key (required)

EXAMPLE RESPONSE
 
<rest>
<data version="0.1">
</data>
</rest>


ERROR CODES
This method has no specific error codes

 


ton.api.getJsVer

This method returns the current version of the TON 2.0 Javascript Client API Interface

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

 key (required)

EXAMPLE RESPONSE
 
<rest>
<data version="0.1.4>
</data>
</rest>


ERROR CODES
This method has no specific error codes

 



ton.api.getIsValidKey

This method will return true if a key is valid, along with a list of namespaces this key has acc

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

 key (required)

EXAMPLE RESPONSE
 
<rest>
<data isValid="true" namespaces="ton,tonadmin">
</data>
</rest>


ERROR CODES
This method has no specific error codes


 

 



ton.system.getNewGuid

This method returns a unique GUID created by the TON System.  GUID's are useful when other API methods need unique identifiers for requests, new content submissions, etc.

It is important to use the getNewGuid method via the API when a GUID is needed in order to ensure the GUID Algorythm is correct

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

 key (required)

EXAMPLE RESPONSE
 
<rest>
<data guid="4c8e2d3269bcbfb0abb0e78a858b0fbe" >
</data>
</rest>


ERROR CODES
This method has no specific error codes



 


ton.content.getRecent

This method returns a list of recently added content of various types in the TON System
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

-> see common parameter reference for details
key (required)
channel (optional) 
category (optional)
sub_category (optional)
site (optional)
q (optional)
tags (optional)
ct (optional)

  
Response Type
Any result under the <rs> tag is indicated by the resultType parameter.   In this instance, the result type is "content" which specifies we are getting back 1 or more "Content" items.  For more information see the Result Type reference.



EXAMPLE RESPONSE
 
<rest>
 <data>
  <rs resultType="content">
   <row ContentId="103408" Identifier="dnr_announces_four_new_critical_habitat_license_pl" Url="articles/dnr_announces_four_new_critical_habitat_license_pl" Title="DNR announces four new critical habitat license plates" Blurb="The Minnesota Department of Natural Resources (DNR) revealed four new critical habitat license plate designs today during a ceremony at the Hennepin County deputy registrar&amp;rsquo;s office in Minnetonka." Added="2009-05-15 17:02:14" Views="2" Comments="0" PhotoPath="" PhotoFileName="">
   </row>
   <row ContentId="103405" Identifier="state_s_fish_consumption_guidelines_help_consumers" Url="articles/state_s_fish_consumption_guidelines_help_consumers" Title="State fish consumption guidelines help consumers choose fish to protect health" Blurb="Most health scientists agree that eating fish once or twice a week is good for our health as long as the fish are low in contaminants. The Minnesota Department of Health&amp;rsquo;s updated fish consumption" Added="2009-05-15 16:56:53" Views="1" Comments="0" PhotoPath="UserFiles/23/239/23957/6c/" PhotoFileName="6c1244d0339d5bc340b2957cedc73e0d.jpg"></row><row ContentId="103400" Identifier="burning_restrictions_will_be_lifted_for_more_centr" Url="articles/burning_restrictions_will_be_lifted_for_more_centr" Title="Burning restrictions will be lifted for more central Minnesota counties" Blurb="The Minnesota Department of Natural Resources (DNR) will lift burning restrictions on Friday, May 22 at 8 a.m. for the following counties: Aitkin, Becker, Crow Wing, Otter Tail, Wadena," Added="2009-05-15 16:52:11" Views="0" Comments="0" PhotoPath="UserFiles/23/239/23957/18/" PhotoFileName="18fdef27e885251d4d0c3a4fbdb584ce.jpg">
   </row>
  </rs>  
 </data>
</rest>


ERROR CODES
This method has no specific error codes





ton.articles.getRecent

This method returns a list of recently added articles
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

-> see common parameter reference for details
key (required)
channel (optional) 
category (optional)
sub_category (optional)
site (optional)
q (optional)
tags (optional)

 
EXAMPLE RESPONSE
 

(see ton.content.getRecent)

ERROR CODES
This method has no specific error codes



ton.photos.getRecent

This method returns a list of recently added photos
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

-> see common parameter reference for details
key (required)
channel (optional) 
category (optional)
sub_category (optional)
site (optional)
q (optional)
tags (optional)

 
EXAMPLE RESPONSE
 
(see ton.content.getRecent)

ERROR CODES
This method has no specific error codes

 
 

ton.videos.getRecent

This method returns a list of recently added videos
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

-> see common parameter reference for details
key (required)
channel (optional) 
category (optional)
sub_category (optional)
site (optional)
q (optional)
tags (optional)

 
EXAMPLE RESPONSE
 
(see ton.content.getRecent)

ERROR CODES
This method has no specific error codes

 
 

ton.reports.getRecent

This method returns a list of recently added fishing and or hunting reports
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

-> see common parameter reference for details
key (required)
channel (optional) 
category (optional)
sub_category (optional)
site (optional)
place
q (optional)
tags (optional)
 
Notes on Arguments for Reports
To retrieve a list of fishing reports, set channel=fishing 

EXAMPLE RESPONSE
 
(see ton.content.getRecent)

ERROR CODES
This method has no specific error codes

 
 
 

ton.users.getFeed

Returns a users Update Feed
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

key (required)
owner (required)
 
  
Response Type
Any result under the <rs> tag is indicated by the resultType parameter.   In this instance, the result type is "user_feed" which specifies we are getting back 1 or more "UserFeed" items.  For more information see the Result Type reference.


EXAMPLE RESPONSE
 
<rest>
 <data>
  <rs resultType="user_feed">
<row UserFeedId="6191" UserId="3" UserIdentifier="user_eric" UpdateTypeName="ForumTopicStarted" UpdateTypeText="Started the Topic <a href="/forums_home_page_is_now_a_dashboard" class="feedItemLink">Forums Home Page is now a Dashboard</a>" DateTimeStamp="2009-05-24 08:03:15" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6189" UserId="3" UserIdentifier="user_eric" UpdateTypeName="ForumTopicStarted" UpdateTypeText="Started the Topic <a href="/new_ton_component_added_forumdiscussions" class="feedItemLink">New TON Component Added: "ForumDiscussions"</a>" DateTimeStamp="2009-05-24 07:24:37" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6188" UserId="3" UserIdentifier="user_eric" UpdateTypeName="ForumTopicStarted" UpdateTypeText="Started the Topic <a href="/myspace_facebook_twitter_youtube_etc" class="feedItemLink">MySpace, Facebook, Twitter, YouTube, etc.</a>" DateTimeStamp="2009-05-24 06:46:01" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6155" UserId="3" UserIdentifier="user_eric" UpdateTypeName="ForumTopicStarted" UpdateTypeText="Started the Topic <a href="/email_notifications_and_rss_feeds" class="feedItemLink">Email Notifications and RSS Feeds</a>" DateTimeStamp="2009-05-22 16:18:51" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6147" UserId="3" UserIdentifier="user_eric" UpdateTypeName="GameReportAdded" UpdateTypeText="Added the Fishing Report <a href="/devils_lake_overview_friday_may_22_2009_0" class="feedItemLink">Devils Lake (Overview) - Friday, May 22, 2009</a>" DateTimeStamp="2009-05-22 11:13:53" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6146" UserId="3" UserIdentifier="user_eric" UpdateTypeName="GameReportAdded" UpdateTypeText="Added the Fishing Report <a href="/devils_lake_overview_friday_may_22_2009_7" class="feedItemLink">Devils Lake (Overview) - Friday, May 22, 2009</a>" DateTimeStamp="2009-05-22 11:13:36" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6145" UserId="3" UserIdentifier="user_eric" UpdateTypeName="GameReportAdded" UpdateTypeText="Added the Fishing Report <a href="/devils_lake_overview_friday_may_22_2009_9_5e" class="feedItemLink">Devils Lake (Overview) - Friday, May 22, 2009</a>" DateTimeStamp="2009-05-22 11:12:54" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6144" UserId="3" UserIdentifier="user_eric" UpdateTypeName="GameReportAdded" UpdateTypeText="Added the Fishing Report <a href="/devils_lake_overview_friday_may_22_2009_9" class="feedItemLink">Devils Lake (Overview) - Friday, May 22, 2009</a>" DateTimeStamp="2009-05-22 11:11:31" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6143" UserId="3" UserIdentifier="user_eric" UpdateTypeName="GameReportAdded" UpdateTypeText="Added the Fishing Report <a href="/devils_lake_overview_friday_may_22_2009_f" class="feedItemLink">Devils Lake (Overview) - Friday, May 22, 2009</a>" DateTimeStamp="2009-05-22 10:59:39" Deleted="0" ScreenName="erickub" />
<row UserFeedId="6139" UserId="3" UserIdentifier="user_eric" UpdateTypeName="ForumTopicStarted" UpdateTypeText="Started the Topic <a href="/subscription_and_notification_options_to_roll_out" class="feedItemLink">Subscription and Notification Options to roll out today</a>" DateTimeStamp="2009-05-22 09:43:52" Deleted="0" ScreenName="erickub" />
</rs>

 
 </data>
</rest>


ERROR CODES

71- Invalid User Identifier specified for the owner field
209- Missing Parameter

 

 

ton.users.getBuddies

Returns a users Buddy List
 

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

key (required)
owner (required)
 
  
Response Type
Any result under the <rs> tag is indicated by the resultType parameter.   In this instance, the result type is "user_buddies" which specifies we are getting back 1 or more "UserBuddy" items.  For more information see the Result Type reference.


EXAMPLE RESPONSE
 
<rest>
 <data>
  <rs resultType="user_buddies">
<row BuddyId="24" UserId="6694" BuddyUserId="3" RequestStatus="approved" BuddyAddedDateTimeStamp="2009-01-12 12:19:58" UserScreenName="Tim Sandstrom" UserIdentifier="user_fbo_staff" UserAvatarPath="UserFiles/6/66/6694/1f/" UserAvatarFileName="1f60b2233a0bd38933c6ed0de4ec6673.jpg" BuddyUserAvatarUrl="UserFiles/0/0/3/7b/s_7bf15ddb49f5113ae81bc303aaf46665.jpg" BuddyUserScreenName="erickub" BuddyUserIdentifier="user_eric" BuddyUserAvatarPath="UserFiles/0/0/3/7b/" BuddyUserAvatarFileName="7bf15ddb49f5113ae81bc303aaf46665.jpg" BuddyPrimaryPhotoId="92" UserPrimaryPhotoId="10785" />
<row BuddyId="28" UserId="6694" BuddyUserId="13204" RequestStatus="approved" BuddyAddedDateTimeStamp="2009-02-18 16:03:51" UserScreenName="Tim Sandstrom" UserIdentifier="user_fbo_staff" UserAvatarPath="UserFiles/6/66/6694/1f/" UserAvatarFileName="1f60b2233a0bd38933c6ed0de4ec6673.jpg" BuddyUserAvatarUrl="UserFiles/13/132/13204/9e/s_9ed484997472d986423187f355eca0f8.jpg" BuddyUserScreenName="solocam" BuddyUserIdentifier="user_solocam" BuddyUserAvatarPath="UserFiles/13/132/13204/9e/" BuddyUserAvatarFileName="9ed484997472d986423187f355eca0f8.jpg" BuddyPrimaryPhotoId="11123" UserPrimaryPhotoId="10785" />
<row BuddyId="36" UserId="6694" BuddyUserId="28" RequestStatus="approved" BuddyAddedDateTimeStamp="2009-02-19 13:26:01" UserScreenName="Tim Sandstrom" UserIdentifier="user_fbo_staff" UserAvatarPath="UserFiles/6/66/6694/1f/" UserAvatarFileName="1f60b2233a0bd38933c6ed0de4ec6673.jpg" BuddyUserAvatarUrl="" BuddyUserScreenName="jercat11" BuddyUserIdentifier="user_jercat11" BuddyUserAvatarPath="" BuddyUserAvatarFileName="" BuddyPrimaryPhotoId="" UserPrimaryPhotoId="10785" />
<row BuddyId="40" UserId="6694" BuddyUserId="16975" RequestStatus="approved" BuddyAddedDateTimeStamp="2009-02-20 08:22:12" UserScreenName="Tim Sandstrom" UserIdentifier="user_fbo_staff" UserAvatarPath="UserFiles/6/66/6694/1f/" UserAvatarFileName="1f60b2233a0bd38933c6ed0de4ec6673.jpg" BuddyUserAvatarUrl="UserFiles/16/169/16975/01/s_01a439a2980658ac508799036a530be1.jpg" BuddyUserScreenName="skoalongcut" BuddyUserIdentifier="user_skoalongcut" BuddyUserAvatarPath="UserFiles/16/169/16975/01/" BuddyUserAvatarFileName="01a439a2980658ac508799036a530be1.jpg" BuddyPrimaryPhotoId="9882" UserPrimaryPhotoId="10785" />
</rs> 
 </data>
</rest>


ERROR CODES

71- Invalid User Identifier specified for the owner field
209- Missing Parameter


tonify Namespace

The tonify namespace is a set of objects specifically for the "tonify" system for developer content partners.  The tonify namespaces provides the ability to "tonify" content which will add the content to our searchable index, and, provide valuable metadata about the content.

Partners can add, update, delete and get metadata about their tonified content.





tonify.content.tonify
This method submits external content to be "tonified" and responds with meta data about the tonified content.

PERMISSIONS
This method does not require any special permissions.

ARGUMENTS

 key (required)
 external_source_id (optional)
               one of the external sources that your developer account has access to publish on behalf of.  If empty, content will be published to your default external source.
 title (required)
 body (required)
 uniqueId (required)
               must be unique among your tonified content can be any string or number combination
 url (required)
               the link back to the original content item on your site, must be unique
 content_type (optional)
               one of the supported tonified content_type's - if empty, defaults to "article".  Can be "article","photo","video","forum_topic","user_profile"
 photo_url (optional)
               url to a thumb of photo for the content.
 channel_id (optional)
 category_id (optional)
 sub_category_id (optional)
 place_id (optional)
 
 
 

EXAMPLE RESPONSE
 
<rest>
<data identifier="tfy_your_new_content">
 <metadata>
  <TONChannel>fishing</TONChannel>
  <TONCategory>freshwater</TONCategory>
  <TONSpecies identifier="walleye">Walleye</TONSpecies>
  <TONSpecies identifier="northern_pike">Northern Pike</TONSpecies>
  <TONEquipment identifier="salmo">Salmo</TONEquipment>
  <TONTags>tag tag anothertag moretag</TONTags>
  <OC>
   <ProvinceOrState>North Dakota</ProvinceOrState>
  <OC>
 </metadata>
</data>
</rest>


ERROR CODES
1 - Missing title or body
2 - missing uniqueId
3 - Missing url
4 - Invalid content_type
5 - UniqueId already exists
6 - Url already exists 
7 - Invalid External SourceId


 

 

tonadmin Namespace


The tonadmin namespace is a set of objects and methods designed for TON publishers to submit data to the TON system.  All tonadmin methods require an API Key that has publisher permissions and most method requires ownership permissions to the content being modifed.

Many publisher methods allow a developer to post content on behalf of a user.  In this case, the developer key account must have "write" permissions for the user in which they are submitting content on behalf of.  In addition, the developer must have "write" permissions for the TON Site they are submitting the content to.  

tonadmin methods are not available via the JavascriptAPI as the keys are secured based on specific requirements.

tonadmin namespaces requires Token Authentication to the API.

All tonadmin namespace methods require POST

The "write" permission.
The write permission is determined based on a number of factors:
1.  Was the user "created" by the developer? - If yes, then you have write permissions
2.  Has the developer requested and received write permissions directly from the TON User? - If yes, then you have write permissions
3.  For publishing data to sites, a site must be specifically in the list of sites that you have write access to.

Special note on duplicate content.  The TON 2.0 API traps for duplicate content, specifically looking at submissions to see if they duplicate existing content in the system.  If the system determines a match, the content will not be published and the API will throw an error 150 - Duplicate Content Error


tonadmin namespace ERROR CODES

101 - Account not authorized with access to tonadmin
102 - Invalid write permissions for site
103 - Invalid write permissions for user
104 - Invalid write permissions for object
110 - Invalid channel id
111 - Invalid category id
112 - Invalid subcategory id
113 - Invalid place id
114 - Invalid special series id
115 - Invalid user id
116 - Invalid site id
117 - Invalid external_source_id
118 - Missing Default external_source_id
150 - Duplicate Content Error


 



tonadmin.articles.submitArticle

This method submits an article to TON and returns the article identifier.

PERMISSIONS
This method requires the developer key have "write" permissions to the site they are submitting to, and the user they are submitting on behalf of (optional).  In addition, you must have at least 1 external_source defined in your developer profile, if not, this method will return an error.

ARGUMENTS

 key (required)
 external_source_id (optional)
               one of the external sources that your developer account has access to publish on behalf of.  If empty, content will be published to your default external source.
 title (required)
 body (required)
 article_type_id (required) 
                one of the id's returned by tonadmin.articles.getArticleTypes
 channel (optional)
 category (optional)
 sub_category (optional)
 place (optional)
 special_series (optional)
                Note:  you must have "write" permissions to the special series you are publishing to, if specified
 site (optional)
                defaults to the site_id of the TON Site you are submitting to
 author_user (optional)
                defaults to the user_id associated with the apikey.  If submitting on behalf of another user, you must have write permissions to their account
 allow_comments (optional)
                defaults to 1 (true), set to 0 to disable comments on the article.


EXAMPLE RESPONSE
 

<rest>
    <data identifier="my_new_article_name_id">       
    </data>
</rest>


ERROR CODES

1 - Missing title or body
2 - Invalid Article Type Id

 

 

The following is a list of common parameters used by requests to the TON 2.0 API


channel
The channel is the unique identifier the channel to limit the results by.  For example, to return only articles that are in the Fishing channel, set channel=fishing.  For a list of all channels, categories and sub categories, see the TON 2.0 Developers Category Reference


category
The category is the unique identifier the category to limit the results by.  For example, to return only articles that are in the Big Game Hunting Category set category=the_big_game_hunting_category  For a list of all channels, categories and sub categories, see the TON 2.0 Developers Category Reference


sub_category
The sub_category is the unique identifier the sub_category to limit the results by.  For example, to return only articles that are in the Elk Hunting Sub Category, set sub_category=the_elk_hunting_category_f  For a list of all channels, categories and sub categories, see the TON 2.0 Developers Category Reference

special_series
Return a list of content limited to the specified Special Section.   For a list of all channels, categories and sub categories, see the TON 2.0 Developers Category Reference

place
Limit results to a specific "place" or region/geo.   e.g.  set place=devils_lake

owner
Retrieve only content for a specific "owner" or TON Member.  set owner=the_owner_identifier

site
Retrieve only content for a specific site - Leave empty to retrieve from all sites.   For a list of Site Codes - See the TON 2.0 Developers Category Reference

q
Query content and return matching results


tags
Return content that contains at least one of the specified tags.  Multiple tags should be separated by Commas.  e.g.  tags=walleye  or you could do:  tags=walleye,walleyes,eyes

ct
Limit the results to a specific content type.  Used in various methods that are not specific (e.g.  ton.content.getRecent accepts the ct parameter).  You can specify multiple content types by separating them by commas.   ct=8 would return only articles.  ct=8,12 would return articles and photos.  For a complete list of content types, see the TON 2.0 Developers Category Reference

app_p
Page number to return when paging through results.  Defaults to 1

app_pp
Number of items to return (per page).  Defaults to 10, but default may change depending on the method implemented.  See specific notes for each method

 

 

 

 Whenever the TON 2.0 API returns data under an <rs> node.  The <rs> node will contain an attribute indicating the type of data that is contained in the following row elements.

The following is a list of resultTypes and the attributes that are returned in each <row> node

Result Type Codes

  • content
  • user_feed
  • buddy_list



content
The content result type is as follows:

 <rs resultType="content">
  <row  attributes.....>
  <row  attributes.....>
</rs>

The following attributes are returned for each row element.

  • ContentId - A unique integer for this item
  • Title - The title of the item
  • Blurb - A short blurb or description for the item
  • Identifier - A unique string identifier for this content.  This is used in all URL's and subsequent api calls related to this content item
  • Url - A unique url for this item excluding the domain name
  • TotalViews - total views for this item
  • TotalComments - total comments for this item
  • TotalRatings - total ratings for this item
  • AverageRating - average rating score for this item
  • AddedDateTime - Date/Time this item was added
  • SiteCommonName - Name of the TON Site this item was published to
  • SitePrimaryUrl - Url of the TON Site this item was published to 
  • ContentTypeName - Type of content (see Content Type Reference)
  • ChannelName - Name of the channel
  • CategoryName - Name of the category
  • SubCategoryName - Name of the subcategory
  • SpecialSeriesName - Special Series Name
  • GeoName - Geo (place) name
  • FullUrl - Full Url to the item including site's domain name
  • ImageUrl - Full url to the primary image associated with this item (160px Wide Format)

All types of content extend these paramaters and may add more (see Content Type Reference)




















 




 

 




 




Total Outdoor Network
About | Contact | Advertise | Developers and Webmasters

More from TON TON Sites | Classifieds | Outdoor Business Directory


	2010-03-16 20:42:05 (CDT)
	2
	Warning
	Unknown: write failed: No space left on device (28)
	Unknown
	0
	/ton_2_0_developers_api_documentation
	38.107.191.81
	CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
	app_ident=ton_2_0_developers_api_documentation
	


 TON ERROR ID NUMBER: E1268790125698

	2010-03-16 20:42:05 (CDT)
	2
	Warning
	Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session)
	Unknown
	0
	/ton_2_0_developers_api_documentation
	38.107.191.81
	CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
	app_ident=ton_2_0_developers_api_documentation
	


 TON ERROR ID NUMBER: E1268790125834