API Reference

Channels.getChannels

Returns the list of channels for the specified vhost.


Syntax

array channels.getChannels ( int vhost, mixed order = false, mixed visibility = 'ALL', int parentchannel = 0 )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost ID that the list of channels belong to in MediaFactory.
ordermixedOptionalfalseThe order in which you wish to have the channel list returned to you in.
visibilitymixedOptional'ALL'The visibility of the channel you want to filter on for the returned list of channels.
parentchannelintOptional0If set - the component returns only channels that are children of the given channel.

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/channels/getChannels?vhost=[VHOST_ID]
<?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>

Sample JSON Response
{
    "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": ""
        }
    ]
}

Code examples

0 comments

Be the first to comment on getChannels.

Add a Comment

  • captcha