hello
I did API Request for THETA Camera with php language and that was working :
code :
error_reporting(E_ALL);
ini_set( 'display_errors','1');
$url ="http://192.168.254.124/osc/commands/execute";
$username = 'THETAYN10113693';
$password = '10113693';
// $parameters json_encode(array("fileType" => "image", "entryCount" => 1, "maxThumbSize" => 0));
$Body = json_encode(array('name' => 'camera.listFiles', 'parameters' => array("fileType" => "image", "entryCount" => 1, "maxThumbSize" => 0)));
$options = array(
CURLOPT_URL => $url,
//CURLOPT_HEADER => true,
CURLOPT_VERBOSE => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false, // for https
CURLOPT_USERPWD => $username . ":" . $password,
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array('Content-Type:application/json'),
CURLOPT_POSTFIELDS => $Body
);
$ch = curl_init();
curl_setopt_array( $ch, $options );
$raw_response = curl_exec( $ch );
// echo json_encode($raw_response);
//$total_data = json_encode($raw_response);
echo $raw_response;
//echo $total_data;
and i got this Response :
{“fingerprint”:“FIG_0163”,“state”:{“_apiVersion”:2,“batteryLevel”:0.78,“_batteryState”:“disconnect”,“_cameraError”:,“_captureStatus”:“idle”,“_capturedPictures”:0,“_compositeShootingElapsedTime”:0,“_function”:“mySetting”,“_latestFileUrl”:“http://192.168.254.124/files/90014a68423861503e031db848764600/100RICOH/R0011105.JPG",“_mySettingChanged”:false,“_pluginRunning”:false,“_pluginWebServer”:true,“_recordableTime”:0,“_recordedTime”:0,“storageUri”:"http://192.168.254.124/files/90014a68423861503e031db848764600/”}}
I want only one value from this object i want Url Picture To be able to download the image
but i cant got any single value from this object Always got only Undefine
I tried also $raw_response.state._latestFileUrl also not work ??
I dont know how can I handle with this object???
i hope help