Esempio n. 1
0
        public async Task <MobileSessionResponse> RequestSession(string username, string password)
        {
            //Build request object
            var request = new MobileSessionRequest
            {
                Username = username,
                Password = password,

                ApiKey = Strings.Keys.LastfmApiKey,
                Method = Strings.Methods.GetMobileSession,
                Secure = true
            };

            var response = await Post <MobileSessionRequest, MobileSessionResponse>(request);


            return(response);
        }
        public async Task <MobileSessionResponse> RequestSession(string username, string password)
        {
            //Build request object
            var request = new MobileSessionRequest
            {
                Username = username,
                Password = password,
                Secure   = true
            };

            var response = await Post <MobileSessionRequest, MobileSessionResponse>(request);

            //Log the key for debugging
            if (response != null)
            {
                Plugin.Logger.Info("{0} successfully logged into Last.fm", username);
            }

            return(response);
        }
        public async Task<MobileSessionResponse> RequestSession(string username, string password)
        {
            //Build request object
            var request = new MobileSessionRequest
            {
                Username = username,
                Password = password,

                ApiKey   = Strings.Keys.LastfmApiKey,
                Method   = Strings.Methods.GetMobileSession,
                Secure   = true
            };

            var response = await Post<MobileSessionRequest, MobileSessionResponse>(request);

            //Log the key for debugging
            if (response != null)
                Plugin.Logger.Info("{0} successfully logged into Last.fm", username);

            return response;
        }
Esempio n. 4
0
        public async Task <MobileSessionResponse> RequestSession(string username, string password)
        {
            //Build request object
            var request = new MobileSessionRequest
            {
                Username = username,
                Password = password,

                ApiKey = Strings.Keys.LastfmApiKey,
                Method = Strings.Methods.GetMobileSession,
                Secure = true
            };

            var response = await Post <MobileSessionRequest, MobileSessionResponse>(request);

            //Log the key for debugging
            if (response != null)
            {
                _logger.LogInformation("{0} successfully logged into Last.fm", username);
            }

            return(response);
        }