dartpedia 1.6.6 copy "dartpedia: ^1.6.6" to clipboard
dartpedia: ^1.6.6 copied to clipboard

discontinued

API Wrapper for the MediaWiki API. Used to gather information from any Wikipedia Page.

An API Wrapper for the MediaWiki API

Created by Benjamin Whitehead

pub package Build Status

This is an early implementation of the MediaWiki API in Dart. Note, there are still some issues with this API that will be worked on in the coming months. Some of these issues include: unclean data and over use of dynamic types.

Getting Started #

To get started, simply add dartpedia to pubspec.yaml:

dependencies:
  dartpedia: ^1.6.6

Using #

To use dartpedia, first start by importing the package.

import 'package:dartpedia/dartpedia.dart' as wiki;

Next, create a new WikipediaPage object with the wiki.page(topic) function.

var wikipediaPage = await wiki.page('Dart (programming language)');

Use the .summary() function to print a summary of the page.

print(wikipediaPage.summary());

To get the individual components of a page, use the following functions

var url = wikipediaPage.url;
var title = wikipediaPage.title;
var links = wikipediaPage.links;
var content = wikipediaPage.content;

To search for possible topics for a phrase, use the .search(topic) function

var relatedTopics = await wiki.search("Dart");
print(relatedTopics);

Examples: #

More examples can be found in the Examples folder

7
likes
40
pub points
19%
popularity

Publisher

unverified uploader

API Wrapper for the MediaWiki API. Used to gather information from any Wikipedia Page.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

dio, test

More

Packages that depend on dartpedia