tarnawski / associator-php-sdk
PHP SDK to allow access to AssociatorAPI
2.0.0
2019-02-02 22:35 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpcompatibility/php-compatibility: ^9.0
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^5
- sebastian/phpcpd: ^3.0
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2024-10-15 00:53:31 UTC
README
This repository contains the open source PHP SDK that allows you to access the AssociatorAPI from your PHP application.
Installation
To install Associator PHP SDK, simply:
composer require tarnawski/associator-php-sdk
Quick Start and Examples
<?php use Associator\Client; use Associator\Associator; require_once '../vendor/autoload.php'; $client = new Client(); $associator = new Associator($client); $associator->setApiKey('bf357212-41d4-41de-a0a5-01372c939583'); $result = $associator->getAssociations([2], 0.5, 0.5);
Prepare development environment:
In order to set application up you must follow by steps:
- Install Docker (docs.docker.com/install/) and docker-compose (docs.docker.com/compose/install/)
- Run containers (use -d flag for “detached” mode):
docker-compose up -d
- Open in your browser: localhost:85
Test
The tests can be executed by running this command from the project directory:
./vendor/bin/phpunit