Log in or register to post comments

total_recos, current_month_recos, previous_month_recos

November 25, 2014 - 9:45am #1

I have followed this thread this https://developer.vuforia.com/forum/cloud-recognition/how-get-number-recos-target-using-vws-api and i tried to get the number of recos but i didn't get the returned response, below is the response 

stdClass Object
(
    [result_code] => Success
    [transaction_id] => ba054fe5eaca4f3fa8942535e56d313f
    [target_record] => stdClass Object
        (
            [target_id] => 16b15dafc20a49d3bf9e3b7f30f67b03
            [active_flag] => 1
            [name] => video
            [width] => 500
            [tracking_rating] => 5
            [reco_rating] => 
        )

    [status] => success
)

 

total_recos, current_month_recos, previous_month_recos

November 25, 2014 - 7:49pm #3

I'm using PHP,

Now, i have a line in GetTarget.PHP file 

private $url = "https://vws.vuforia.com";

private $requestPath = "/targets/";// . $targetId;
 
So, do i need to change to only, private $requestPath = "/summary/";    
 

 

total_recos, current_month_recos, previous_month_recos

November 25, 2014 - 6:05pm #2

The response object structure you posted matches the Get Target response ("/targets/"), but you need to use the Target Summary Report ("/summary/") to get the additional details. I'm using the GetTarget.java, from the VWS samples we provide, with the following code modification:

//getRequest.setURI(new URI(url + "/targets/" + targetId));
getRequest.setURI(new URI(url + "/summary/" + targetId));

The returned JSON response:

{
  "status":"success",
  "upload_date":"2014-07-25",
  "result_code":"Success",
  "transaction_id":"2e1c1...",
  "database_name":"myCloud1",
  "target_name":"stones",
  "active_flag":true,
  "tracking_rating":5,
  "reco_rating":"",
  "total_recos":0,
  "current_month_recos":0,
  "previous_month_recos":0
}

 

Log in or register to post comments