misskey_api_core 0.0.3-beta
misskey_api_core: ^0.0.3-beta copied to clipboard
A library to make it easy to use the Misskey API in your Flutter and Dart apps.
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.0.3-beta - 2025-09-13 #
Added #
- Added support for multipart/form-data uploads (
FormData). When using POST andauthRequired=true, the tokeniis automatically injected intoFormDataas well. MisskeyHttpClient.sendnow accepts adynamic body(Map/FormData/null) and supports upload progress callbacks viaonSendProgress.- Added
contentType,headers, andextratoRequestOptions, allowing per-request overrides. - The
Retry-Aftervalue on HTTP 429 is now captured inMisskeyApiException.retryAfter.
Changed #
- Removed the global
Content-Type: application/json. Content-Type is now automatically inferred per request (or can be explicitly set viaRequestOptions.contentType).Accept: application/jsonis still set globally. - Improved token injection in the interceptor: the token
iis now injected for allMap,FormData, andnullbodies (when POST andauthRequired=true). - Existing error mapping is retained, but now includes the retry wait hint for 429 responses.
Migration Notes #
- Sending JSON works as before by passing
body: Map(Dio will infer the Content-Type). - If you previously relied on a global fixed
Content-Type, please specify it viaRequestOptions.contentTypeas needed. - The signature of
send<T>has been extended, but existing calls passing aMapwill continue to work as before.
0.0.2-beta - 2025-08-19 #
Added #
- Expose
MisskeyHttpClient.baseUrl(original base, before/apinormalization). - Add
exceptionMapperhook toMisskeyHttpClientto customize thrown exceptions. - Add
loggerFn(function-style logger) accepted byMisskeyHttpClientand adapt to existingLoggerinterface. MetaClient.getMeta({bool refresh = false})to force-refresh cache when needed.
Changed #
- Generalize
TokenProvidertoFutureOr<String?> Function()to support both sync/async token sources.
0.0.1-beta - 2025-08-18 #
Added #
- HTTP foundation using Dio: base URL handling (appends
/api), timeouts, and idempotent retries (429/5xx/network) with jitter viaretry. - Request/response logging (debug-only).
- Unified error handling: map Misskey error responses to
MisskeyApiException(statusCode/code/message). - Auth token auto-injection: inject
iinto POST JSON bodies whenauthRequiredis true; per-request options viaRequestOptions(authRequired/idempotent). - Minimal common model and client for
/api/meta(Meta + MetaClient), including a tiny cache andsupports(keyPath)capability detection. - JSON serialization setup (
json_serializable/json_annotation) and generated code. - Example app (
example/): sign-in usingmisskey_auth, note posting, timeline, following/followers tabs; Riverpod for state;loader_overlayfor loading UI. - OAuth helper site under
pages/(index.html,redirect.html) and GitHub Pages deploy workflow (.github/workflows/deploy-pages.yml). - Android/ iOS URL-scheme setup for OAuth callback; Android
INTERNETpermission. - Unit tests: token injection, error mapping, retry behavior, and Meta serialization/capability; example smoke test.