this is probably very inneficient but for the FRC API i used a php method I found online
Code:
<?php
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Authorization: Basic *My Auth Key*"
)
);
$context = stream_context_create($opts);
$apiurl = "https://frc-api.firstinspires.org/v2.0/2016/matches/TXHO?tournamentLevel=qual&matchNumber=*";
$file = file_get_contents($apiurl, false, $context);
echo $file;
?>
That works so I tried to do the same thing with the TBA Api
Code:
<?php
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"X-TBA-App-Id: frc3991:scouting-system:v01"
)
);
$context = stream_context_create($opts);
$apiurl = "www.thebluealliance.com/api/v2/team/frc3991/2016/events";
$file = file_get_contents($apiurl, false, $context);
echo $file;
?>
but I get nothing back... (also tried only frc3991:scouting-system:v01 without the X-TBA-App-Id: portion in the header, didn't work)