API Reference

Media.getTagList

Retrieve a list of tags for a media item.

This method returns an array containing a tag, hits and count key.

The response of this method can be sorted on 'tag', 'count' (for the number of occurrences of the tag) and 'hits' for the popularity of the tag.


Syntax

mixed media.getTagList ( mixed vhost, mixed sort = 'tag ASC', array filters = array(), mixed limit = 25, mixed startsWith = false )

Arguments

NameTypeRequiredDefault valueDescription
vhostmixedRequirednone
sortmixedOptional'tag ASC'
filtersarrayOptionalarray()
limitmixedOptional25
startsWithmixedOptionalfalse

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/media/getTagList?vhost=[VHOST_ID]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <item>
    <name>accounts</name>
    <hits>0</hits>
    <count>1</count>
  </item>
  <item>
    <name>channels</name>
    <hits>0</hits>
    <count>1</count>
  </item>
  <item>
    <name>example</name>
    <hits>0</hits>
    <count>1</count>
  </item>
</result>
Sample JSON Response
{
    "status": true,
    "result": [
        {
            "name": "accounts",
            "hits": "0",
            "count": "1"
        },
        {
            "name": "channels",
            "hits": "0",
            "count": "1"
        },
        {
            "name": "example",
            "hits": "0",
            "count": "1"
        }
    ]
}

Code examples

0 comments

Be the first to comment on getTagList.

Add a Comment

  • captcha