ekvio-dev/giftery

Giftery API client

Installs: 36

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:project

2.0.0 2024-02-15 09:36 UTC

This package is auto-updated.

Last update: 2024-05-15 10:58:52 UTC


README


About The Project

Another HTTP client for Giftery API with support PSR 7/17/18 compatible HTTP client

Getting Started

Before use API client you need get credentials pair of Client ID and Client Secret from Giftery Administration

Installation

Install from packagist

   composer install ekvio-dev/giftery

Usage

Create GifteryApi object with Http client. By default, project supports CURL implementation.

   $apiClient = new \Giftery\GifteryApi(new CurlClient(), 12345, 'secret');
   $response = $apiClient->getBalance();

or you can use PSR 7/17/18 compatible HTTP client (example: ghuzzle)

    $httpFactory = new \GuzzleHttp\Psr7\HttpFactory();
    $httpClient = new \GuzzleHttp\Client();

    $psrClient = new \Giftery\PsrHttpClient($httpFactory, $httpClient);
    $apiClient - new \Giftery\GifteryApi($psrClient, 12345, 'secret');
    $response = $apiClient->getBalance();

or you can create you Giftery\HttpClient implementation.

API client support methods: getBalance, getProducts, makeOrder, getStatus, getCertificate, getCode, getLinks, getCategories, getAddress, test.