コード例 #1
0
ファイル: Artists.cs プロジェクト: anthonyvscode/LastSharp
        /// <summary>
        /// Get Images for this artist in a variety of sizes.
        /// </summary>
        /// <param name="artist">The artist name in question.</param>
        /// <param name="page">Which page of limit amount to display.</param>
        /// <param name="limit">How many to return. Defaults and maxes out at 50.</param>
        /// <param name="order">Sort ordering can be either 'popularity' (default) or 'dateadded'. While ordering by popularity officially selected images by labels and artists will be ordered first.</param>
        /// <returns></returns>
        public LastfmResponse<ImageList> artistGetImages(string artist, int? page, int? limit, Utilities.Enums.Order? order)
        {
            var request = new RestRequest(Method.GET);
            request.AddParameter("method", "artist.getimages");
            request.AddParameter("artist", artist);

            if (page != null)
                request.AddParameter("page", page);
            if (limit != null)
                request.AddParameter("limit", limit);
            if (order != null)
                request.AddParameter("order", order);

            return Execute<LastfmResponse<ImageList>>(request).Data;
        }