Skip to content

Instantly share code, notes, and snippets.

@beberlei
Forked from anthonyadamski/gist:c6f82e607c30744b2106
Last active August 29, 2015 14:15
Show Gist options
  • Save beberlei/5473ced58ccf488fa097 to your computer and use it in GitHub Desktop.
Save beberlei/5473ced58ccf488fa097 to your computer and use it in GitHub Desktop.
$products = array();
foreach($arr['accounts'] as $val) {
$account_id = $val['account_id'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://api.appannie.com/v1.2/accounts/'.$account_id.'/sales?break_down=product&start_date=2015-01-01&end_date=2015-01-31');
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer 8a2d2958e05107d04ac4bb25687dfb2b56366de7'
));
$products[] = curl_exec($ch);
curl_close($ch);
}
print_r($products);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment