Skip to content

Conversation

@theboxer
Copy link

@theboxer theboxer commented Jun 16, 2022

  • Bump min PHP version to 7.4
  • Remove Guzzle dependency
  • Add request factory and client as new required option for constructor
  • Include changes from Improved exception handling #13

Example init:

$config = [
    'use_sandbox' => false
];

$config['client_id'] = 'client_XXXXXXXXXXXXXXX';
$config['client_secret'] = 'XXXXXXXXXXXXXXX';
$config['refresh_token'] = 'XXXXXXXXXXXXXXX';

if (isset($_SESSION['access_token'])) {
    $config['access_token'] = $_SESSION['access_token'];
}
if (isset($_SESSION['access_token_expires'])) {
    $config['access_token_expires'] = $_SESSION['access_token_expires'];
}

$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
$psr18Client = new \Buzz\Client\Curl($psr17Factory);

$fc = new FoxyClient($psr17Factory, $psr18Client, $config);
$res = $fc->get();

@brettflorio brettflorio mentioned this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants