wikimedia_dart 0.1.0
wikimedia_dart: ^0.1.0 copied to clipboard
A type-safe Dart client for the Wikimedia REST APIs, covering Wikipedia, Wiktionary, Commons, and other Wikimedia projects.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-07-23 #
First stable release. Drops the beta tag and adds automatic retries, clearer
error mapping, and a working related().
Added #
- Automatic retry with exponential backoff for transient failures (429, 5xx,
network, and timeout), configurable through the new
RetryPolicy. On by default with 3 retries; disable withRetryPolicy.none(). A serverRetry-Afteron a 429 or 503 is honored, capped atmaxBackoff. WikiRequestExceptionfor 4xx responses other than 404 and 429 (400, 401, 403, ...). These used to surface asWikiServerException.WikiServerException.retryAfter, read from theRetry-Afterheader on a 5xx.- A live integration suite (
test/integration/) that runs against the real Wikimedia API. Skipped by default; run it withdart test --run-skipped --tags integration. A nightly CI job runs it to catch upstream changes.
Changed #
- Breaking:
PagesClient.related()now returnsList<SearchResultItem>instead ofList<PageSummary>and takes an optionallimit. The REST/page/related/endpoint started returning 403, sorelated()is now built on the search endpoint'smorelike:operator, which restores the feature.
Fixed #
- 4xx responses other than 404/429 were reported as
WikiServerExceptionwith an "Unexpected status code" message; they now map toWikiRequestException.
0.1.0-beta.1 - 2026-06-29 #
First public release for testing and feedback.
Added #
- Project scaffold: directory structure,
pubspec.yaml,analysis_options.yaml. WikiProjectenum covering the supported Wikimedia projects.WikiConfigimmutable settings object.EndpointsREST path constants.UrlBuilderfor all URI construction.- Sealed
WikiExceptionhierarchy:WikiNetworkException,WikiTimeoutException,WikiNotFoundException,WikiRateLimitException,WikiServerException,WikiParseException. PageSummary,WikiThumbnail,ContentUrlsmodels.SearchResponse,SearchResultItemmodels.MediaItem,MediaFilemodels.ServiceBasemixin with the shared request lifecycle.PagesClient(summary,html,related),SearchClient(pages,autocomplete),MediaClient(listForPage,getFile).WikiCliententry point with named constructors and HTTP lifecycle handling.- GitHub Actions CI,
UrlBuildertests, and model parsing tests.