WordpressClient class final
The main class for WordpressClient.
- Implemented types
- Available Extensions
Constructors
- WordpressClient({required Uri baseUrl, BootstrapConfiguration bootstrapper(BootstrapBuilder builder)?})
- Default Constructor.
- WordpressClient.initialize({required Uri baseUrl, BootstrapConfiguration bootstrapper(BootstrapBuilder)?})
- Default Constructor but with initialization.
Properties
- applicationPasswords → ApplicationPasswordsInterface
-
The application password interface.
no setter
- baseUrl → Uri
-
Base url supplied through constructor.
no setter
- categories → CategoryInterface
-
The categories interface.
no setter
- comments → CommentInterface
-
The comments interface.
no setter
- discovery → WordpressDiscovery
-
no setter
- disposed → bool
-
Indicates if this instance is already disposed.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasValidDefaultAuthorization → bool
-
Returns true if we have valid default authorization which is to be used for all requests.
no setter
- isDebugMode → bool
-
Returns true if this instance of WordpressClient is running in debug mode.
no setter
- isReady → bool
-
Status on if the client has been initialized successfully.
no setter
- me → MeInterface
-
The current user interface.
no setter
- media → MediaInterface
-
The media interface.
no setter
- pages → PagesInterface
-
The pages interface.
no setter
- path → String
-
Base url path.
no setter
- posts → PostsInterface
-
The posts interface.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- search → SearchInterface
-
The search interface.
no setter
-
The tags interface.
no setter
- users → UsersInterface
-
The users interface.
no setter
Methods
-
clearDefaultAuthorization(
) → void - Clears default authorization if exists.
-
clearDiscoveryCache(
) → void - Clears the stored discovery cache
-
clearMiddlewares(
) → void -
discover(
) → Future< bool> - Fetches the discovery URL of the associated wordpress site and caches the response and returns the status as a boolean.
-
dispose(
) → void -
Disposes any stored data of this instance, manually.
override
-
exists<
T> ([String? key]) → bool -
Checks if an interface with the given Type
T
andkey
exists. -
get<
T extends IRequestInterface> ([String? key]) → T - Gets an initialized interface.
-
initialize(
) → void - Initializes all the built in interfaces and other services
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reconfigureClient(
BootstrapConfiguration bootstrapper(BootstrapBuilder builder)) → void - Called to reconfigure the client with new settings.
-
register<
T extends IRequestInterface, E> ({required T interface, required JsonEncoderCallback encoder, required JsonDecoderCallback< E> decoder, String? key, bool overriteIfTypeExists = false}) → void - Called to initialize an interface. All interfaces inherit from IRequestInterface abstract class, which provides internal requester instance and other functions.
-
registerMiddleware(
IWordpressMiddleware middleware) → void -
removeMiddleware(
String name) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited