API Reference

Media.getMediaByMetaData

<p>Returns a list of media based on provided parameters.</p>

<p>The actual return value is a struct with the totalCount and data properties. <code>totalCount</code> contains the number of items that would have been returned if there was no offset or limit specified.</p>

<p><code>pageSize</code> has a maximum value of 500 - ie. no more than 500 media items will ever be returned from a single call to this function.</p>

<p>If no API key is supplied, or there are insufficient permissions, this method will switch to anonymous mode.  In that situation, if global moderation is set for this project it will never return unmoderated files.</p>


Syntax

mixed media.getMediaByMetaData ( mixed vhost, mixed metadata = array(), mixed filters = array(), mixed start = 0, mixed limit = 20, mixed type = 'AND', mixed sort = 'upload DESC', mixed fields = array(), mixed includeChildMedia = 0, mixed childFilters = array(), mixed childFields = array(), mixed childSort = 'UPLOAD DESC', mixed voter_uid = 0, mixed parentFields = array() )

Arguments

NameTypeRequiredDefault valueDescription
vhostmixedRequirednone
metadatamixedOptionalarray()
filtersmixedOptionalarray()
startmixedOptional0
limitmixedOptional20
typemixedOptional'AND'
sortmixedOptional'upload DESC'
fieldsmixedOptionalarray()
includeChildMediamixedOptional0
childFiltersmixedOptionalarray()
childFieldsmixedOptionalarray()
childSortmixedOptional'UPLOAD DESC'
voter_uidmixedOptional0
parentFieldsmixedOptionalarray()

Sample Response

Code examples

0 comments

Be the first to comment on getMediaByMetaData.

Add a Comment

  • captcha