Download the PHP package cyberfusion/cluster-api-client without Composer

On this page you can find all versions of the php package cyberfusion/cluster-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cluster-api-client

Cyberfusion Core API client

Client for the Cyberfusion Core API.

This client was built for and tested on the 1.230.1 version of the API.

Support

This client is officially supported by Cyberfusion. If you have any questions, open an issue on GitHub or email [email protected].

The client was created by @dvdheiden.

Requirements

This client requires PHP 8.1 or higher and uses Guzzle.

Installation

This client can be used in any PHP project and with any framework.

Install the client with Composer:

composer require cyberfusion/cluster-api-client

Usage

Refer to the API documentation for information about API requests.

Getting started

Requests

The endpoint methods may ask for filters, models and IDs. The method type hints tell you which input is requested.

Models

The endpoint may request a model. Most create and update requests do.

When models need to be provided, the required properties are checked before executing the request.

RequestException is thrown when properties are missing. See the error message for more details.

Filtering data

Some endpoints require a ListFilter and return a list of models according to the filter. It's also possible to change the sort order.

Model filters

A ListFilter can be initialized for a model, so it automatically validates if the provided fields are available for the model.

Manually creating filters

You can initialize the ListFilter manually, but fields are not validated if they are available for the model.

Or provide the entries and sort directly:

Alternative method

This package used to offer this way to build the filter. Due to backwards compatibility, this functionality is still available.

Or provide the entries and sort directly:

Manually make requests

To use the API directly, use the request() method on the Client. This method needs a Request class. See the class itself for its options.

Responses

The endpoint methods throw exceptions when requests fail due to timeouts. When the API replies with HTTP protocol errors, the Response class is returned nonetheless. Check if the request succeeded with: $response->isSuccess(). API responses are automatically converted to models.

Authentication

The API is authenticated with a username and password and returns an access token. This client takes care of authentication. To get credentials, contact Cyberfusion.

When you authenticate with username and password, this client automatically retrieves the access token.

The access token is valid for 30 minutes, so there's no need to store it. To store it anyway, access it with $configuration->getAccessToken().

Manually authenticate

Enums

Some properties should contain certain values. These values can be found in the enum classes.

Exceptions

In case of errors, the client throws an exception which extends ClusterApiException.

All exceptions have a code. These can be found in the ClusterApiException class.

Laravel

This client can be easily used in any Laravel application. Add your API credentials to the .env file:

Next, create a config file called cluster.php in the config directory:

Use those files to build the configuration:

Tests

Unit tests are available in the tests directory. Run:

composer test

To generate a code coverage report in the build/report directory, run:

composer test-coverage

Contribution

Contributions are welcome. See the contributing guidelines.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

This client is open-sourced software licensed under the MIT license.


All versions of cluster-api-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.2
illuminate/support Version ^8.22 || ^9.0 || ^10.0 || ^11.0
nesbot/carbon Version ^2.43
ramsey/uuid Version ^3.9 || ^4.0
vdhicts/http-query-builder Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cyberfusion/cluster-api-client contains the following files

Loading the files please wait ....