photos.editPhoto

Description

Edits or creates a new photo

Authentication

This method requires authentication with ‘write’ permission.

API Version

Version 1&2

Required parameters

  • None

Optional parameters

  • photos_id :
    the id number of the photo. If this is included, the photo’s details are edited rather than uploading a new photo. The list of photo ids is available from the photos.getList call.
  • photo :
    this is the photo itself which should be encapsulated as part of a multipart/form-data submission via an HTTP POST action. This parameter is required to upload a new photo to the site in which case the photo_id parameter is not passed in.
  • group_id :
    the id number of the group to which the photo belongs. If this is included, the photo is added to that group’s gallery instead of the site gallery. The list of group ids is available from the groups.getList call.
  • caption :
    the caption for the photo
  • default :
    this is a boolean value (0=false, 1=true) which determines if the photo is to be the default photo for the user or group to which it belongs.
  • shared :
    this is a boolean value which determines if the photo is shared in the site gallery

Example response

<?xml version="1.0"?>
<response status="ok" time="Tue, 22 Apr 2008 15:46:04 -0500">
    <photos count="1">
        <photo>
            <photos_id>39</photos_id>
        </photo>
    </photos>
</response>

photos.deletePhoto

Description

Deletes a photo from the site

Authentication

This method requires authentication with ‘write’ permission.

API Version

Version 1&2

Required parameters

  • photos_id :
    the id number of the photo. The list of photo ids is available from the photos.getList call.

Optional parameters

  • None

Example response

<?xml version="1.0"?>
<response status="ok" time="Tue, 22 Apr 2008 15:54:17 -0500">
    <photos count="1">
        <photo>
            <status>
                <![CDATA[ok]]>
            </status>
        </photo>
    </photos>
</response>

photos.getList

Description

Returns a list of photos on a site

API Version

Version 1&2

Required parameters

  • None

Optional parameters

  • photos_id :
    the id number of the photo
  • link :
    the link to the photo which must be appended to the site URL (ex. http://SITENAME/LINK)
  • thumb_link :
    the link to the photo’s thumbnail and is used like the photo link
  • caption :
    the caption for the photo
  • status :
    this is a boolean value (0=false, 1=true) which determines if the photo has been approved by a site administrator
  • group_id :
    the id number of the group to which the photo belongs. If this is 0, then the photo does not belong to a group. The list of group ids is available from the groups.getList call.
  • user_id :
    the id number of the user to whom the photo belongs. The list of user ids is available from the users.getList call.
  • total_ratings :
    the total number of ratings for this photo
  • average_rating :
    the average rating for this photo
  • default :
    this is a boolean value (0=false, 1=true) which determines if the photo is to be the default photo for the user or group to which it belongs.
  • shared :
    this is a boolean value which determines if the photo is shared in the site gallery
  • uploaded :
    the date on which the photo was uploaded formatted to RFC 822 standards
  • ss_key : the key of the community associated with the photo. The list of communities is available from the communities.getList call.
  • interest_key : the key of a site interest associated with the photo. The list of interests is available from the siteinterests.getList call.
  • subinterest_key : the key of a site sub-interest associated with the photo. The list of interests is available from the siteinterests.getList call.

Example response

<?xml version="1.0"?>
<response status="ok" time="Tue, 22 Apr 2008 14:55:16 -0500">
    <photos count="2" total="34">
        <photo>
            <photos_id>2</photos_id>
            <link>

                <![CDATA[upimg/e4da3b7fbbce2345d7772b0674a318d5/PIC_0001.jpg]]>
            </link>
            <thumb_link>
                <![CDATA[upimg/e4da3b7fbbce2345d7772b0674a318d5/th_PIC_0001.jpg]]>
            </thumb_link>
            <caption>

                <![CDATA[my house]]>
            </caption>
            <status>1</status>
            <group_id>0</group_id>
            <user_id>5</user_id>

            <total_ratings>0</total_ratings>
            <average_rating/>
            <default>1</default>
            <shared>0</shared>

            <category_id/>
            <uploaded>
                <![CDATA[Wed, 03 Oct 2007 00:12:29 -0500]]>
            </uploaded>
            <views>0</views>

        </photo>
        <photo>
            <photos_id>4</photos_id>
            <link>
                <![CDATA[upimg/1679091c5a880faf6fb5e6087eb1b2dc/47063d696febclee.jpg]]>

            </link>
            <thumb_link>
                <![CDATA[upimg/1679091c5a880faf6fb5e6087eb1b2dc/th_47063d696febclee.jpg]]>
            </thumb_link>
            <caption>
                <![CDATA[Me and Norah]]>

            </caption>
            <status>1</status>
            <group_id>0</group_id>
            <user_id>6</user_id>

            <total_ratings>1</total_ratings>
            <average_rating>5.0</average_rating>
            <default>1</default>
            <shared>1</shared>

            <category_id/>
            <uploaded>
                <![CDATA[Fri, 05 Oct 2007 08:34:33 -0500]]>
            </uploaded>
            <views>7</views>

            <comments count="2">
                <comment>
                    <user_id>8</user_id>
                    <comment_id>1</comment_id>
                    <body>

                        <![CDATA[Cool!]]>
                    </body>
                    <last_update>
                        <![CDATA[Tue, 30 Oct 2007 14:42:37 -0500]]>
                    </last_update>
                </comment>

                <comment>
                    <user_id>17</user_id>
                    <comment_id>3</comment_id>
                    <body>
                        <![CDATA[Norah is a beautiful name; how old is your daughter Lee?]]>

                    </body>
                    <last_update>
                        <![CDATA[Wed, 07 Nov 2007 12:32:18 -0600]]>
                    </last_update>
                </comment>
            </comments>

        </photo>
    </photos>
</response>

photos.getComments

Description

Returns photo comments specified by a date, user id, or photo id

Authentication

This method requires authentication without user credentials.

Required parameters

  • start_date, user_id or photo_id

Optional parameters

  • end_date :
    the end date if searching for comments in a specified range

Example response

<?xml version="1.0"?>
<response status="ok" time="Wed, 08 Apr 2009 09:51:53 -0500" p="0.13329291343689">
    <photo_comments count="1">
        <photo_comment>
            <item_0>
                <id>1</id>
                <modified><![CDATA[2009-03-27 11:30:00]]></modified>
                <photoId>2</photoId>
                <userId>3</userId>
                <rating>0</rating>
                <subject></subject>
                <comment><![CDATA[asdfasdfafds]]></comment>
            </item_0>
            <item_1>
                <id>2</id>
                <modified><![CDATA[2009-03-27 11:30:04]]></modified>
                <photoId>2</photoId>
                <userId>3</userId>
                <rating>0</rating>
                <subject></subject>
                <comment><![CDATA[asfdasfd]]></comment>
            </item_1>
        </photo_comment>
    </photo_comments>
</response>