Repository navigation
Home
Arun Prakash edited this page Nov 3, 2026
·
18 revisions
A strongly typed WordPress client for Dart and Flutter. It talks to the REST API, WPGraphQL and the Abilities API through one client, one auth setup and one middleware pipeline.
final client = WordpressClient.forSite(siteUrl: Uri.parse('https://example.com'));
final posts = (await client.posts.list(ListPostRequest(perPage: 5))).dataOrThrow();| Page | What it covers |
|---|---|
| Usage | Install, create a client, discovery, lifecycle |
| Bootstrap and Configuration | Every BootstrapBuilder option, reconfigure, origin rules |
| Authorization | App Passwords, JWT, custom auth, credential handling |
| Browser Sign-In | Let users approve your app on their site (authorize-application flow) |
| WordPress.com and Jetpack |
forWordpressCom, OAuth2 tokens |
| Multisite |
forNetworkSite, siteUrl
|
| Sending Requests | CRUD, request options, media upload, response metadata |
| Supported REST Methods | Endpoint and operation coverage |
| Page | What it covers |
|---|---|
| Error Handling and Responses | Success/failure, typed failures, RequestErrorType
|
| Fluent Queries | client.posts.query.withSearch(...).execute() |
| Interfaces and Extensions |
getById, findBySlug, listAll, model helpers |
| Custom Post Types |
client.resource<T> for custom post types and plugin routes |
| Model Generator |
dart run wordpress_client:generate: models from the REST schema |
| Meta and ACF |
metaValue<T>, acfValue<T>, acf: on writes |
| Concurrent Edits | updateIfUnmodified |
| Batch Requests | Many writes in one HTTP call |
| Embed and Fields |
_embed / _fields, typed post.embedded
|
| Pagination and Finders |
listPages, listAll, finders |
| Parallel Requests | Fetch many pages concurrently |
| Streaming and Polling | Poll a resource as a Stream
|
| Pattern Directory Items | The block pattern directory endpoint |
| Page | What it covers |
|---|---|
| Retries |
RetryPolicy, backoff, Retry-After
|
| Caching | GET cache, invalidation, ETag revalidation, persistent and custom stores |
| Request De-duplication and Concurrency | Share identical in-flight GETs, cap parallel requests |
| Middlewares |
onRequest / onExecute / onResponse hooks |
| Logging |
LoggingMiddleware with redaction |
| Offline Write Queue | Keep writes made offline and replay them |
| Events and Statistics | Per-request events (onSend, onReceive, onError, onCancel), request counters |
| Page | What it covers |
|---|---|
| GraphQL | Queries, mutations, partial results, pagination, batching, APQ |
| Abilities | WordPress 6.9 Abilities API |
| Page | What it covers |
|---|---|
| Using Custom Requests | Typed interfaces for your own endpoints |
| Raw Requests | Untyped requests and responses |
| Integration with Storage Packages | Persisting responses and cache entries |
| Testing | MockWordpressAdapter |
| API Changelog | Breaking changes and migration notes |
Getting started
- Usage
- Bootstrap and Configuration
- Authorization
- Browser Sign-In
- WordPress.com and Jetpack
- Multisite
- Supported REST Methods
Requests and data
- Sending Requests
- Error Handling and Responses
- Fluent Queries
- Interfaces and Extensions
- Custom Post Types
- Model Generator
- Meta and ACF
- Concurrent Edits
- Batch Requests
- Embed and Fields
- Pagination and Finders
- Parallel Requests
- Streaming and Polling
- Pattern Directory Items
Behaviour
- Retries
- Caching
- Request De-duplication and Concurrency
- Middlewares
- Logging
- Offline Write Queue
- Events and Statistics
Other APIs
Extend and test
Reference