<?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 Re: Fully documented API in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5455089#M6994</link>
    <description>&lt;P&gt;If the JSON payload is missing a key or the value for it is null, then trying to decode into an array will fail. It will NOT be automatically decoded into an empty array without special code. I should probably do some testing with a new account to see what &amp;nbsp;the structure of the JSON response is when the user has no play history. This is not a scenario I've considered before, so thanks for highlighting this.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 21:06:54 GMT</pubDate>
    <dc:creator>Peter_Schorn</dc:creator>
    <dc:date>2022-11-08T21:06:54Z</dc:date>
    <item>
      <title>Fully documented API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5453406#M6950</link>
      <description>&lt;P&gt;The API documentation is very incomplete. Sometimes certain fields of the JSON response can contain null and sometimes the entire response is null but they aren't documented (eg fetching the current playback state when the app isn't open on any device). Is there any (un)official documentation which fully documents what values the response can return?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 12:21:28 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5453406#M6950</guid>
      <dc:creator>Fusion69961</dc:creator>
      <dc:date>2022-11-04T12:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fully documented API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5453451#M6952</link>
      <description>&lt;P&gt;You can check out my &lt;A href="https://github.com/Peter-Schorn/SpotifyAPI/tree/master/Sources/SpotifyWebAPI/Object%20Model" target="_self"&gt;strongly-typed object model&lt;/A&gt;&amp;nbsp;which has been tested for well over a year in my library. It has many properties marked as optional that you wouldn't expect.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 14:38:56 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5453451#M6952</guid>
      <dc:creator>Peter_Schorn</dc:creator>
      <dc:date>2022-11-04T14:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Fully documented API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5455045#M6992</link>
      <description>&lt;P&gt;Thank you very much for this. Your library has been the perfect reference.&lt;/P&gt;&lt;P&gt;I just had one question since I'm not familiar with Swift:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;func&lt;/SPAN&gt; &lt;SPAN&gt;recentlyPlayed&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt; &lt;SPAN&gt;timeReference&lt;/SPAN&gt;&lt;SPAN&gt;: TimeReference? &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;nil&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;limit&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;Int&lt;/SPAN&gt;&lt;SPAN&gt;? &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;nil&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ) -&amp;gt; AnyPublisher&amp;lt;CursorPagingObject&amp;lt;PlayHistory&amp;gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Based on the return type and (and the fact that you haven't called .decodeOptionalSpotifyObject) - nil is never returned.&lt;/P&gt;&lt;P&gt;PlayHistory objects don't have a nullable "items" field either.&lt;/P&gt;&lt;P&gt;Does this imply that the JSON response never has the "items" key's value as null? Or do CursorPagingObjects/&lt;SPAN&gt;PlayHistory&lt;/SPAN&gt; create an empty array for null values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 18:33:13 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5455045#M6992</guid>
      <dc:creator>Fusion69961</dc:creator>
      <dc:date>2022-11-08T18:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Fully documented API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5455089#M6994</link>
      <description>&lt;P&gt;If the JSON payload is missing a key or the value for it is null, then trying to decode into an array will fail. It will NOT be automatically decoded into an empty array without special code. I should probably do some testing with a new account to see what &amp;nbsp;the structure of the JSON response is when the user has no play history. This is not a scenario I've considered before, so thanks for highlighting this.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 21:06:54 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fully-documented-API/m-p/5455089#M6994</guid>
      <dc:creator>Peter_Schorn</dc:creator>
      <dc:date>2022-11-08T21:06:54Z</dc:date>
    </item>
  </channel>
</rss>

