Skip to content

gocodebox/lifterlms-rest

Repository files navigation

LifterLMS REST API

Test PHPUnit PHP Tests Coverage PHPCS Coding Standards Code Climate maintainability Code Climate test coverage

PHP Supported Version

Contributions Welcome Slack community


A REST API feature plugin for LifterLMS.


This specification (and repository) is in beta. It is not yet a fully-functional API. API changes will be continue to be made without deprecation until 1.0.0 is released as a "stable" API.

Contributing Contributions Welcome

We are looking for both API specification designers and developers interested in contributing. Read our contribution guidelines here.

Specification & Documentation

The LifterLMS REST API follows the OpenAPI Specification (Version 3.0.0).

REST API documentation is available at gocodebox.github.io/lifterlms-rest/.

The full OpenAPI spec can be downloaded in json or yaml formats.

Building & Developing REST API Doc spec

This repo uses ReDoc.

To build the docs locally for development:

  • npm start: Starts the development server.
  • npm run build: Bundles the spec and prepares web_deploy folder with static assets.
  • npm test: Validates the spec.
  • npm run gh-pages: Deploys docs to GitHub Pages. You don't need to run it manually if you have Travis CI configured.

Tests and Coding Standards

The LifterLMS REST API adheres to the documentation and coding standards defined for the LifterLMS Core codebase.

  • composer run check-cs: Check coding and documentation standards, showing warnings and errors.
  • composer run check-cs-errors: Check coding and documentation standards, showing errors only.

To run the phpunit test suite:

  • composer run tests-install: Install the test suite.
  • composer run tests-run: Run the test suite.

Building and Publishing Releases

  • llms-dev log:write: Write changelog.
  • llms-dev ver:update: Update version numbers.
  • npm run build: Build a release: spec, doc code snippets, and included language files.
  • llms-dev archive: Build distributable zip file.
  • llms-dev publish:gh: Publish release.
  • Open a Pull Request in the LifterLMS Core to upgrade the library.

These steps require write access to the repository as well as access to the internal development CLI llms-dev. Developers and maintainers are provided with required permissions as needed.