public static async void TestAsync(bool moreMessage, bool isMobile, string path, string host, string reffer, HttpFormUrlEncodedContent content) { var result = await DoubanWebProcess.PostDoubanResponseAsync( path, host, reffer, content, isMobile); JObject jo = JObject.Parse(result); Debug.WriteLine(jo.ToString()); }
public static async Task <string> AccessOauth2Token(string email, string password) { return(await DoubanWebProcess.PostDoubanResponseAsync( path : "https://frodo.douban.com/service/auth2/token", host : "frodo.douban.com", reffer : null, content : new HttpFormUrlEncodedContent(new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("client_id", "0dad551ec0f84ed02907ff5c42e8ec70"), new KeyValuePair <string, string>("client_secret", "9e8bb54dc3288cdf"), new KeyValuePair <string, string>("redirect_uri", "frodo://app/oauth/callback/"), new KeyValuePair <string, string>("grant_type", "password"), new KeyValuePair <string, string>("username", email), new KeyValuePair <string, string>("password", password), new KeyValuePair <string, string>("os_rom", "android"), }), isMobileDevice : true)); }