salesrender/plugin-component-api-client

SalesRender plugin API client component

0.6.9 2024-01-17 07:15 UTC

This package is auto-updated.

Last update: 2024-04-17 08:09:06 UTC


README

\SalesRender\Plugin\Components\ApiClient\ApiClient - component, which accept API endpoint URL and API token, and allow make queries to salesrender.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 \SalesRender\Plugin\Components\ApiClient\ApiClient('https://cluster.salesrender.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());