EVOLUTION-MANAGER
Edit File: validate_parameters.html
<!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"><head><title>R: Asssertion for Correct API Requests.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for validate_parameters {spotifyr}"><tr><td>validate_parameters {spotifyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Asssertion for Correct API Requests.</h2> <h3>Description</h3> <p>Assertions are made to give early and precise error messages for wrong API call parameters. </p> <h3>Usage</h3> <pre> validate_parameters( artists_or_tracks = NULL, artist_or_user = NULL, market = NULL, country = NULL, limit = NULL, offset = NULL, locale = NULL, volume_percent = NULL, time_range = NULL, position_ms = NULL, state = NULL, include_meta_info = NULL ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>artists_or_tracks</code></td> <td> <p>The type parameter must be either 'artists' or 'tracks'."</p> </td></tr> <tr valign="top"><td><code>artist_or_user</code></td> <td> <p>"The type parameter must be either 'artist' or 'user'."</p> </td></tr> <tr valign="top"><td><code>market</code></td> <td> <p>Optional. <br /> An <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country code</a> or the string <code>"from_token"</code>. Provide this parameter if you want to apply <a href="https://developer.spotify.com/documentation/general/guides/track-relinking-guide/">Track Relinking</a></p> </td></tr> <tr valign="top"><td><code>country</code></td> <td> <p>Optional. <br /> An <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country code</a> or the string <code>"from_token"</code>. Provide this parameter if you want to apply <a href="https://developer.spotify.com/documentation/general/guides/track-relinking-guide/">Track Relinking</a></p> </td></tr> <tr valign="top"><td><code>limit</code></td> <td> <p>Optional. The maximum number of items to return. Default to <code>20</code>. Minimum: 1. Maximum: 50.</p> </td></tr> <tr valign="top"><td><code>offset</code></td> <td> <p>Optional. The index of the first item to return. Defaults to <code>0</code>, i.e., the first object. Use with <code>limit</code> to get the next set of items.</p> </td></tr> <tr valign="top"><td><code>locale</code></td> <td> <p>Optional. The desired language, consisting of an <a href="https://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> language code and an <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country code</a>, joined by an underscore. For example: <code>es_MX</code>, meaning "Spanish (Mexico)". Provide this parameter if you want the category strings returned in a particular language. Note that, if <code>locale</code> is not supplied, or if the specified language is not available, the category strings returned will be in the Spotify default language (American English). The <code>locale</code> parameter, combined with the <code>country</code> parameter, may give odd results if not carefully matched. For example <code>country=SE&locale=de_DE</code> will return a list of categories relevant to Sweden but as German language strings.</p> </td></tr> <tr valign="top"><td><code>volume_percent</code></td> <td> <p>Required integer value. The volume to set. Must be a value from 0 to 100 inclusive. Defaults to <code>50</code>.</p> </td></tr> <tr valign="top"><td><code>time_range</code></td> <td> <p>Optional. Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), <code>medium_term</code> (approximately last 6 months), <code>short_term</code> (approximately last 4 weeks). Default: <code>medium_term</code>.</p> </td></tr> <tr valign="top"><td><code>position_ms</code></td> <td> <p>Optional. Integer indicating from what position to start playback. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.</p> </td></tr> <tr valign="top"><td><code>state</code></td> <td> <p>The state parameter must be exactly one of <code>'track'</code>, <code>'context'</code> or <code>'off'</code>.</p> </td></tr> <tr valign="top"><td><code>include_meta_info</code></td> <td> <p>Optional. Boolean indicating whether to include full result, with meta information such as <code>"total"</code>, and <code>"limit"</code>. Defaults to <code>FALSE</code>.</p> </td></tr> </table> <h3>Details</h3> <p>These assertions are called from various wrapper functions. However, you can also call this function directly to make sure that you are adding (programatically) the correct parameters to a call. </p> <p>All <code><a href="validate_parameters.html">validate_parameters</a></code> parameters default to <code>NULL</code>. Asserts the correct parameter values for any values that are not <code>NULL</code>. </p> <h3>Value</h3> <p>A boolean if the parameter matches the Spotify Web API parameter range. </p> <hr /><div style="text-align: center;">[Package <em>spotifyr</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>