Zend_Service_Audioscrobbler.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <!-- EN-Revision: 24249 -->
  4. <sect1 id="zend.service.audioscrobbler">
  5. <title>Zend_Service_Audioscrobbler(日本語)</title>
  6. <sect2 id="zend.service.audioscrobbler.introduction">
  7. <title>導入</title>
  8. <para>
  9. <classname>Zend_Service_Audioscrobbler</classname> は、Audioscrobbler REST ウェブサービス
  10. を使用するためのシンプルな <acronym>API</acronym> です。Audioscrobbler Web Service
  11. は、ユーザ (Users) やアーティスト (Artists)、アルバム (Albums)、曲 (Tracks)、
  12. タグ (Tags)、グループ (Groups) そしてフォーラム (Forums) といったデータへの
  13. アクセス機能を提供します。
  14. <classname>Zend_Service_Audioscrobbler</classname> クラスのメソッドは、
  15. これらの単語のいずれかで始まります。Audioscrobbler Web Service
  16. の文法および名前空間が、<classname>Zend_Service_Audioscrobbler</classname>
  17. にまとめられています。Audioscrobbler REST ウェブサービスについての詳細は
  18. <ulink url="http://www.audioscrobbler.net/data/webservices/">Audioscrobbler Web Service
  19. のサイト</ulink> を参照ください。
  20. </para>
  21. </sect2>
  22. <sect2 id="zend.service.audioscrobbler.users">
  23. <title>ユーザ (Users)</title>
  24. <para>
  25. 特定のユーザについての情報を取得するには、
  26. まず <methodname>setUser()</methodname> メソッドを使用して
  27. データを取得したいユーザを選択します。
  28. <classname>Zend_Service_Audioscrobbler</classname> では、
  29. 指定したユーザについての情報を取得するためのいくつかのメソッドを提供しています。
  30. <itemizedlist>
  31. <listitem>
  32. <para>
  33. <methodname>userGetProfileInformation()</methodname>:
  34. 現在のユーザのプロファイル情報を含む SimpleXML オブジェクトを返します。
  35. </para>
  36. </listitem>
  37. <listitem>
  38. <para>
  39. <methodname>userGetTopArtists()</methodname>:
  40. 現在のユーザが一番よく聴いているアーティストの一覧を含む
  41. SimpleXML オブジェクトを返します。
  42. </para>
  43. </listitem>
  44. <listitem>
  45. <para>
  46. <methodname>userGetTopAlbums()</methodname>:
  47. 現在のユーザが一番よく聴いているアルバムの一覧を含む
  48. SimpleXML オブジェクトを返します。
  49. </para>
  50. </listitem>
  51. <listitem>
  52. <para>
  53. <methodname>userGetTopTracks()</methodname>:
  54. 現在のユーザが一番よく聴いている曲の一覧を含む
  55. SimpleXML オブジェクトを返します。
  56. </para>
  57. </listitem>
  58. <listitem>
  59. <para>
  60. <methodname>userGetTopTags()</methodname>:
  61. 現在のユーザが一番よく指定しているタグの一覧を含む
  62. SimpleXML オブジェクトを返します。
  63. </para>
  64. </listitem>
  65. <listitem>
  66. <para>
  67. <methodname>userGetTopTagsForArtist()</methodname>:
  68. アーティストを <methodname>setArtist()</methodname> で設定している必要があります。
  69. 現在のユーザが、そのアーティストに対して一番よく指定しているタグを含む
  70. SimpleXML オブジェクトを返します。
  71. </para>
  72. </listitem>
  73. <listitem>
  74. <para>
  75. <methodname>userGetTopTagsForAlbum()</methodname>:
  76. アルバムを <methodname>setAlbum()</methodname> で設定している必要があります。
  77. 現在のユーザが、そのアルバムに対して一番よく指定しているタグを含む
  78. SimpleXML オブジェクトを返します。
  79. </para>
  80. </listitem>
  81. <listitem>
  82. <para>
  83. <methodname>userGetTopTagsForTrack()</methodname>:
  84. 曲を <methodname>setTrack()</methodname> で設定している必要があります。
  85. 現在のユーザが、その曲に対して一番よく指定しているタグを含む
  86. SimpleXML オブジェクトを返します。
  87. </para>
  88. </listitem>
  89. <listitem>
  90. <para>
  91. <methodname>userGetFriends()</methodname>:
  92. 現在のユーザの友人のユーザ名を含む SimpleXML オブジェクトを返します。
  93. </para>
  94. </listitem>
  95. <listitem>
  96. <para>
  97. <methodname>userGetNeighbours()</methodname>:
  98. 現在のユーザと同じようなものを聴いているユーザ名を含む
  99. SimpleXML オブジェクトを返します。
  100. </para>
  101. </listitem>
  102. <listitem>
  103. <para>
  104. <methodname>userGetRecentTracks()</methodname>:
  105. 現在のユーザが最近聴いた 10 曲の情報を含む SimpleXML オブジェクトを返します。
  106. </para>
  107. </listitem>
  108. <listitem>
  109. <para>
  110. <methodname>userGetRecentBannedTracks()</methodname>:
  111. 現在のユーザが最近拒否した 10 曲の一覧を含む SimpleXML オブジェクトを返します。
  112. </para>
  113. </listitem>
  114. <listitem>
  115. <para>
  116. <methodname>userGetRecentLovedTracks()</methodname>:
  117. 現在のユーザが最近お気に入りにした 10 曲の一覧を含む SimpleXML オブジェクトを返します。
  118. </para>
  119. </listitem>
  120. <listitem>
  121. <para>
  122. <methodname>userGetRecentJournals()</methodname>:
  123. 現在のユーザの直近の記事エントリの一覧を含む SimpleXML オブジェクトを返します。
  124. </para>
  125. </listitem>
  126. <listitem>
  127. <para>
  128. <methodname>userGetWeeklyChartList()</methodname>:
  129. 現在のユーザの週間チャートが存在する週の一覧を含む SimpleXML オブジェクトを返します。
  130. </para>
  131. </listitem>
  132. <listitem>
  133. <para>
  134. <methodname>userGetRecentWeeklyArtistChart()</methodname>:
  135. 現在のユーザの直近の週間アーティストチャートを含む SimpleXML オブジェクトを返します。
  136. </para>
  137. </listitem>
  138. <listitem>
  139. <para>
  140. <methodname>userGetRecentWeeklyAlbumChart()</methodname>:
  141. 現在のユーザの直近の週間アルバムチャートを含む SimpleXML オブジェクトを返します。
  142. </para>
  143. </listitem>
  144. <listitem>
  145. <para>
  146. <methodname>userGetRecentWeeklyTrackChart()</methodname>:
  147. 現在のユーザの直近の週間曲チャートを含む SimpleXML オブジェクトを返します。
  148. </para>
  149. </listitem>
  150. <listitem>
  151. <para>
  152. <methodname>userGetPreviousWeeklyArtistChart($fromDate, $toDate)</methodname>:
  153. 現在のユーザの <code>$fromDate</code> から <code>$toDate</code>
  154. までの週間アーティストチャートを含む SimpleXML オブジェクトを返します。
  155. </para>
  156. </listitem>
  157. <listitem>
  158. <para>
  159. <methodname>userGetPreviousWeeklyAlbumChart($fromDate, $toDate)</methodname>:
  160. 現在のユーザの <code>$fromDate</code> から <code>$toDate</code>
  161. までの週間アルバムチャートを含む SimpleXML オブジェクトを返します。
  162. </para>
  163. </listitem>
  164. <listitem>
  165. <para>
  166. <methodname>userGetPreviousWeeklyTrackChart($fromDate, $toDate)</methodname>:
  167. 現在のユーザの <code>$fromDate</code> から <code>$toDate</code>
  168. までの週間曲チャートを含む SimpleXML オブジェクトを返します。
  169. </para>
  170. </listitem>
  171. </itemizedlist>
  172. </para>
  173. <example id="zend.service.audioscrobbler.users.example.profile_information">
  174. <title>ユーザのプロファイル情報の取得</title>
  175. <para>
  176. この例では、<methodname>setUser()</methodname> メソッドおよび
  177. <methodname>userGetProfileInformation()</methodname> メソッドを使用して、
  178. 指定したユーザのプロファイル情報を取得します。
  179. </para>
  180. <programlisting language="php"><![CDATA[
  181. $as = new Zend_Service_Audioscrobbler();
  182. // プロファイル情報を取得したいユーザを設定します
  183. $as->setUser('BigDaddy71');
  184. // BigDaddy71 のプロファイル情報を取得します
  185. $profileInfo = $as->userGetProfileInformation();
  186. // その一部を表示します
  187. print "$profileInfo->realname の情報は "
  188. . "$profileInfo->url にあります";
  189. ]]></programlisting>
  190. </example>
  191. <example id="zend.service.audioscrobbler.users.example.weekly_artist_chart">
  192. <title>あるユーザの週間アーティストチャートの取得</title>
  193. <programlisting language="php"><![CDATA[
  194. $as = new Zend_Service_Audioscrobbler();
  195. // 週間アーティストチャートを取得したいユーザを設定します
  196. $as->setUser('lo_fye');
  197. // チャートデータが存在する、過去の一覧を取得します
  198. $weeks = $as->userGetWeeklyChartList();
  199. if (count($weeks) < 1) {
  200. echo 'データが存在しません';
  201. }
  202. sort($weeks); // 週のリストを並べ替えます
  203. $as->setFromDate($weeks[0]); // 開始日を設定します
  204. $as->setToDate($weeks[0]); // 終了日を設定します
  205. $previousWeeklyArtists = $as->userGetPreviousWeeklyArtistChart();
  206. echo '週間アーティストチャート '
  207. . date('Y-m-d h:i:s', $as->from_date)
  208. . '<br />';
  209. foreach ($previousWeeklyArtists as $artist) {
  210. // アーティスト名と、プロファイルへのリンクを表示します
  211. print '<a href="' . $artist->url . '">' . $artist->name . '</a><br />';
  212. }
  213. ]]></programlisting>
  214. </example>
  215. </sect2>
  216. <sect2 id="zend.service.audioscrobbler.artists">
  217. <title>アーティスト (Artists)</title>
  218. <para>
  219. <classname>Zend_Service_Audioscrobbler</classname> は、<methodname>setArtist()</methodname>
  220. で指定した特定のアーティストに関するデータを取得するためのいくつかのメソッドを提供しています。
  221. <itemizedlist>
  222. <listitem>
  223. <para>
  224. <methodname>artistGetRelatedArtists()</methodname>:
  225. 現在のアーティストと似たアーティストの一覧を含む
  226. SimpleXML オブジェクトを返します。
  227. </para>
  228. </listitem>
  229. <listitem>
  230. <para>
  231. <methodname>artistGetTopFans()</methodname>:
  232. 現在のアーティストを最もよく聴いているユーザの一覧を含む
  233. SimpleXML オブジェクトを返します。
  234. </para>
  235. </listitem>
  236. <listitem>
  237. <para>
  238. <methodname>artistGetTopTracks()</methodname>:
  239. 現在のアーティストの、高評価の曲の一覧を含む
  240. SimpleXML オブジェクトを返します。
  241. </para>
  242. </listitem>
  243. <listitem>
  244. <para>
  245. <methodname>artistGetTopAlbums()</methodname>:
  246. 現在のアーティストの、高評価のアルバムの一覧を含む
  247. SimpleXML オブジェクトを返します。
  248. </para>
  249. </listitem>
  250. <listitem>
  251. <para>
  252. <methodname>artistGetTopTags()</methodname>:
  253. 現在のアーティストによく指定されているタグの一覧を含む
  254. SimpleXML オブジェクトを返します。
  255. </para>
  256. </listitem>
  257. </itemizedlist>
  258. </para>
  259. <example id="zend.service.audioscrobbler.artists.example.related_artists">
  260. <title>関連するアーティストの取得</title>
  261. <programlisting language="php"><![CDATA[
  262. $as = new Zend_Service_Audioscrobbler();
  263. // 関連アーティストを取得したいアーティストを設定します
  264. $as->setArtist('LCD Soundsystem');
  265. // 関連アーティストを取得します
  266. $relatedArtists = $as->artistGetRelatedArtists();
  267. foreach ($relatedArtists as $artist) {
  268. // 関連アーティストを表示します
  269. print '<a href="' . $artist->url . '">' . $artist->name . '</a><br />';
  270. }
  271. ]]></programlisting>
  272. </example>
  273. </sect2>
  274. <sect2 id="zend.service.audioscrobbler.tracks">
  275. <title>曲 (Tracks)</title>
  276. <para>
  277. <classname>Zend_Service_Audioscrobbler</classname> は、<methodname>setTrack()</methodname>
  278. メソッドで指定した曲についてのデータを取得する、ふたつのメソッドを提供しています。
  279. <itemizedlist>
  280. <listitem>
  281. <para>
  282. <methodname>trackGetTopFans()</methodname>:
  283. 現在の曲を最もよく聴いているユーザの一覧を含む
  284. SimpleXML オブジェクトを返します。
  285. </para>
  286. </listitem>
  287. <listitem>
  288. <para>
  289. <methodname>trackGetTopTags()</methodname>:
  290. 現在の曲に最もよく適用されているタグの一覧を含む
  291. SimpleXML オブジェクトを返します。
  292. </para>
  293. </listitem>
  294. </itemizedlist>
  295. </para>
  296. </sect2>
  297. <sect2 id="zend.service.audioscrobbler.tags">
  298. <title>タグ (Tags)</title>
  299. <para>
  300. <classname>Zend_Service_Audioscrobbler</classname> は、<methodname>setTag()</methodname>
  301. メソッドで指定したタグに関するデータを取得するためのいくつかのメソッドを提供しています。
  302. <itemizedlist>
  303. <listitem>
  304. <para>
  305. <methodname>tagGetOverallTopTags()</methodname>:
  306. Audioscrobbler で最もよく使用されているタグの一覧を含む
  307. SimpleXML オブジェクトを返します。
  308. </para>
  309. </listitem>
  310. <listitem>
  311. <para>
  312. <methodname>tagGetTopArtists()</methodname>:
  313. 現在のタグが最もよく適用されているアーティストの一覧を含む
  314. SimpleXML オブジェクトを返します。
  315. </para>
  316. </listitem>
  317. <listitem>
  318. <para>
  319. <methodname>tagGetTopAlbums()</methodname>:
  320. 現在のタグが最もよく適用されているアルバムの一覧を含む
  321. SimpleXML オブジェクトを返します。
  322. </para>
  323. </listitem>
  324. <listitem>
  325. <para>
  326. <methodname>tagGetTopTracks()</methodname>:
  327. 現在のタグが最もよく適用されている曲の一覧を含む
  328. SimpleXML オブジェクトを返します。
  329. </para>
  330. </listitem>
  331. </itemizedlist>
  332. </para>
  333. </sect2>
  334. <sect2 id="zend.service.audioscrobbler.groups">
  335. <title>グループ (Groups)</title>
  336. <para>
  337. <classname>Zend_Service_Audioscrobbler</classname> は、<methodname>setGroup()</methodname>
  338. メソッドで指定したグループに関するデータを取得するためのいくつかのメソッドを提供しています。
  339. <itemizedlist>
  340. <listitem>
  341. <para>
  342. <methodname>groupGetRecentJournals()</methodname>:
  343. 現在のグループのユーザが最近投稿した記事の一覧を含む
  344. SimpleXML オブジェクトを返します。
  345. </para>
  346. </listitem>
  347. <listitem>
  348. <para>
  349. <methodname>groupGetWeeklyChart()</methodname>:
  350. 現在のグループの週間チャートが存在する週の一覧を含む
  351. SimpleXML オブジェクトを返します。
  352. </para>
  353. </listitem>
  354. <listitem>
  355. <para>
  356. <methodname>groupGetRecentWeeklyArtistChart()</methodname>:
  357. 現在のグループの直近の週間アーティストチャートを含む
  358. SimpleXML オブジェクトを返します。
  359. </para>
  360. </listitem>
  361. <listitem>
  362. <para>
  363. <methodname>groupGetRecentWeeklyAlbumChart()</methodname>:
  364. 現在のグループの直近の週間アルバムチャートを含む
  365. SimpleXML オブジェクトを返します。
  366. </para>
  367. </listitem>
  368. <listitem>
  369. <para>
  370. <methodname>groupGetRecentWeeklyTrackChart()</methodname>:
  371. 現在のグループの直近の週間曲チャートを含む
  372. SimpleXML オブジェクトを返します。
  373. </para>
  374. </listitem>
  375. <listitem>
  376. <para>
  377. <methodname>groupGetPreviousWeeklyArtistChart($fromDate, $toDate)</methodname>:
  378. <methodname>setFromDate()</methodname> および <methodname>setToDate()</methodname>
  379. が必要です。現在のグループの、fromDate から toDate
  380. までの週間アーティストチャートを含む
  381. SimpleXML オブジェクトを返します。
  382. </para>
  383. </listitem>
  384. <listitem>
  385. <para>
  386. <methodname>groupGetPreviousWeeklyAlbumChart($fromDate, $toDate)</methodname>:
  387. <methodname>setFromDate()</methodname> および <methodname>setToDate()</methodname>
  388. が必要です。現在のグループの、fromDate から toDate
  389. までの週間アルバムチャートを含む
  390. SimpleXML オブジェクトを返します。
  391. </para>
  392. </listitem>
  393. <listitem>
  394. <para>
  395. <methodname>groupGetPreviousWeeklyTrackChart($fromDate, $toDate)</methodname>:
  396. 現在のグループの、fromDate から toDate
  397. までの週間曲チャートを含む
  398. SimpleXML オブジェクトを返します。
  399. </para>
  400. </listitem>
  401. </itemizedlist>
  402. </para>
  403. </sect2>
  404. <sect2 id="zend.service.audioscrobbler.forums">
  405. <title>フォーラム (Forums)</title>
  406. <para>
  407. <classname>Zend_Service_Audioscrobbler</classname> は、<methodname>setForum()</methodname>
  408. メソッドで指定した特定のフォーラムの情報を取得するメソッドを提供しています。
  409. <itemizedlist>
  410. <listitem>
  411. <para>
  412. <methodname>forumGetRecentPosts()</methodname>:
  413. 現在のフォーラムの最近の投稿一覧を含む
  414. SimpleXML オブジェクトを返します。
  415. </para>
  416. </listitem>
  417. </itemizedlist>
  418. </para>
  419. </sect2>
  420. </sect1>
  421. <!--
  422. vim:se ts=4 sw=4 et:
  423. -->