2017 © Pedro Peláez
 

library ecwid-client

Ecwid PHP Client

image

dspacelabs/ecwid-client

Ecwid PHP Client

  • Tuesday, July 11, 2017
  • by joshuaestes
  • Repository
  • 1 Watchers
  • 3 Stars
  • 136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Ecwid PHP Client Build Status

Ecwid PHP Client used for interacting with Ecwid's API., (*1)

Requirements

Installation

composer require "dspacelabs/ecwid-client:~0.1@dev"

Usage

<?php

use Dspacelabs\Component\Ecwid\Client;

$client = new Client($clientId, $clientSecret);

Examples

Getting Access Token

Reference: https://developers.ecwid.com/api-documentation/external-applications, (*2)

use Dspacelabs\Component\Http\Message\Uri;

$redirectUri = new Uri('https://www.example.com/myapp');

// @var array $response
$response = $client->getAccessToken('temp_code', $redirectUri);
$accessToken = $response['access_token'];

Sending Raw Requests

If you need to send a raw request and get a raw response you have access to do so. For example:, (*3)

// @var \Dspacelabs\Component\Http\Message\Request  $request
// @var \Dspacelabs\Component\Http\Message\Response $response
$response = $client->sendWithRequest($request);

The Request object MUST be PSR-7 compliant and the Response object that this client returns is PSR-7 compliant., (*4)

Sending raw requests provides the greatest flexibility, but is very low level., (*5)

Change Log

See CHANGELOG.md, (*6)

License

See LICENSE, (*7)

The Versions