public async Task <string> GetPersonId(string address) { string rBody = await MyHttpClient.Get("https://vk.com/" + address); string pattern = "([0-9]+)_([0-9]+)"; string id = Regex.Match(rBody, pattern).ToString(); return(id.Split('_')[0]); }
public async Task <string> GetPerson(string id) { Dictionary <string, string> pars = new Dictionary <string, string>() { { "user_ids", id }, { "name_case", "Nom" } }; string method = "users.get"; return(await MyHttpClient.Get(GetMethodUri(method, pars))); }
public async Task <string> GetPersonFriends(string id) { string[] fields = new string[] { "bdate", "city", "photo_200_orig" }; Dictionary <string, string> pars = new Dictionary <string, string>() { { "user_id", id }, { "name_case", "nom" }, { "count", "200" }, { "order", "name" } }; string method = "friends.get"; string result = await MyHttpClient.Get(GetMethodUri(method, pars, fields)); return(result); }