Difference between revisions of "API Usage Guide"

From SailBlogs Support Wiki
Jump to: navigation, search
Line 13: Line 13:
 
Datatype indicator. This tells the API what kind of information you're requesting. Possible values are:
 
Datatype indicator. This tells the API what kind of information you're requesting. Possible values are:
 
* blog
 
* blog
 +
** items
 
* contents
 
* contents
 
* comments
 
* comments

Revision as of 14:24, 19 January 2010

The following section describes the HTTP requests that can be made to the SailBlogs server, and the XML response that is returned.

Base URL

All calls to the SailBlogs API will be made to the following URL:

http://www.sailblogs.com/api/sbapi.php

URL Parameters

auth

Authorization key. This is REQUIRED for all API calls.

http://www.sailblogs.com/api/sbapi.php?auth=ZGVtb0BzYWlsYmxvZ3MuY29tOmxhbmRyMHZlcg,,

dt

Datatype indicator. This tells the API what kind of information you're requesting. Possible values are:

  • blog
    • items
  • contents
  • comments
  • curxp
  • curpc
  • test

dt=blog

http://www.sailblogs.com/api/sbapi.php?auth=ZGVtb0BzYWlsYmxvZ3MuY29tOmxhbmRyMHZlcg,,&dt=blog

Returns:

<xjournal>
   <api_res>0</api_res>
   <api_res_msg>Ok</api_res_msg>
   <entry>
      <msgID>114806</msgID>
      <postDate>2009-09-29 11:09:37</postDate>
      <title>This is test entry 3 with a lat/long included</title>
      <location>Minneapolis</location>
      <author></author>
      <imageFile/>
      <thumbnail/>
      <teaser>
      This is a blog post that includes a lat/long reference and a youtube video:

      [%youtube*http://www.youtube.com/watch?v=-lriRLdiAQE%v]

      Line below video...
      </teaser>
      <body>
      This is a blog post that includes a lat/long reference and a youtube video:
      
      [%youtube*http://www.youtube.com/watch?v=-lriRLdiAQE%v]

      Line below video...
      </body>
      <comments>0</comments>
      <nextmsg/>
      <prevmsg/>
      <latitude>44 57.22'N</latitude>
      <longitude>193 22.36'W</longitude>
      <declat>44.9537</declat>
      <declong>-193.3727</declong>
   </entry>
</xjournal>