TotSpot

Firsts (Milestones)

Methods:

get_all

Returns all the firsts for the given user.

parameters: -
formats: xml, json
endpoint: http://totspot.com/api/firsts/get_all?format=xml / http://totspot.com/api/firsts/get_all?format=json
Sample response:
<?xml version="1.0" encoding="UTF-8"?>
<milestones type="array">
  <milestone>
    <actual-date type="datetime">2008-04-01T00:00:00Z</actual-date>
    <description><![CDATA[<strong>Tom</strong> first made eye contact on <strong>April 1st 2008</strong> with <strong>mummy</strong>. He looked <strong>astonished</strong>.]]></description>
  </milestone>
  <milestone>
    <actual-date type="datetime">2008-04-08T00:00:00Z</actual-date>
    <description><![CDATA[<strong>Tom</strong> lost  first tooth on <strong>April 8th 2008</strong>.]]></description>
  </milestone>
</milestones>

Favorites

Formats

Both "json" and "xml" formats are available and can be chosen by sending the "format" parameter in the request.

Available Methods

The "create" method

The "create" method will create a Favorite out of a "value" and a "description" The method will always return the "Favorite" that was just created on TotSpot.

Request

To list a new Favorite, you should make a HTTP request to "http://totspot.com/api/favorite/create". The following parameters are accepted and mandatory:
  • "description" - This is what your favorite is (e.g.: "toy")
  • "value" - This is your favorite "thing" (that you described in the description above) (e.g.: "rubber duck")
This would create a Favorite telling that a "rubber duck" is this kid's favorite "toy".

Response

Hopefully, if you've done everything right on your end and we did on our, you should get a response like this:

<?xml version="1.0" encoding="UTF-8"?>
<favorite>
  <created-at type="datetime">2008-02-16T19:37:57+00:00</created-at>
  <description>toy</description>
  <id type="integer">2</id>
  <updated-at type="datetime">2008-02-16T19:37:57+00:00</updated-at>
  <value>a rubber duck</value>
  <sentence>Tiago's favorite toy is a rubber duck.</sentence>
</favorite>

The "get_all" method

This method will get all of the Favorites from a given user.

Request

You just need to make a HTTP request to "http://totspothome.com/api/video/get_all". This method requests no parameters but the "format" one.

Response

Again, if everything goes as it should, this is the response you can expect:

<?xml version="1.0" encoding="UTF-8"?>
<favorites type="array">
  <favorite>
    <created-at type="datetime">2008-02-16T19:37:57+00:00</created-at>
    <description>toy</description>
    <id type="integer">2</id>
    <updated-at type="datetime">2008-02-16T19:37:57+00:00</updated-at>
    <value>a rubber duck</value>
    <sentence>Tiago's favorite toy is a rubber duck.</sentence>
  </favorite>
  <favorite>
    <created-at type="datetime">2008-02-16T19:37:57+00:00</created-at>
    <description>fruit</description>
    <id type="integer">2</id>
    <updated-at type="datetime">2008-02-16T19:37:57+00:00</updated-at>
    <value>banana</value>
    <sentence>Tiago's favorite fruit is banana.</sentence>
  </favorite>
</favorites>

Please Login or Signup to the developer section to manage your applications.

API Documentation

© TotSpot - All rights reserved. | Contact us