Beispiel #1
0
        private void GetAuthCookiesComplete(HttpWebRequest request, HttpWebResponse response, String jsonData, Exception error)
        {
            if (error != null)
            {
                OnError(error);
                return;
            }

            GoogleHTTP.SetCookieData(request.CookieContainer, response.Cookies);

            if (OnLoginComplete != null)
            {
                OnLoginComplete(this, EventArgs.Empty);
            }
        }
Beispiel #2
0
 public API()
 {
     client         = new GoogleHTTP();
     trackContainer = new List <GoogleMusicSong>();
 }
Beispiel #3
0
 public API()
 {
     client = new GoogleHTTP();
     trackContainer = new List<GoogleMusicSong>();
 }
Beispiel #4
0
        public override HttpWebRequest SetupRequest(Uri address)
        {
            if (address.ToString().StartsWith("https://play.google.com/music/services/"))
            {
                address = new Uri(address.OriginalString + String.Format("?u=0&xt={0}", GoogleHTTP.GetCookieValue("xt")));
            }

            HttpWebRequest request = base.SetupRequest(address);

            request.CookieContainer = AuthorizationCookieCont;

            if (AuthroizationToken != null)
            {
                request.Headers[HttpRequestHeader.Authorization] = String.Format("GoogleLogin auth={0}", AuthroizationToken);
            }

            return(request);
        }