Returns the list of channels for the specified vhost.
array channels.getChannels ( int vhost, mixed order = false, mixed visibility = 'ALL', int parentchannel = false )
Name | Type | Required | Default value | Description |
---|---|---|---|---|
vhost | int | Required | none | The vhost ID that the list of channels belong to in MediaFactory. |
order | mixed | Optional | false | The order in which you wish to have the channel list returned to you in. |
visibility | mixed | Optional | 'ALL' | The visibility of the channel you want to filter on for the returned list of channels. |
parentchannel | int | Optional | false | If set - the component returns only channels that are children of the given channel. |
This is the response received on success of the getChannels method call. If there are no channels in your vhost you will be returned an empty XML response.
Name | Type | Description | Possible Values |
---|---|---|---|
id | INT | The current channel ID. | INT channel ID |
created | YYYY-MM-DD HH:MM:SS | The date the channel was created. | YYYY-MM-DD HH:MM:SS |
vhost | INT | The vhost ID. | INT |
name | STRING | The channel name defined in MediaFactory. | STRING |
shortname | STRING | The given short given retrieved in MediaFactory. By Default this is the channel name, all lowercase and have spaces " " replaced by underscores "_". | STRING |
parentchannel | INT | The ID of the current channel's parent. This is for nested channel lists. | INT |
thumburl | STRING | OBSOLETE | STRING |
status | INT | The moderation status of the current channel. | 0,1,2,3,4 |
description | STRING | A short summary for the purpose of the channel. This is defined in MediaFactory. | STRING |
readonly | INT | OBSOLETE | 0/1 |
disableembed | INT | DEPRECATED | 0/1 |
modemailaccepted | INT | The ID of the email to use for Media approved in the channel. | INT |
modemaildenied | INT | The moderation email ID of the email to use for Media denied in the channel. | INT |
emailaddress | STRING | Email address to be used for media intake through email. Leave empty to disable, must be unique. | STRING |
defaultsort | STRING | The default sort order of the media within the channel. | 'name ASC', 'name DESC', 'shortname ASC', 'shortname DESC', 'id ASC', 'id DESC', 'createdDate ASC', 'createdDate DESC' |
visibility | STRING | The current visibility of the channel. | SHOWN, HIDDEN |
geoblocking | STRING | A list of accepted country codes to have the content from the channel display. This setting is set in the channel settings. | ca,us,au etc. |
groupid | DEPRECATED | DEPRECATED | DEPRECATED |
groupname | DEPRECATED | DEPRECATED | DEPRECATED |
<?xml version="1.0" encoding="UTF-8"?> <result> <item> <id>CHANNEL_ID</id> <created>2012-01-20 12:08:57</created> <vhost>VHOST_ID</vhost> <name>Comments</name> <shortname>comments</shortname> <parentchannel>0</parentchannel> <thumburl/> <status>1</status> <description/> <readonly>0</readonly> <disableembed>0</disableembed> <modemailaccepted>0</modemailaccepted> <modemaildenied>0</modemaildenied> <emailaddress/> <defaultsort>upload DESC</defaultsort> <visibility>SHOWN</visibility> <geoblocking/> <groupid>0</groupid> <groupname/> </item> <item> <id>CHANNEL_ID</id> <created>2012-01-20 12:08:44</created> <vhost>VHOST_ID</vhost> <name>Documentation</name> <shortname>documentation</shortname> <parentchannel>0</parentchannel> <thumburl/> <status>1</status> <description/> <readonly>0</readonly> <disableembed>0</disableembed> <modemailaccepted>4266</modemailaccepted> <modemaildenied>0</modemaildenied> <emailaddress/> <defaultsort>upload DESC</defaultsort> <visibility>SHOWN</visibility> <geoblocking/> <groupid>0</groupid> <groupname/> </item> </result>
{ "status": true, "result": [ { "id": "CHANNEL_ID", "created": "2012-01-20 12:08:57", "vhost": "VHOST_ID", "name": "Comments", "shortname": "comments", "parentchannel": "0", "thumburl": "", "status": "1", "description": "", "readonly": "0", "disableembed": "0", "modemailaccepted": "0", "modemaildenied": "0", "emailaddress": null, "defaultsort": "upload DESC", "visibility": "SHOWN", "geoblocking": null, "groupid": "0", "groupname": "" }, { "id": "CHANNEL_ID", "created": "2012-01-20 12:08:44", "vhost": "VHOST_ID", "name": "Documentation", "shortname": "documentation", "parentchannel": "0", "thumburl": "", "status": "1", "description": "", "readonly": "0", "disableembed": "0", "modemailaccepted": "4266", "modemaildenied": "0", "emailaddress": null, "defaultsort": "upload DESC", "visibility": "SHOWN", "geoblocking": null, "groupid": "0", "groupname": "" } ] }