296 lines
12 KiB
HTML
296 lines
12 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
|
|
<title>Class: LastFM::Chart</title>
|
|
|
|
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
|
|
<script src="../js/jquery.js" type="text/javascript"
|
|
charset="utf-8"></script>
|
|
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
charset="utf-8"></script>
|
|
<script src="../js/quicksearch.js" type="text/javascript"
|
|
charset="utf-8"></script>
|
|
<script src="../js/darkfish.js" type="text/javascript"
|
|
charset="utf-8"></script>
|
|
|
|
</head>
|
|
<body class="class">
|
|
|
|
<div id="metadata">
|
|
<div id="home-metadata">
|
|
<div id="home-section" class="section">
|
|
<h3 class="section-header">
|
|
<a href="../index.html">Home</a>
|
|
<a href="../index.html#classes">Classes</a>
|
|
<a href="../index.html#methods">Methods</a>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="file-metadata">
|
|
<div id="file-list-section" class="section">
|
|
<h3 class="section-header">In Files</h3>
|
|
<div class="section-body">
|
|
<ul>
|
|
|
|
<li><a href="../lib/last_fm/chart_rb.html?TB_iframe=true&height=550&width=785"
|
|
class="thickbox" title="lib/last_fm/chart.rb">lib/last_fm/chart.rb</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="class-metadata">
|
|
|
|
<!-- Parent Class -->
|
|
|
|
<div id="parent-class-section" class="section">
|
|
<h3 class="section-header">Parent</h3>
|
|
|
|
<p class="link"><a href="Request.html">LastFM::Request</a></p>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- Namespace Contents -->
|
|
|
|
|
|
<!-- Method Quickref -->
|
|
|
|
<div id="method-list-section" class="section">
|
|
<h3 class="section-header">Methods</h3>
|
|
<ul class="link-list">
|
|
|
|
<li><a href="#method-c-getTopArtists">::getTopArtists</a></li>
|
|
|
|
<li><a href="#method-c-getTopTracks">::getTopTracks</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<!-- Included Modules -->
|
|
|
|
</div>
|
|
|
|
<div id="project-metadata">
|
|
|
|
|
|
<div id="fileindex-section" class="section project-section">
|
|
<h3 class="section-header">Files</h3>
|
|
<ul>
|
|
|
|
<li class="file"><a href="../doc/README_FOR_APP.html">README_FOR_APP</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="classindex-section" class="section project-section">
|
|
<h3 class="section-header">Class Index
|
|
<span class="search-toggle"><img src="../images/find.png"
|
|
height="16" width="16" alt="[+]"
|
|
title="show/hide quicksearch" /></span></h3>
|
|
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
<fieldset>
|
|
<legend>Quicksearch</legend>
|
|
<input type="text" name="quicksearch" value=""
|
|
class="quicksearch-field" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
<ul class="link-list">
|
|
|
|
<li><a href="../LastFM.html">LastFM</a></li>
|
|
|
|
<li><a href="../LastFM/Album.html">LastFM::Album</a></li>
|
|
|
|
<li><a href="../LastFM/Artist.html">LastFM::Artist</a></li>
|
|
|
|
<li><a href="../LastFM/Chart.html">LastFM::Chart</a></li>
|
|
|
|
<li><a href="../LastFM/Request.html">LastFM::Request</a></li>
|
|
|
|
<li><a href="../LastFM/Track.html">LastFM::Track</a></li>
|
|
|
|
<li><a href="../LastFM/Validator.html">LastFM::Validator</a></li>
|
|
|
|
<li><a href="../DeviseAuth.html">DeviseAuth</a></li>
|
|
|
|
<li><a href="../DeviseAuth/RegistrationsController.html">DeviseAuth::RegistrationsController</a></li>
|
|
|
|
<li><a href="../DeviseAuth/SessionsController.html">DeviseAuth::SessionsController</a></li>
|
|
|
|
<li><a href="../Users.html">Users</a></li>
|
|
|
|
<li><a href="../Users/OmniauthCallbacksController.html">Users::OmniauthCallbacksController</a></li>
|
|
|
|
<li><a href="../ApplicationController.html">ApplicationController</a></li>
|
|
|
|
<li><a href="../ApplicationHelper.html">ApplicationHelper</a></li>
|
|
|
|
<li><a href="../Artist.html">Artist</a></li>
|
|
|
|
<li><a href="../ArtistsController.html">ArtistsController</a></li>
|
|
|
|
<li><a href="../ChartsController.html">ChartsController</a></li>
|
|
|
|
<li><a href="../HomeController.html">HomeController</a></li>
|
|
|
|
<li><a href="../Playlist.html">Playlist</a></li>
|
|
|
|
<li><a href="../PlaylistsTracks.html">PlaylistsTracks</a></li>
|
|
|
|
<li><a href="../RedisQueryable.html">RedisQueryable</a></li>
|
|
|
|
<li><a href="../SearchController.html">SearchController</a></li>
|
|
|
|
<li><a href="../Track.html">Track</a></li>
|
|
|
|
<li><a href="../TracksController.html">TracksController</a></li>
|
|
|
|
<li><a href="../User.html">User</a></li>
|
|
|
|
<li><a href="../UsersController.html">UsersController</a></li>
|
|
|
|
<li><a href="../UsersHelper.html">UsersHelper</a></li>
|
|
|
|
<li><a href="../YoutubeVideoRating.html">YoutubeVideoRating</a></li>
|
|
|
|
</ul>
|
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="documentation">
|
|
<h1 class="class">LastFM::Chart</h1>
|
|
|
|
<div id="description">
|
|
|
|
</div>
|
|
|
|
<!-- Constants -->
|
|
|
|
|
|
<!-- Attributes -->
|
|
|
|
|
|
<!-- Methods -->
|
|
|
|
<div id="public-class-method-details" class="method-section section">
|
|
<h3 class="section-header">Public Class Methods</h3>
|
|
|
|
|
|
<div id="get-op-rtists-method" class="method-detail ">
|
|
<a name="method-c-getTopArtists"></a>
|
|
|
|
<div class="method-heading">
|
|
|
|
<span class="method-name">getTopArtists</span><span
|
|
class="method-args">(limit = nil, page = nil)</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code"
|
|
id="get-op-rtists-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/last_fm/chart.rb, line 4</span>
|
|
4: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">getTopArtists</span> <span class="ruby-identifier">limit</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">page</span> = <span class="ruby-keyword kw">nil</span>
|
|
|
|
5: <span class="ruby-constant">RedisQueryable</span>.<span class="ruby-identifier">look_up_key</span>(<span class="ruby-value">:chart</span>, { <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value">:artists</span>, <span class="ruby-value">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">page</span> }) <span class="ruby-keyword kw">do</span>
|
|
|
|
6: <span class="ruby-identifier">chart_request</span> <span class="ruby-value str">"getTopArtists"</span>, <span class="ruby-value str">"artists"</span>, <span class="ruby-identifier">limit</span>, <span class="ruby-identifier">page</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">artists</span><span class="ruby-operator">|</span>
|
|
|
|
7: <span class="ruby-identifier">artists</span> = <span class="ruby-constant">LastFM</span><span class="ruby-operator">::</span><span class="ruby-constant">Validator</span>.<span class="ruby-identifier">validate_mash</span> <span class="ruby-identifier">artists</span>, <span class="ruby-value str">"image"</span>
|
|
|
|
8: <span class="ruby-identifier">update_results</span> [<span class="ruby-identifier">current_class_name</span>, <span class="ruby-identifier">__method__</span>], <span class="ruby-identifier">artists</span>
|
|
|
|
9: <span class="ruby-constant">RedisQueryable</span>.<span class="ruby-identifier">store</span> <span class="ruby-value">:chart</span>, { <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value">:artists</span>, <span class="ruby-value">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">page</span> }, <span class="ruby-identifier">artists</span>.<span class="ruby-identifier">to_json</span>
|
|
|
|
10: <span class="ruby-keyword kw">end</span>
|
|
|
|
11: <span class="ruby-keyword kw">end</span>
|
|
|
|
12: <span class="ruby-keyword kw">end</span></pre>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="get-op-racks-method" class="method-detail ">
|
|
<a name="method-c-getTopTracks"></a>
|
|
|
|
<div class="method-heading">
|
|
|
|
<span class="method-name">getTopTracks</span><span
|
|
class="method-args">(limit = nil, page = nil)</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code"
|
|
id="get-op-racks-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/last_fm/chart.rb, line 14</span>
|
|
14: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">getTopTracks</span> <span class="ruby-identifier">limit</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">page</span> = <span class="ruby-keyword kw">nil</span>
|
|
|
|
15: <span class="ruby-constant">RedisQueryable</span>.<span class="ruby-identifier">look_up_key</span>(<span class="ruby-value">:chart</span>, { <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value">:tracks</span>, <span class="ruby-value">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">page</span> }) <span class="ruby-keyword kw">do</span>
|
|
|
|
16: <span class="ruby-identifier">chart_request</span> <span class="ruby-value str">"getTopTracks"</span>, <span class="ruby-value str">"tracks"</span>, <span class="ruby-identifier">limit</span>, <span class="ruby-identifier">page</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tracks</span><span class="ruby-operator">|</span>
|
|
|
|
17: <span class="ruby-identifier">tracks</span> = <span class="ruby-constant">LastFM</span><span class="ruby-operator">::</span><span class="ruby-constant">Validator</span>.<span class="ruby-identifier">validate_mash</span> <span class="ruby-identifier">tracks</span>
|
|
|
|
18: <span class="ruby-identifier">update_results</span> [<span class="ruby-identifier">current_class_name</span>, <span class="ruby-identifier">__method__</span>], <span class="ruby-identifier">tracks</span>
|
|
|
|
19: <span class="ruby-constant">RedisQueryable</span>.<span class="ruby-identifier">store</span> <span class="ruby-value">:chart</span>, { <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value">:tracks</span>, <span class="ruby-value">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">page</span> }, <span class="ruby-identifier">tracks</span>.<span class="ruby-identifier">to_json</span>
|
|
|
|
20: <span class="ruby-keyword kw">end</span>
|
|
|
|
21: <span class="ruby-keyword kw">end</span>
|
|
|
|
22: <span class="ruby-keyword kw">end</span></pre>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
|
|
<p>Disabled; run with --debug to generate this.</p>
|
|
|
|
</div>
|
|
|
|
<div id="validator-badges">
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|