Download the PHP package instacar/autometrica-webservice-client without Composer

On this page you can find all versions of the php package instacar/autometrica-webservice-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 autometrica-webservice-client

Autométrica PHP Client

Una implementación opinada no oficial del Webservice para Autométrica.

Notas

Esta librería NO está relacionada con Autométrica de ninguna manera y/o forma. Es simplemente un trabajo derivado para poder utilizar el Webservice de Autométrica de una manera práctica y sencilla mediante modelos POPO (Plain Old PHP Objects).

Instalación

Dependencias

Esta librería depende de un cliente HTTP que implemente la interfaz PSR-18. Puede instalar el cliente de referencia para esta implementación de la siguiente manera:

composer require symfony/http-client

Librería

La instalación del cliente es simple, solo debes ejecutar el siguiente comando:

composer require instacar/autometrica-webservice-client

Uso

Para usar el cliente puedes crear una instancia por defecto que se encargará de crear el cliente HTTP PSR-18. El cliente tiene un método por cada punto final del Webservice de Autometrica. Por ejemplo, para solicitar el catálogo de vehículos:

use Instacar\AutometricaWebserviceClient\AutometricaClient;

$cliente = AutometricaClient::createDefault($username, $password);
$catalogo = $cliente->getCatalog();

Cada entidad de la Webservice está modelada con una clase PHP que tiene getters para cada una de las propiedades, con el fin de proporcionar ayuda a los IDEs y autocompletar mejor, además de proporcionar tipos estrictos a cada una de las propiedades. Siguiendo con el ejemplo anterior:

foreach ($catalogo as $vehiculo) {
    echo $vehiculo->getBrand(); // La marca del vehículo
    echo $vehiculo->getModel(); // El modelo del vehículo
    echo $vehiculo->getYear();  // EL año del vehículo
    echo $vehiculo->getTrim();  // La versión del vehículo
}

Si desea ver los métodos y modelos implementados, por favor, consulte la documentación.

Avanzado

Si deseas utilizar tus propias implementaciones del cliente HTTP PSR-18, puedes instanciar directamente el AutometricaClient con el cliente HTTP.

use Instacar\AutometricaWebserviceClient\AutometricaClient;

$cliente = new AutometricaClient($clienteHttp, $username, $password);

Licencia

Esta librería utiliza la licencia Lesser General Public Licence Version 3 (LGPLv3). Puede consultarla en el archivo LICENSE.


All versions of autometrica-webservice-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
doctrine/annotations Version ^1.13
doctrine/collections Version ^1.6.8
psr/http-client Version ^1.0.1
psr/http-factory Version ^1.0.1
psr/http-message Version ^1.0.1
symfony/property-access Version ^4.4|^5.4|^6.0
symfony/property-info Version ^4.4|^5.4|^6.0
symfony/serializer Version ^4.4|^5.4|^6.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 instacar/autometrica-webservice-client contains the following files

Loading the files please wait ....