newsapi_client 0.1.4 newsapi_client: ^0.1.4 copied to clipboard
A client for the newsapi.org API (v2) written in dart. You can get access to the API by signing up at https://newsapi.org.
Newsapi client for dart #
import 'package:newsapi_client/newsapi_client.dart';
// Initialize client with your API key.
final client = NewsapiClient('your API key');
// Get top headlines from Canada.
Future<Map<String, dynamic>> topHeadlinesCanada() async => client.topHeadlines({
'country': Countries.canada,
});