Created
November 8, 2016 10:33
-
-
Save harrygr/8ae3e4c9ee988275788e753644d86cd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stack = HandlerStack::create(); | |
$middleware = new Oauth1([ | |
'consumer_key' => config('services.xero.key'), | |
'consumer_secret' => config('services.xero.secret'), | |
]); | |
$stack->push($middleware); | |
$client = new Client([ | |
'base_uri' => 'https://api.xero.com/api.xro/2.0/', | |
'handler' => $stack, | |
]); | |
$res = $client->request('GET', 'Contacts'); | |
var_dump($res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment