/// <summary>
        /// You can retrieve part or all of the collection of albums in Beats, including those not available for streaming.
        /// </summary>
        /// <param name="albumsOrderBy">Indicates how the results set should be sorted.</param>
        /// <param name="limit">Specifies the maximum number of records to retrieve. The number of results returned will be less than or equal to this value. No results are returned if it is set to zero or less. The maximum permitted value is 200. If a value higher than 200 is specified, no more 200 results will be returned. Default 20</param>
        /// <param name="offset">A zero-based integer offset into the results. Default 0.</param>
        /// <returns>A Task containing a list of AlbumData</returns>
        public async Task<MultipleRootObject<AlbumData>> GetAlbumCollection(AlbumsOrderBy albumsOrderBy, int offset = 0, int limit = 20)
        {
            Contract.Requires<ArgumentOutOfRangeException>(limit >= 0, "limit can only be a positive number");
            Contract.Requires<ArgumentOutOfRangeException>(offset >= 0, "offset can only be a positive number");

            var methodParams = new List<KeyValuePair<string, string>>();
            methodParams = AddOffsetAndLimitParams(methodParams, offset, limit);
            methodParams = AddOrderByParam<AlbumsOrderBy>(albumsOrderBy, methodParams);

            
            return await BeatsMusicManager.GetMultipleParsedResult<AlbumData>("albums", methodParams);
        }
        /// <summary>
        ///     You can get the tracks for a playlist.
        /// </summary>
        /// <param name="playlistId">The unique ID for the playlist.</param>
        /// <param name="offset">A zero-based integer offset into the results. Default 0.</param>
        /// <param name="limit">
        ///     Specifies the maximum number of records to retrieve. The number of results returned will be less
        ///     than or equal to this value. No results are returned if it is set to zero or less. The maximum permitted value is
        ///     200. If a value higher than 200 is specified, no more 200 results will be returned. Default 20.
        /// </param>
        /// <param name="playlistRefType">
        ///     An array of referenced objects to include in the response. Only the requested ref
        ///     collections will be returned. Default is to return all refs. Values: artists, album.
        /// </param>
        /// <param name="orderBy">Indicates how the results set should be sorted. Default is popularity desc</param>
        /// <param name="filters">
        ///     Array of streamability filter operations to apply. Streamability refers to whether an entity,
        ///     such as a track or album, can be streamed. Each entity can be in one of three states: Streamable, FutureStreamable,
        ///     NeverStreamable
        /// </param>
        /// <returns></returns>
        public async Task<MultipleRootObject<TrackData>> GetTracksInPlaylist(string playlistId, int offset = 0,
            int limit = 20,
            PlaylistRefType playlistRefType = PlaylistRefType.AllRefs,
            AlbumsOrderBy orderBy = AlbumsOrderBy.PopularityDesc,
            StreamabilityFilters filters = null)
        {
            Contract.Requires<ArgumentNullException>(playlistId != null, "playlistId field is null");

            var methodParams = CreateMethodParams(offset, limit, playlistRefType, orderBy);

            AddStreamabilityFilterParams(filters, methodParams);

            return
                await
                    BeatsMusicManager.GetMultipleParsedResult<TrackData>("playlists/" + playlistId + "/tracks",
                        methodParams, true);
        }
        /// <summary>
        /// You can get a list of albums for an artist.
        /// </summary>
        /// <param name="artistId">The unique ID for the artist.</param>
        /// <param name="offset">A zero-based integer offset into the results. Default 0.</param>
        /// <param name="limit">Specifies the maximum number of records to retrieve. The number of results returned will be less than or equal to this value. No results are returned if it is set to zero or less. The maximum permitted value is 200. If a value higher than 200 is specified, no more 200 results will be returned. Default 20.</param>
        /// <param name="refType">An array of referenced objects to include in the response. Only the requested ref collections will be returned. Default is to return all refs.</param>
        /// <param name="orderBy">Indicates how the results set should be sorted. Default is popularity desc</param>
        /// <returns></returns>
        public async Task<MultipleRootObject<AlbumData>> GetAlbumsByArtist(string artistId, int offset = 0,
                                                                           int limit = 20,
                                                                           AlbumRefType refType = AlbumRefType.AllRefs,
                                                                           AlbumsOrderBy orderBy =
                                                                               AlbumsOrderBy.PopularityDesc)
        {
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(artistId), "artistId field is null");

            this.ValidateIdOffsetLimit(offset, limit);
            var methodParams = new List<KeyValuePair<string, string>>();
            methodParams = AddOffsetAndLimitParams(methodParams, offset, limit);
            methodParams = AddFlagedEnumValues<AlbumRefType>(refType, methodParams);
            methodParams = AddOrderByParam<AlbumsOrderBy>(orderBy, methodParams);

            return
                await
                BeatsMusicManager.GetMultipleParsedResult<AlbumData>(string.Format("artists/{0}/albums", artistId),
                                                                 methodParams);
        }