Skip to content

A Dart library for searching and fetching data through Wikimedia API endpoints.

License

Notifications You must be signed in to change notification settings

flikkr/wikidart

Repository files navigation

Wikidart

License: MIT

A simple wrapper for WikiMedia API written in Dart. Allows you to query and retrieve Wikipedia page information.

Usage

A typical usage example:

import 'package:wikidart/wikidart.dart';

Future<void> main() async {
  var res = await Wikidart.searchQuery('Google');
  var pageid = res?.results?.first.pageId;

  if (pageid != null) {
    var google = await Wikidart.summary(pageid);

    print(google?.title); // Returns "Google"
    print(google?.description); // Returns "American technology company"
    print(google?.extract); // Returns "Google LLC is an American multinational technology company that specializes in Internet-related..."
  }
}

Features

  • Search by title
  • Get summary by pageid
  • Random
  • Set page language

Contributions

Please file feature requests and bugs at the issue tracker.

About

A Dart library for searching and fetching data through Wikimedia API endpoints.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages