API Reference

Collections.getCollectionInfo

This method returns collection information about the requested collection ID.


Syntax

bool collections.getCollectionInfo ( int collection )

Arguments

NameTypeRequiredDefault valueDescription
collectionintRequirednoneThe ID of the collection.

Response

The response will contain data about the collection.

NameTypeDescriptionDefault Values
idINTThe collection IDINT
vhostINTThe vhost ID that the collection belongs to.INT
thumbnailSTRINGA thumb url of an image to represent the collection.empty STRING
typeINTThis determines whether the collection is a saved search collection or a manual collection. Saved search is represented by 1 and manual collection by 2.1/2
nameSTRINGThe name of the collection. This is used for recognition of the channel.STRING
descriptionSTRINGAn overview of the media content that is in the collection.STRING
createdYYYY-MM-DD HH:MM:SSThe date the collection was created in our system.YYYY-MM-DD HH:MM:SS
baseurlSTRINGDEPRECATEDSTRING
channelINTThe channel that is used as a filter if the collection type is a saved search.empty / channel ID
addtotopINTWhen this is set the channel will be added to the top of the channel list.0/1
autoactiveINTThis sets the collection that it will be set as published as its default state.0/1

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/collections/getCollectionInfo?collection=[COLLECTION_ID]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <id>COLLECTION_ID</id>
  <vhost>VHOST_ID</vhost>
  <thumbnail/>
  <type>2</type>
  <name>COLLECTION_NAME</name>
  <description>Saved Collection Description</description>
  <created>2012-02-01 10:45:01</created>
  <baseurl/>
  <channel>FILTERED_CHANNEL_ID</channel>
  <addToTop>0</addToTop>
  <autoActive>1</autoActive>
</result>
Sample JSON Response
{
    "status": true,
    "result": {
        "id": COLLECTION_ID,
        "vhost": VHOST_ID,
        "thumbnail": null,
        "type": 2,
        "name": "COLLECTION_NAME",
        "description": "Saved Collection Description",
        "created": "2012-02-01 10:45:01",
        "baseurl": null,
        "channel": FILTERED_CHANNEL_ID,
        "addToTop": 0,
        "autoActive": 1
    }
}

Code examples

0 comments

Be the first to comment on getCollectionInfo.

Add a Comment

  • captcha