Ejemplo n.º 1
0
        public async Task <TrackInfo> RequestInfoTrack(string mbid)
        {
            QueryInfoMbidParam param = new QueryInfoMbidParam()
            {
                method = "track.getInfo",
                mbid   = mbid
            };
            var LastFMApi = RestService.For <IRequestAPI>(LASTFM_ENDPOINT);

            var response = await LastFMApi.SearchTrackInfo(param);

            return(response);
        }
Ejemplo n.º 2
0
        public async Task <AlbumInfoResponse> RequestInfoAlbum(string mbid)
        {
            QueryInfoMbidParam param = new QueryInfoMbidParam()
            {
                method = "album.getInfo",
                mbid   = mbid
            };

            var httpClient = new HttpClient(new Network.Utils.HttpLoggingHandler())
            {
                BaseAddress = new Uri(LASTFM_ENDPOINT)
            };
            var LastFMApi = RestService.For <IRequestAPI>(httpClient);


            //var LastFMApi = RestService.For<IRequestAPI>(LASTFM_ENDPOINT);
            var response = await LastFMApi.SearchAlbumInfo(param);

            return(response);
        }