Skip to content

elecena/api-client-guzzle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TME-API Guzzle Client

This library provides a Guzzle Client which communicates with TME API.

Read more at:

Installation:

composer require tme/api-client-guzzle

Example usage:

<?php

// Register your app here https://developers.tme.eu/en/dev
const TOKEN = '';
const SECRET = '';

require 'vendor/autoload.php';

// Factory Guzzle client.
$client = \TMEApi\ClientFactory::factoryForCredentials(TOKEN, SECRET);

// Send request
$options = [
    'form_params' => [
        'SymbolList' => [
            'NE555D',
            '1N4007-DIO'
        ],
        'Country' => 'US',
        'Language' => 'EN',
    ],
];

$result = $client->request('POST', '/Products/GetProducts.json', $options);

print_r(
    json_decode($result->getBody(), true)
);

Packages

No packages published

Languages

  • PHP 100.0%