New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

growi-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

growi-js

This is a SDK for [GROWI](https://growi.org/) written in node.js.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Growi node.js SDK

This is a SDK for GROWI written in node.js.

Installation

$ npm install growi-js

Usage

Create a client

import { GROWI } from 'growi-js';
const growi = new GROWI({apiToken: 'YOUR_API_TOKEN'});

Initialize parameters are as follows:

ParameterDescription
apiTokenAPI token for GROWI. You can get it from the setting page of GROWI.
urlURL of GROWI. Default is http://localhost:3000.
pathEndpoint path of Growi API. Default is /.

Get root page

const page = await growi.root();
page instanceof growi.Page; // true

Get children of a page

const pages = await page.children();
pages[0] instanceof growi.Page; // true

Update page contents

page.contents('New contents');
await page.save();

Get contents of a page

const contents = await page.contents();

Create a page

const newPage = await page.create({name: 'New page'});

Remove a page

await page.remove();

License

MIT

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

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.

Install

Related posts