TotSpot

Photos

Methods:

get_photo

Returns the photo details and URLs for the various sizes.

parameters: id
formats: xml, json
endpoint: http://totspot.com/api/photos/get_photo/<id>.xml / http://totspot.com/api/photos/get_photo/<id>.json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photo>
  <created-at type="datetime">2008-04-11T14:01:05Z</created-at>
  <description nil="true"></description>
  <filename>2115626948_64c7da9388_o.jpg</filename>
  <height type="integer">2304</height>
  <id type="integer">866</id>
  <photo-set-id type="integer" nil="true"></photo-set-id>

  <size type="integer">2808083</size>
  <taken-at type="datetime">2007-12-15T23:23:20Z</taken-at>
  <title>IMG_4145</title>
  <width type="integer">3456</width>
  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb512.jpg</large>

    <square>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/866/2115626948_64c7da9388_o.jpg</original>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb32.jpg</thumbnail>
  </urls>
</photo>

get_photoset

Returns the photoset details including the photos and URLs for the various sizes.

parameters: id
formats: xml, json
endpoint: http://totspot.com/api/photos/get_photoset/<id>.xml / http://totspot.com/api/photos/get_photoset/<id>.json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photo-set>
  <cover-id type="integer" nil="true"></cover-id>
  <created-at type="datetime">2008-08-21T15:55:18Z</created-at>
  <description nil="true"></description>
  <id type="integer">2872</id>
  <title>TotSpot Screens</title>
  <photos>

<photo>
  <created-at type="datetime">2008-08-21T15:55:25Z</created-at>
  <description nil="true"></description>
  <filename>2551937136_2716a810f3.jpg</filename>
  <height type="integer">328</height>
  <id type="integer">72776</id>
  <photo-set-id type="integer">2872</photo-set-id>

  <size type="integer">76671</size>
  <taken-at type="datetime">2008-08-21T15:55:25Z</taken-at>
  <title>TotSpot - Journal Page</title>
  <width type="integer">500</width>
  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/72776/2551937136_2716a810f3_thumb512.jpg</large>

    <square>http://s3.amazonaws.com/projectbprod/thumbnails/72776/2551937136_2716a810f3_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/72776/2551937136_2716a810f3.jpg</original>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/72776/2551937136_2716a810f3_thumb32.jpg</thumbnail>
  </urls>
</photo>
<photo>
  <created-at type="datetime">2008-08-21T15:55:24Z</created-at>
  <description nil="true"></description>

  <filename>2551113879_0508679840.jpg</filename>
  <height type="integer">420</height>
  <id type="integer">72775</id>
  <photo-set-id type="integer">2872</photo-set-id>
  <size type="integer">120057</size>
  <taken-at type="datetime">2008-08-21T15:55:24Z</taken-at>

  <title>TotSpot - Firsts Page</title>
  <width type="integer">500</width>
  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/72775/2551113879_0508679840_thumb512.jpg</large>
    <square>http://s3.amazonaws.com/projectbprod/thumbnails/72775/2551113879_0508679840_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/72775/2551113879_0508679840.jpg</original>

    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/72775/2551113879_0508679840_thumb32.jpg</thumbnail>
  </urls>
</photo>
<photo>
  <created-at type="datetime">2008-08-21T15:55:23Z</created-at>
  <description nil="true"></description>
  <filename>2551937594_7fdacba5cc.jpg</filename>
  <height type="integer">439</height>

  <id type="integer">72774</id>
  <photo-set-id type="integer">2872</photo-set-id>
  <size type="integer">100016</size>
  <taken-at type="datetime">2008-08-21T15:55:22Z</taken-at>
  <title>TotSpot - Photo Collection Page</title>
  <width type="integer">500</width>

  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/72774/2551937594_7fdacba5cc_thumb512.jpg</large>
    <square>http://s3.amazonaws.com/projectbprod/thumbnails/72774/2551937594_7fdacba5cc_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/72774/2551937594_7fdacba5cc.jpg</original>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/72774/2551937594_7fdacba5cc_thumb32.jpg</thumbnail>
  </urls>
</photo>

<photo>
  <created-at type="datetime">2008-08-21T15:55:21Z</created-at>
  <description nil="true"></description>
  <filename>2551113699_22f7f4194a.jpg</filename>
  <height type="integer">500</height>
  <id type="integer">72773</id>
  <photo-set-id type="integer">2872</photo-set-id>

  <size type="integer">128044</size>
  <taken-at type="datetime">2008-08-21T15:55:21Z</taken-at>
  <title>TotSpot - Sample "Tiger Woods" Profile</title>
  <width type="integer">422</width>
  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/72773/2551113699_22f7f4194a_thumb512.jpg</large>

    <square>http://s3.amazonaws.com/projectbprod/thumbnails/72773/2551113699_22f7f4194a_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/72773/2551113699_22f7f4194a.jpg</original>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/72773/2551113699_22f7f4194a_thumb32.jpg</thumbnail>
  </urls>
