leadvertex / plugin-component-api-client
LeadVertex plugin API client component
Installs: 7 171
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.4.0
- adbario/php-dot-notation: ^2.2
- leadvertex/plugin-component-guzzle: ^0.3
- softonic/graphql-client: ^1.2
- xakepehok/array-graphql: ^0.0.1
Requires (Dev)
- mockery/mockery: ^1.4
- phpunit/phpunit: 9
README
\Leadvertex\Plugin\Components\ApiClient\ApiClient
- component, which accept API endpoint URL and API token, and
allow make queries to leadvertex.com GraphQL API. This component use under the hood
softonic/graphql-client GraphQL client library
Usage
For example, in your plugin app you can create internationalization class like this
<?php $client = new \Leadvertex\Plugin\Components\ApiClient\ApiClient('https://cluster.leadvertex.com/companies/1/CRM', 'token here'); /** @var \Softonic\GraphQL\Response $response */ $response = $client->query('query {name, company}'); print_r($response->getData()); print_r($response->getErrors());