
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@designcontainer/dc-wpe-js-api
Advanced tools
A simple JavaScript wrapper for getting data from your WP Engine installs using their API.
$ npm install @designcontainer/dc-wpe-js-api
import WpeApi from '@designcontainer/dc-wpe-js-api';
Params
user
{String}: The WP Engine API User.pass
{String}: The WP Engine API Password/key.You should put these variables in a .ENV file!
const wpe = new WpeApi(user, pass);
.id
Get WP Engine install ID by name
.
Params
name
{String}: The WP Engine install Name.returns
{String}: Returns the WP Engine install ID.Example
wpe.id(name);
.name
Get WP Engine install name by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the WP Engine install name.Example
wpe.name(id);
.domains
Get WP Engine install domains by id
.
Params
id
{String}: The WP Engine install ID.returns
{Array}: Returns the WP Engine install domains.Example
wpe.domains(id);
.phpVersion
Get the PHP version of the WP Engine install by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the PHP version of the WP Engine install.Example
wpe.phpVersion(id);
.status
Get the status of the WP Engine install by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the status of the WP Engine install.Example
wpe.status(id);
.cname
Get the CNAME of the WP Engine install by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the CNAME of the WP Engine install.Example
wpe.cname(id);
.environment
Get the WP Engine install environment by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the WP Engine install environment.Example
wpe.environment(id);
.primaryDomain
Get WP Engine primary install domain by id
.
Params
id
{String}: The WP Engine install ID.returns
{String}: Returns the WP Engine install primary domain.Example
wpe.primaryDomain(id);
.isMultisite
Check if WP Engine install is a multisite environment by id
.
Params
id
{String}: The WP Engine install ID.returns
{Boolean}: Returns boolean true/false depending on if install is a multisite environment.Example
wpe.isMultisite(id);
.newBackup
Creates a new WP Engine Backup by id
.
Params
id
{String}: The WP Engine install ID.description
{String}: Backup description.notification_emails
{Array}: Backup notification email addresses.returns
{Boolean}: Returns backup response.
Examplewpe.newBackup(id, description, notification_emails);
.getWpeApi
Get custom WP Engine data.
Params
...args
{Any}: Api arguments. Docs: https://wpengineapi.com.returns
{Object}: Returns api data.Examples
wpe.getWpeApi('installs', { limit: 10 })
.then((res) => {
console.log(res);
})
.catch((err) => console.error(`Error: ${err}`));
wpe.getWpeApi('installs', id, 'domains')
.then((res) => {
console.log(res);
})
.catch((err) => console.error(`Error: ${err}`));
.postWpeApi
Post custom WP Engine data.
Params
...args
{Any}: Api arguments. Docs: https://wpengineapi.com.returns
{Object}: Returns api response.Examples
wpe.postWpeApi('installs', id, 'backups', {
description,
notification_emails,
})
.then((res) => {
console.log(res);
})
.catch((err) => console.error(`Error: ${err}`));
FAQs
A javascript wrapper for the WPE Api
The npm package @designcontainer/dc-wpe-js-api receives a total of 22 weekly downloads. As such, @designcontainer/dc-wpe-js-api popularity was classified as not popular.
We found that @designcontainer/dc-wpe-js-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.