<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to code to get random song from user from folder from playlist? in Content Questions</title>
    <link>https://community.spotify.com/t5/Content-Questions/How-to-code-to-get-random-song-from-user-from-folder-from/m-p/4600589#M29431</link>
    <description>&lt;P class="yklcuq-10 hpxQMr"&gt;Hello ,&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;I am trying to create a code (nodeJS) to get the url of a &lt;STRONG&gt;random&lt;/STRONG&gt; song.. This song is picked &lt;STRONG&gt;random&lt;/STRONG&gt; from my folder wich contain playlists ( my account&amp;gt;&amp;gt;&amp;gt;Main folder &amp;gt;&amp;gt;&amp;gt; folders of playlists &amp;gt;&amp;gt;&amp;gt; playlists &amp;gt;&amp;gt; Song url (http)&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;If someone have an idea ?&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;( sorry for my bad english )&lt;/P&gt;</description>
    <pubDate>Sun, 04 Nov 2018 21:40:27 GMT</pubDate>
    <dc:creator>Le0nidass</dc:creator>
    <dc:date>2018-11-04T21:40:27Z</dc:date>
    <item>
      <title>How to code to get random song from user from folder from playlist?</title>
      <link>https://community.spotify.com/t5/Content-Questions/How-to-code-to-get-random-song-from-user-from-folder-from/m-p/4600589#M29431</link>
      <description>&lt;P class="yklcuq-10 hpxQMr"&gt;Hello ,&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;I am trying to create a code (nodeJS) to get the url of a &lt;STRONG&gt;random&lt;/STRONG&gt; song.. This song is picked &lt;STRONG&gt;random&lt;/STRONG&gt; from my folder wich contain playlists ( my account&amp;gt;&amp;gt;&amp;gt;Main folder &amp;gt;&amp;gt;&amp;gt; folders of playlists &amp;gt;&amp;gt;&amp;gt; playlists &amp;gt;&amp;gt; Song url (http)&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;If someone have an idea ?&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="yklcuq-10 hpxQMr"&gt;( sorry for my bad english )&lt;/P&gt;</description>
      <pubDate>Sun, 04 Nov 2018 21:40:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Content-Questions/How-to-code-to-get-random-song-from-user-from-folder-from/m-p/4600589#M29431</guid>
      <dc:creator>Le0nidass</dc:creator>
      <dc:date>2018-11-04T21:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to code to get random song from user from folder from playlist?</title>
      <link>https://community.spotify.com/t5/Content-Questions/How-to-code-to-get-random-song-from-user-from-folder-from/m-p/4609464#M29575</link>
      <description>&lt;P&gt;I don't believe there is a way to get the list of playlists from a folder ambiguously, but you could supply node with an array of the uri's of the playlists you want to include. Create a simple for loop that goes through each uri, and gets the tracks for each playlist (you can filter the result using the filter field in the get request)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so your get request would look something like this (excluding authorization):&lt;/P&gt;&lt;PRE&gt;https://api.spotify.com/v1/playlists/YOUR_PLAYLIST_URI_HERE/tracks?fields=items(track(uri))&lt;/PRE&gt;&lt;P&gt;you'll have to interpret the result of that, but you can add each track's uri to an array. If you do all of this on initialization, it only has to be done once. Then you can pull a random value from the array, giving you the uri of a random track&amp;nbsp;in your list of playlists.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:04:48 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Content-Questions/How-to-code-to-get-random-song-from-user-from-folder-from/m-p/4609464#M29575</guid>
      <dc:creator>landonharris88</dc:creator>
      <dc:date>2018-11-15T17:04:48Z</dc:date>
    </item>
  </channel>
</rss>

