User class.
2.0.0
Optional
Protected
Static
Set the userId.
import {User} from "@quickdevelopment/wp-js";const user = new User();user.byUserId(1).fetch().then((user) => { console.log(user);}) Copy
import {User} from "@quickdevelopment/wp-js";const user = new User();user.byUserId(1).fetch().then((user) => { console.log(user);})
Get a single user.
import {User} from "@quickdevelopment/wp-js";const user = new User('users/1');user.fetch().then((user) => { console.log(user);}) Copy
import {User} from "@quickdevelopment/wp-js";const user = new User('users/1');user.fetch().then((user) => { console.log(user);})
Fetch multiple objects from the endpoint.
Get data about the current class.
1.0.0
Get the search parameters.
Set search parameters for the request.
Object containing search parameters.
Get the instance of the WPJSSingleton class.
Generated using TypeDoc
User class.
Since
2.0.0