From 4bfc4ccdaf3db530ecd15e291d0d9ac754f0677c Mon Sep 17 00:00:00 2001 From: conky Date: Wed, 12 Oct 2022 23:37:30 +0300 Subject: [PATCH] Initialised composer, started prototyping. --- .gitignore | 3 ++ composer.json | 27 ++++++++++++ src/Client.php | 54 +++++++++++++++++++++++ src/ClientInterface.php | 20 +++++++++ src/Exceptions/InvalidAuthCredentials.php | 9 ++++ 5 files changed, 113 insertions(+) create mode 100644 .gitignore create mode 100644 composer.json create mode 100644 src/Client.php create mode 100644 src/ClientInterface.php create mode 100644 src/Exceptions/InvalidAuthCredentials.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f2077f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +vendor/ +composer.lock \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..2aa4258 --- /dev/null +++ b/composer.json @@ -0,0 +1,27 @@ +{ + "name": "toloka/php-api", + "description": "PHP library to integrate with Hurtom Toloka using web scrapping.", + "type": "library", + "homepage": "http://git.devbones.com/Toloka/php-api", + "require": { + "php": ">=7.4", + "psr/simple-cache": "^3.0", + "psr/log": "^3.0", + "psr/http-client": "^1.0" + }, + "license": "MIT", + "autoload": { + "psr-4": { + "Toloka\\PhpApi\\": "src/" + } + }, + "authors": [ + { + "name": "conky", + "email": "bogdan@devbones.com" + } + ], + "require-dev": { + "guzzlehttp/guzzle": "^7.5" + } +} diff --git a/src/Client.php b/src/Client.php new file mode 100644 index 0000000..ee9197a --- /dev/null +++ b/src/Client.php @@ -0,0 +1,54 @@ +httpClient = $httpClient; + $this->cache = $cache; + $this->logger = $logger; + } + + + +} diff --git a/src/ClientInterface.php b/src/ClientInterface.php new file mode 100644 index 0000000..9e6bbc2 --- /dev/null +++ b/src/ClientInterface.php @@ -0,0 +1,20 @@ +