Skip to content

TestBoxLab/js-webflow-api

 
 

Repository files navigation

Webflow CMS API Client

Requirements

  • Node.js 4+
  • NPM / YARN
  • Webpack / Browserify (optional)

Installation

Install the package via NPM or YARN:

$ npm install --save webflow-api

$ yarn add webflow-api

Usage

const Webflow = require('webflow-api');

// Initialize the API
const api = new Webflow({ token: 'api-token' });

// Initialize the API without CORS mode
const apiNoCors = new Webflow({ token: 'api-token', fetchOpts: { mode: undefined }});

// Fetch a site
api.site({ siteId: '580e63e98c9a982ac9b8b741' }).then(site => console.log(site));

The Webflow constructor takes several options to initialize the API client:

  • token - the API token (required)
  • version - the version of the API you wish to use (optional)
  • fetchOpts - an option to override fetch options

All of the API methods are documented in the API documentation.

Contributing

Contributions are welcome - feel free to open an issue or pull request.

License

The MIT license - see LICENSE.

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%