Download the PHP package indexzer0/ha-rest-api-client without Composer

On this page you can find all versions of the php package indexzer0/ha-rest-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 ha-rest-api-client

ha-rest-api-client

Latest Version on Packagist Tests codecov Total Downloads

Clients for accessing HomeAssistant Rest API & Webhooks.

Requirements

Installation

You can install the package via composer:

This library does not have a dependency on Guzzle or any other library that sends HTTP requests. This packages uses the awesome HTTPlug to achieve the decoupling. We want you to choose what library to use for sending HTTP requests. Consult this list of packages that support php-http/client-implementation to find clients to use. For more information about virtual packages please refer to HTTPlug.

Install your choice of http client.

Example:

Prerequisites

Usage

This package provides two clients. HaRestApiClient and HaWebhookClient.

Basic (Http Client Auto Discovery)

Custom Http Client (optional)

The client needs to know what library you are using to send HTTP messages. You could provide an instance of a PSR-18 compatible http client and PSR-17 compatible factory, or you could fallback on auto discovery (basic example above). Below is an example on where you provide a Guzzle7 instance.

HaRestApiClient - Available Methods

HaWebhookClient - Available Methods

Error Handling

All exceptions thrown by the package implement \IndexZer0\HaRestApiClient\Exception\HaExceptionInterface.

How-ever it doesn't harm to also catch \Throwable.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of ha-rest-api-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-http/client-common Version ^2.4
php-http/discovery Version ^1.19
php-http/httplug Version ^2.4
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 indexzer0/ha-rest-api-client contains the following files

Loading the files please wait ....