Skip to content

Instantly share code, notes, and snippets.

@julianobailao
Created January 23, 2017 22:45
Show Gist options
  • Select an option

  • Save julianobailao/27dcd7d4367f340e60ad91639643a9d4 to your computer and use it in GitHub Desktop.

Select an option

Save julianobailao/27dcd7d4367f340e60ad91639643a9d4 to your computer and use it in GitHub Desktop.
Geting a response
require 'vendor/autoload.php';

$skyhubUser = 'seu-usuario@domio.com.br';
$skyhubToken = 'seu-token-aqui';
$debugMode = true; // setando o debug do guzzle http como true

$skyhub = new Marketplacehub\Skyhub\ApiClient($skyhubUser, $skyhubToken, $debugMode);
$response = $skyhub->categories->get(); // isso retorna uma instancia da Response do package guzzle
// convertendo a response em um stdClass
$categories = json_decode($response->getBody());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment