flutter_wordpress library

This library uses WordPress REST API V2 to provide a way for your application to interact with your WordPress website.

We use terminologies similar to the WordPress REST API

For authentication and usage of administrator level APIs, we have implemented two popular authentication plugins:

  1. Application Passwords
  2. JWT Authentication for WP REST API

Classes

About
Archives
Author
AvatarUrls
Caption
Category
Children
Collection
Comment
A WordPress Comment [...]
CommentHierarchy
This class is used to store comments as a hierarchy.
Content
Curies
Data
Description
Excerpt
Full
Guid
ImageMeta
InReplyTo
JWTResponse
Labels
Large
Media
MediaDetails
Medium
MediumLarge
Page
ParamsCategoryList
This class holds all arguments which can be used to filter Categories when using WordPress.fetchCategories method. [...]
ParamsCommentList
This class holds all arguments which can be used to filter comments when using WordPress.fetchComments method. [...]
ParamsMediaList
This class holds all arguments which can be used to filter media when using WordPress.fetchMediaList method. [...]
ParamsPageList
This class holds all arguments which can be used to filter pages when using WordPress.fetchPages method. [...]
ParamsPostList
This class holds all arguments which can be used to filter posts when using WordPress.fetchPosts method. [...]
ParamsTagList
This class holds all arguments which can be used to filter Tags when using WordPress.fetchTags method. [...]
ParamsUserList
This class holds all arguments which can be used to filter users when using WordPress.fetchUsers method. [...]
Post
A WordPress Post [...]
PostThumbnail
PredecessorVersion
Replies
Self
Settings
Sizes
Tag
Thumbnail
Title
Up
User
UserCapabilities
UserExtraCapabilities
VersionHistory
WordPress
All WordPress related functionality are defined under this class.
WordPressError
All API related errors are thrown as an object of this class.
WpActionAssignAuthor
WpActionAssignCategories
WpActionAssignTags
WpActionCreateCategories
WpActionCreateTags
WpActionPublish
WpActionSticky
WpActionUnfilteredHtml
WpAttachment
WpFeaturedmedia
WpItems
WpPostType
WpTerm

Constants

URL_CATEGORIES → const String
'$URL_WP_BASE/categories'
URL_COMMENTS → const String
'$URL_WP_BASE/comments'
URL_JWT_BASE → const String
'/wp-json/jwt-auth/v1'
URL_JWT_TOKEN → const String
'$URL_JWT_BASE/token'
URL_JWT_TOKEN_VALIDATE → const String
'$URL_JWT_BASE/token/validate'
URL_MEDIA → const String
'$URL_WP_BASE/media'
URL_PAGES → const String
'$URL_WP_BASE/pages'
URL_POSTS → const String
'$URL_WP_BASE/posts'
URL_TAGS → const String
'$URL_WP_BASE/tags'
URL_USERS → const String
'$URL_WP_BASE/users'
URL_WP_BASE → const String
'/wp-json/wp/v2'

Functions

constructUrlParams(Map<String, String> params) → String
Formats a Map of parameters to a string of URL friendly parameters.
enumStringToName(String enumString) → String
Converts an enum string to enum value name.
listToUrlString<T>(List<T> items) → String
Formats a list of items to a comma(,) separated string to pass it as a URL parameter.

Enums

CategoryTagOrderBy
CommentOrderBy
CommentStatus
CommentType
MediaOrderBy
MediaStatus
MediaType
Order
PageOrderBy
PostCommentStatus
PostFormat
PostOrderBy
PostPageStatus
PostPingStatus
UserOrderBy
UserRole
WordPressAuthenticator
WordPressContext