Consulta da API Basecamp

Consulte a API Basecamp e retorne o resultado como uma matriz

Mais informações sobre a API Basecamp podem ser encontradas em https://github.com/37signals/bcx-api/
Exemplo: <? imprimir r ( resultados bc (‘/ people / me.json’, ‘99999999’, ‘dhjfksdhfjksdhfij32’)); ?>

<?
function bc_results($api_url,$bc_account_id,$bc_user_token){
if($api_url){
$api_url
='https://basecamp.com/'.$bc_account_id.'/api/v1'.$api_url;
$ch
=curl_init();
$options
=array(
CURLOPT_URL
=> $api_url,
CURLOPT_RETURNTRANSFER
=> true,
CURLOPT_HTTPHEADER
=> array('Content-type: application/json','Authorization: Bearer '.$bc_user_token),
CURLOPT_USERAGENT
=> 'SampleAppName (test@testington.com)'
);
curl_setopt_array
($ch,$options);
return json_decode(curl_exec($ch),'true');
}
}
?>