hipex / pack-api
Wrapper around Hipex hosting platform API
Installs: 13 089
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- euautomation/graphql-client: ^0.2
- psr/log: ^1.0
- psr/log-implementation: ^1.0
- psr/simple-cache: ^1.0
- dev-master
- v1.51.0
- v1.50.0
- v1.49.0
- v1.48.0
- v1.47.0
- v1.46.0
- v1.45.0
- v1.44.0
- v1.43.0
- v1.42.0
- v1.41.0
- v1.40.0
- v1.39.0
- v1.38.0
- v1.37.0
- v1.36.0
- v1.35.0
- v1.34.0
- v1.33.0
- v1.32.0
- v1.31.0
- v1.30.0
- v1.29.0
- v1.28.0
- v1.27.0
- v1.26.0
- v1.25.1
- v1.25.0
- v1.24.0
- v1.23.0
- v1.22.0
- v1.21.0
- v1.20.3
- v1.20.2
- v1.20.1
- v1.20.0
- v1.19.3
- v1.19.2
- v1.19.1
- v1.19.0
- v1.18.1
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.0
This package is auto-updated.
Last update: 2021-09-23 09:30:48 UTC
README
This project is end of life and will no longer be maintained or updated. Please consider using https://platform-api.hipex.io/.
PackApi
Wrapper around Hipex hosting platform API. Have a look at https://www.hipex.io/. The better part of this library is generated from the File generated from https://service.hipex.io/hipex-pack-api GraphQL endpoint.
For a more extended documentation and API explorer please check out https://service.hipex.io/hipex-pack-api/docs/.
Installation
Any implementation of psr/log-implementation
is required https://packagist.org/providers/psr/log-implementation. For Magento 2 monolog/monolog
is already installed.
composer require hipex/pack-api
Usage
On first usage a login is required. This will store a token in your home directory (~/.hipex-console-auth) or if set a token file provided. After login you can call the queries and mutations. When calling queries without login first the API will just return without result or on mutations throw an exception.
Login
$client = new \HipexPackApi\Client(); $client->login('info@example.com', 'password');
Call query / mutation In this example we will fetch a list of all servers and for each server we will fetch the domains on the server. There is a much more efficient way of making the same API call in GraphQL without using the API wrapper. For this have a look at the extended API documentation.
$servers = $client->queryServer(); foreach ($servers as $server) { $filter = new \HipexPackApi\Generated\Schema\Input\FilterInput(); $filter->setField('server.id'); $filter->value($server->getId()); $domains = $client->queryDomain($filter); }
Running GraphQL Query
$query = ' query Server { Server { id name domains { id domain letsEncryptSsl backup } } } '; $serversAndDomains = $client->raw($query);
Issues
For issues please include at least the following parts:
- PHP version used
- Code example reproducing the issue
- Expected result of the code
- Actual result of the code
Versions
For version Semantic Versioning is followed (https://semver.org/). In short Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version Backwards-compatible breaks.
- MINOR version Added functionality in a backwards-compatible manner
- PATCH version Bug fixes