Home > Webサービス > Ustreamのチャンネル名からチャンネルIDをXMLで取得する方法

Ustreamのチャンネル名からチャンネルIDをXMLで取得する方法


1) Ustream API keyを取得する
Ustream API

2) 下記のURLを叩く
http://api.ustream.tv/xml/channel/チャンネル名/getValueOf/id?key=自分のAPI key

以上です。楽勝っすね。
ちなみに下記のようなXMLが取得できます。
<xml>
<results>272213</results>
<msg></msg>
<error></error>
<processtime>0.0050060749054</processtime>
<version>mashery-r10</version>
</xml>
resultsノードの値がチャンネルIDです。

一通りのパラメーターが欲しい場合は、
http://api.ustream.tv/xml/channel/チャンネル名/getInfo?key=自分のAPI key
で取得できます。
<xml>

<results>
<id>272213</id>

<user>
<id>497294</id>
<userName>_310design</userName>
<url>http://www.ustream.tv/_310design</url>
</user>
<title>310design_me</title>
<description></description>
<urlTitleName>310design_me</urlTitleName>
<url>http://www.ustream.tv/channel/310design_me</url>
<status>live</status>
<createdAt>2008-08-18 12:42:52</createdAt>
<lastStreamedAt>2008-08-19 01:56:16</lastStreamedAt>
<photoUrl></photoUrl>
<protected></protected>
<rating>0.000</rating>

<embedTag>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="260" id="utv286517"><param name="flashvars" value="autoplay=false&amp;brand=embed"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/live/272213"/><embed flashvars="autoplay=false&amp;brand=embed" width="320" height="260" allowfullscreen="true" allowscriptaccess="always" id="utv286517" name="utv_n_950364" src="http://www.ustream.tv/flash/live/272213" type="application/x-shockwave-flash" /></object>
</embedTag>
<embedTagSourceUrl>http://www.ustream.tv/flash/live/272213</embedTagSourceUrl>
<hasTags>TRUE</hasTags>

<numberOf>
<comments>0</comments>
<ratings>0</ratings>
<favorites>0</favorites>
<views>21</views>
<tags>3</tags>
</numberOf>

<tags>
<array key="0">Interview</array>
<array key="1">News</array>
<array key="2">self_introduntion</array>
</tags>
</results>
<msg></msg>
<error></error>
<processTime>0.00658106803894</processTime>
<version>mashery-r10</version>
</xml>

Comments:0

Comment Form

コメントを表示する前にこのブログのオーナーの承認が必要になることがあります。

Trackbacks:0

TrackBack URL for this entry
http://310design.org/mt/mt-tb.cgi/75
Listed below are links to weblogs that reference
Ustreamのチャンネル名からチャンネルIDをXMLで取得する方法 from 310design.blog

Home > Webサービス > Ustreamのチャンネル名からチャンネルIDをXMLで取得する方法

Search
Feeds

Return to page top