API REST Method: channel
URL
http://mag.ma/:channel_id.format
http://mag.ma/:channel_id/:category.format
Formats
XML, RSS, JSON, YAML, HTML, text
HTTP Method
GET
Authentication
none
Rate Limited
none
Parameters
- channel_id. Required. Name of channel.
- category. Optional. Name of a category created by this channel.
- Example: http://mag.ma/greg/design
- sort. Optional. Return videos sorted by various types. Can either be 'added', 'newest', or 'score'.
- 'added' returns videos in recent order of when added to channel. (Default)
- 'newest' returns videos in recent order of when added to Magma,
- 'score' returns videos in order of their Magma score, highest to lowest.
- Example: http://mag.ma/greg.xml?sort=score
- page. Optional. Default value is 1, highest allowed page number is 10.
- callback. Optional. Specify a function callback (JSON format only)
Response
XML Example:
<?xml version="1.0" encoding="UTF-8"?>
<channel>
<created_at type="datetime">2009-04-01T01:16:14Z</created_at>
<featured type="boolean">false</featured>
<id type="integer">426</id>
<nsfw type="boolean">false</nsfw>
<updated_at type="datetime">2009-08-24T23:08:22Z</updated_at>
<canonical_url>http://mag.ma/greg</canonical_url>
<description>Research & Development at Rocketboom / Magma / Know Your Meme.
User interface/experience designer, web developer, open-source artist,
and thinker.</description>
<image_small>http://mag.ma/system/users/photos/7/small/me_14.png?1267569482</image_small>
<image_large>http://mag.ma/system/users/photos/7/large/me_14.png?1267569482</image_large>
<image_icon>http://mag.ma/system/users/photos/7/icon/me_14.png?1267569482</image_icon>
<following_count type="integer">63</following_count>
<followers_count type="integer">72</followers_count>
<tagline>24 years old. Passionate about design, web, technology, and art.</tagline>
<title>Greg Leuch</title>
<type>user</type>
<videos_count type="integer">334</videos_count>
<website>http://www.gleuch.com</website>
<videos type="array">
<video>
<created_at type="datetime">2010-02-26T19:00:07Z</created_at>
<description>In February, the world's top curators and critics nominated the 100 best
design of 2009. Three projects by FAT Lab fellows were in the hunt... but only one can
win. But anyway, it will probably be that dead fashion designer... Free Art and
Technology Lab: playing above our heads since 2007.</description>
<embed>
<object width="400" height="225">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="movie" value="http://vimeo.com
/moogaloop.swf?clip_id=9749744&amp;show_title=0&amp;
show_portrait=0&amp;color=&amp;fullscreen=1" />
<embed src="http://vimeo.com/moogaloop.swf?clip_id=9749744
&amp;show_title=0&amp;show_portrait=0&amp;color=
&amp;fullscreen=1" type="application/x-shockwave-flash"
allowfullscreen="true" allowscriptaccess="always"
width="400" height="225"></embed>
</object>
</embed>
<id type="integer">420278</id>
<nsfw type="boolean">false</nsfw>
<score type="float">5.1</score>
<source>vimeo</source>
<thumbnail>http://ts.vimeo.com.s3.amazonaws.com/492/116/49211644_200.jpg</thumbnail>
<title>2009: Year of the FAT</title>
<updated_at type="datetime">2010-03-13T00:19:30Z</updated_at>
<canonical_url>http://mag.ma/jamiew/420278</canonical_url>
<in_channel_url>http://mag.ma/greg/420278</in_channel_url>
<views_count type="integer">667</views_count>
<comments_count type="integer">2</comments_count>
<likes_count type="integer">0</likes_count>
<links_count type="integer">0</links_count>
<tags_list nil="true"></tags_list>
<categories_list nil="true"></categories_list>
<source_url>http://vimeo.com/9749744</source_url>
</video>
...
</videos>
</channel>
Example Usage
cURL request getting recently added videos:
curl http://mag.ma/greg.xml
cURL request getting videos in a category:
curl http://mag.ma/greg/design.xml
cURL request getting page 2 of videos sorted by score:
curl http://mag.ma/greg.xml?page=2&sort=score