Repository navigation
v0.0.1
Initial release of the Newsdata.io Dart/Flutter client — published on pub.dev as newsdataapi.
Pure Dart package, works on Flutter (iOS, Android, Web, Desktop) and standalone Dart (CLI, server). Typed named-parameter methods for all 8 endpoints (latest, archive, crypto, sources, market, count, cryptoCount, marketCount) with the same proven core as the Python / PHP / Node / React / Go SDKs:
- Client-side parameter validation (mutex groups, sentiment_score rule, size 1–50, count date requirement, rawQuery parsing)
- Typed exception hierarchy (NewsdataValidationException, NewsdataApiException, NewsdataAuthException, NewsdataRateLimitException, NewsdataServerException, NewsdataNetworkException)
- Retries with exponential backoff + Retry-After parsing (integer seconds + HTTP-date)
scrollAll(merged Future) andpaginate(idiomatic Stream)- Compile-time required
fromDate/toDateon count endpoints - Custom
http.Clientinjection, optional logger callback, API-key redaction in logs - Typed
Articlemodel including AI enrichments (aiTag,aiRegion,aiOrg,sentiment,sentimentStats) - Zero Flutter deps — pure Dart, no platform channels
- 34 unit tests via
package:http/testingMockClient (no network needed)
Note: this release was published to pub.dev manually (first publish needs an authenticated session to claim the package). The GitHub Actions workflow run triggered by this release will fail with "version already exists" — that's expected and harmless. From v0.0.2 onward, configure the Trusted Publisher on pub.dev and releases will publish automatically via OIDC.