Download the PHP package repat/plentymarkets-rest-client without Composer
On this page you can find all versions of the php package repat/plentymarkets-rest-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download repat/plentymarkets-rest-client
More information about repat/plentymarkets-rest-client
Files in repat/plentymarkets-rest-client
Package plentymarkets-rest-client
Short Description REST Client for Plentymarkets
License MIT
Homepage https://github.com/repat/plentymarkets-rest-client
Informations about the package plentymarkets-rest-client
plentymarkets-rest-client
This is a PHP package for Plentymarkets new REST API. The API is relatively new at time of writing (March 2017), so not everything might work correctly and this package might also be out of date at some point.
I'm not in anyway affiliated with Plentymarkets, nor do I get paid for this by anybody. As it says in the license, this software is 'as-is'. If you want/need more features, open a GitHub ticket or write a pull request. I'll do my best :) That said, I don't work for the company I developed this for anymore, so if you have any interest in becoming a contributor on this repo, let me know.
You can find the Plentymarkets documentation here:
Overview
- Functions for the 4 HTTP verbs: GET, POST, PUT, DELETE
- Automatic login and refresh if login is not valid anymore
- Simple one-time configuration with PHP array (will be saved serialized in a file)
- Functions return an associative array by default or raw data (e.g. for files)
- Handle rate limiting (thanks hepisec)
Installation
Available via composer on Packagist:
composer require repat/plentymarkets-rest-client
Usage
It's possible to use the 4 HTTP verbs like this
It's also possible to use the function like this. It gives you more freedom, since you can specify the method and the $parameters given are directly given to the Guzzle object.
Raw Data
Some endpoints, such as /rest/bi/raw-data/file
don't return JSON but a raw file. However, by default a single call tries to json_decode()
the response. You can disable it by setting the $jsonDecodeEnabled
flag to false
.
Errors
- If there was an error with the call (=> guzzle throws an exception) all methods will return false, unless
$handleExceptions
has been set totrue
, in which case the exception will be handed through - If the specified config file doesn't exist or doesn't include username / password / url, an exception will be thrown
TODO
- Refresh without new login but refresh-token
Dependencies
- https://packagist.org/packages/nesbot/carbon for date comparison
- https://packagist.org/packages/guzzlehttp/guzzle for HTTP calls.
License
- see LICENSE file
Changelog
- 0.1.16 Enable / Disable
json_decode()
to allow for querying for raw files (thx dark-cms) - 0.1.15 Enable returning PDFs (thx ewaldmedia)
- 0.1.14 Add short period write limit reached error handling (thx resslinger)
- 0.1.13 Change from Laravels
str_contains
to PHPsstripos()
because it doesn't requireext-mbstring
(thx DanMan) - 0.1.12 Remove
danielstjules/stringy
dependency, copy over Laravelsstr_contains
instead - 0.1.11 PHP 8 Support & wait in case of short period read limit reached error (thx fwehrhausen)
- 0.1.10 Allow dealing with Exceptions yourself by passing
true
as 3rd parameter - 0.1.9 Bugfix
isAccessTokenValid()
(thx hochdruckspezialist) - 0.1.8 Update, so Carbon 2.0 can be used (thx stefnats)
- 0.1.7 Fix constructor according to README (thx daniel-mannheimer)
- 0.1.6 Support for HTTP
PATCH
(thx hepisec) - 0.1.5 Remove check for
www.
as it breaks subdomains (thx daniel-mannheimer) - 0.1.4 Automatic rate limiting (thx hepisec)
- 0.1.3 Fix PHP 7.2 dependency
- 0.1.2 Fix Carbon dependency
- 0.1.1 Update Guzzle for PHP 7.2
- 0.1 initial release
Contact
- Homepage: https://repat.de
- e-mail: [email protected]
- Twitter: @repat123
All versions of plentymarkets-rest-client with dependencies
guzzlehttp/guzzle Version ^6.0 | ^7.0
nesbot/carbon Version ^1.22.1 | ^2.0