AboutContactLogin

Index

SearchPhotoByCategory

The SearchPhotoByCategory method searches photos by a specified category.

PhotoResult SearchPhotoByCategory(
    string searchId,
    SortOrder sortOrder,
    int categoryCode,
    int offset,
    int limit
    )

Parameters

searchId
Search identifier (see Remarks)
sortOrder
Sorting order of the search results. Only Popularity and Date are applicable to this method.
categoryCode
Category code as obtained from a call to GetCategories
offset
Offset from the beginning of search results
limit
The number of items to return

Returns

A search result object that encapsulates the list of photos returned by this call as well as the total number of search results

Remarks

Specifying the same value for the searchId parameter in a series of calls to this method advises the system that the same search is made so that the previous search results can be reused. This is useful when an application is retrieving search results in pages by calling this method several times with only offset and limit parameters varying from call to call.

Passing null or an empty string in searchId ensures that no search results are reused and a new search is made.

The information returned by this method is subject to access control. The method will only return photos accessible to the current user.

See Also