Skip to content
Alban LEROUX edited this page Oct 3, 2011 · 3 revisions

API

photo.count

Return the number of photos in database.

require read grant access

Request example

GET http://example.com/api/get/photo.count/json/?visible=1&filter[publish-date-interval][start]=2011-05-01T00:00:00+00:00&filter[publish-date-interval][end]=2011-05-31T00:00:00+00:00
{
	"method"  : "photo.count",
	"request" : 
	{
		"filter" :
		{
			"visible"               : true,
			"publish-date-interval" :
			{
				"start" : "2011-05-01T00:00:00+00:00",
				"end"   : "2011-05-31T23:59:59+00:00"  
			}
		}
	}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<method>photo.count</method>
	<request>
		<filter>
			<visible>true</visible>
			<publish-date-interval>
				<start>2011-05-01T00:00:00+00:00</start>
				<end>2011-05-31T23:59:59+00:00</end>
			</publish-date-interval>
		</filter>
	</request>
</xml>

Response example

{
	"status"   : "valid",
	"response" :
	{
		"total" : 12
	}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<status>valid</status>
	<response>
		<total>12</total>
	</response>
</xml>

Arguments

  • [filter]: filter the total of photo
    • [visible]: a boolean value, visible or not visible photo
    • [publish-date-interval]: *[start]: RFC 3339 datetime, the min photo publish date *[end]: RFC 3339 datetime, the max photo publish date

Return values

  • total : The number of photo
Clone this wiki locally