aboutsummaryrefslogtreecommitdiff
path: root/subsonic-site/src/main/webapp/api-getRandomSongs.jsp
blob: bba4fccbca2a96e91eb636cc6c23d3746eed3121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<h2 class="div"><a name="getRandomSongs"></a>getRandomSongs</h2>

<p>
    <code>http://your-server/rest/getRandomSongs.view</code>
    <br>Since <a href="#versions">1.2.0</a>
</p>

<p>
    Returns random songs matching the given criteria.
</p>
<table width="100%" class="bottomspace">
    <tr>
        <th class="param-heading">Parameter</th>
        <th class="param-heading">Required</th>
        <th class="param-heading">Default</th>
        <th class="param-heading">Comment</th>
    </tr>
    <tr class="table-altrow">
        <td><code>size</code></td>
        <td>No</td>
        <td>10</td>
        <td>The maximum number of songs to return. Max 500.</td>
    </tr>
    <tr>
        <td><code>genre</code></td>
        <td>No</td>
        <td></td>
        <td>Only returns songs belonging to this genre.</td>
    </tr>
    <tr class="table-altrow">
        <td><code>fromYear</code></td>
        <td>No</td>
        <td></td>
        <td>Only return songs published after or in this year.</td>
    </tr>
    <tr class="table-altrow">
        <td><code>toYear</code></td>
        <td>No</td>
        <td></td>
        <td>Only return songs published before or in this year.</td>
    </tr>
    <tr>
        <td><code>musicFolderId</code></td>
        <td>No</td>
        <td></td>
        <td>Only return songs in the music folder with the given ID. See getMusicFolders.</td>
    </tr>
</table>
<p>
    Returns a <code>&lt;subsonic-response&gt;</code> element with a nested <code>&lt;randomSongs&gt;</code>
    element on success. <a href="http://subsonic.svn.sourceforge.net/viewvc/subsonic/trunk/subsonic-main/src/main/webapp/xsd/randomSongs_example_1.xml?view=markup">Example</a>.
</p>