public async Task <Dictionary <string, string> > PerformMasterLogin(string service       = "ac2dm",
                                                                            string deviceCountry = "us", string operatorCountry = "us", string lang = "en", int sdkVersion = 21)
        {
            var signature = GoogleKeyUtils.CreateSignature(_email, _password, _androidKey);
            var dict      = new Dictionary <string, string> {
                { "accountType", "HOSTED_OR_GOOGLE" },
                { "Email", _email },
                { "has_permission", 1.ToString() },
                { "add_account", 1.ToString() },
                { "EncryptedPasswd", signature },
                { "service", service },
                { "source", "android" },
                { "device_country", deviceCountry },
                { "operatorCountry", operatorCountry },
                { "lang", lang },
                { "sdk_version", sdkVersion.ToString() }
            };

            return(await PerformAuthRequest(dict));
        }
Ejemplo n.º 2
0
        // perform_master_login
        public Dictionary <string, string> PerformMasterLogin(string service       = "ac2dm",
                                                              string deviceCountry = "us", string operatorCountry = "us", string lang = "en", int sdkVersion = 21)
        {
            string signature = GoogleKeyUtils.CreateSignature(email, password, androidKey);
            var    data      = new
            {
                accountType     = "HOSTED_OR_GOOGLE",
                Email           = email,
                has_permission  = 1.ToString(),
                add_account     = 1.ToString(),
                EncryptedPasswd = signature,
                service         = service,
                source          = "android",
                device_country  = deviceCountry,
                operatorCountry = operatorCountry,
                lang            = lang,
                sdk_version     = sdkVersion.ToString()
            };

            return(PerformAuthRequest(data));
        }