Я хочу создать консольное приложение в c#, чтобы получать данные (подробности о новостях Google) из google-news-api. Меня так пробовали
static void Main(string[] args)
{
using (var _http = new HttpClient())
{
_http.BaseAddress = new Uri("https://newsapi.org/v2/");
_http.DefaultRequestHeaders.Clear();
_http.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = await _http.GetAsync("everything?sources=&q=bbc-news&sortBy=publishedAt&pageSize=80&apiKey=4dbc17e007ab436fb66416009dfb59a8");
response.EnsureSuccessStatusCode();
using (HttpContent content = response.Content)
{
}
}
}
Ссылка: - API новостей Google