concrete5/nightcap

This package is abandoned and no longer maintained. The author suggests using the concretecms/nightcap package instead.
There is no license information available for the latest version (dev-master) of this package.

Easily build PHP client libraries for your REST APIs.

Maintainers

👁 aembler

Package info

github.com/concretecms/nightcap

pkg:composer/concrete5/nightcap

Statistics

Installs: 1 158

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2023-06-22 20:22 UTC

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 81d1681b883c8778a420bdc9e587938a225e63e8

This package is auto-updated.

Last update: 2023-06-22 20:22:20 UTC


README

concrete5 Nightcap is a library that aims to make getting REST just a little bit easier. With Nightcap, developers can create PHP clients for their existing API layer; if you're a developer who wants to take their REST API and offer a PHP client for it, this is the library for you.

concrete5 Nightcap is not:

  1. A REST Library – Nightcap uses Guzzle 6 for that
  2. A REST Web Services library – Nightcap uses Guzzle Services for that.
  3. An OAuth2 Client – Nightcap uses the League OAuth2 Client for that.

Nightcap does, however, include all these things.

Instead, Nightcap is a way to glue all these different things together, providing a nice object-oriented layer around various OAuth2 grant types and authorization. It uses the very handy Guzzle OAuth2 Subscriber library to handle refresh tokens and access token persistence transparently, without any configuration. Additionally, Nightcap gives you a way to define your web services easily, and offer extension as well.

Library Example

concrete5's PHP API client is built on Nightcap: it's probably the best place to start.

https://github.com/concrete5/concrete5_api_client

Using the Client

Want to see how a developer queries the API? The test console application is a good place to start:

https://github.com/aembler/concrete5_cli_api_example