</photo>
  </photos>
</photo-set>

get_photosets

Returns a photoset list, including only the photoset details.

formats: xml, json
endpoint: http://totspot.com/api/photos/get_photosets/1.xml / http://totspot.com/api/photos/get_photosets/1.json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photo-sets type="array">
  <photo-set>
    <cover-id type="integer" nil="true"></cover-id>
    <created-at type="datetime">2008-08-21T15:55:18Z</created-at>
    <description nil="true"></description>
    <id type="integer">2872</id>
    <title>TotSpot Screens</title>

  </photo-set>
</photo-sets>

get_unsorted

Returns a list of photos that aren't included in any set.

formats: xml, json
endpoint: http://totspot.com/api/photos/get_unsorted/1.xml / http://totspot.com/api/photos/get_unsorted/1.json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photos>
<photo>
  <created-at type="datetime">2008-04-11T14:01:05Z</created-at>
  <description nil="true"></description>
  <filename>2115626948_64c7da9388_o.jpg</filename>
  <height type="integer">2304</height>
  <id type="integer">866</id>

  <photo-set-id type="integer" nil="true"></photo-set-id>
  <size type="integer">2808083</size>
  <taken-at type="datetime">2007-12-15T23:23:20Z</taken-at>
  <title>IMG_4145</title>
  <width type="integer">3456</width>
  <urls>
    <original>http://s3.amazonaws.com/projectbprod/photos/866/2115626948_64c7da9388_o.jpg</original>

    <large>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb512.jpg</large>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb32.jpg</thumbnail>
    <square>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb128.jpg</square>
  </urls>
</photo>
</photos>

create_photoset

Creates a photoset with the given parameters and returns it. If something goes wrong, an http response with status 500 is sent.

parameters: title (mandatory), description
formats: xml, json
endpoint: http://totspot.com/api/photos/create_photoset/1.xml / http://totspot.com/api/photos/create_photoset/1.json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photo-set>
  <cover-id type="integer" nil="true"></cover-id>
  <created-at type="datetime">2008-08-21T15:55:18Z</created-at>
  <description nil="true"></description>
  <id type="integer">2872</id>
  <title>TotSpot Screens</title>
  <photos>
  </photos>
</photo-set>

get_security_hash

Returns a security hash needed to use the upload_photo method, to circumvent problems with oauth multipart requests.

parameters: -
formats: xml, json
endpoint: http://totspot.com/api/photos/get_security_hash/?format=xml / http://totspot.com/api/photos/get_security_hash/?format=json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <hash>02ffd6256c9e654ec78552bc0273994ff98a92f3</hash>
  <u>tom</u>
  <m>daddy</m>
</hash>

upload_photo

Creates a photo with the given parameters and returns it. If something goes wrong, an http response with status 500 is sent.

In order to upload photos to Totspot, you'll need to use the get_security_hash method. That method will return a user-specific hash that gives you access to upload photos using a standard HTTP POST. This hash should be sent as the parameter "hash". The API also expects a "u" parameter with the baby username and a "m" parameter with the manager username.

parameters: title, description, uploaded_data (mandatory), photo_set_id, u, m, hash
formats: xml, json
endpoint: http://totspot.com/api/photos/upload_photo/?m=<m>&u=<u>&hash=<hash>&format=xml / http://totspot.com/api/photos/upload_photo/?m=<m>&u=<u>&hash=<hash>&format=json
Sample Response:
<?xml version="1.0" encoding="UTF-8"?>
<photo>
  <created-at type="datetime">2008-04-11T14:01:05Z</created-at>
  <description nil="true"></description>
  <filename>2115626948_64c7da9388_o.jpg</filename>
  <height type="integer">2304</height>
  <id type="integer">866</id>
  <photo-set-id type="integer" nil="true"></photo-set-id>

  <size type="integer">2808083</size>
  <taken-at type="datetime">2007-12-15T23:23:20Z</taken-at>
  <title>IMG_4145</title>
  <width type="integer">3456</width>
  <urls>
    <large>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb512.jpg</large>

    <square>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb128.jpg</square>
    <original>http://s3.amazonaws.com/projectbprod/photos/866/2115626948_64c7da9388_o.jpg</original>
    <thumbnail>http://s3.amazonaws.com/projectbprod/thumbnails/866/2115626948_64c7da9388_o_thumb32.jpg</thumbnail>
  </urls>
</photo>

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

API Documentation

© TotSpot - All rights reserved. | Contact us