Skip to main content

Stream Object Detail Report 1

Shows the country, duration, protocol, device, operating system, and browser-based details on a specified time range.

Parameters

Parameter

Type

Required

Description

user_key

string

Yes

API User Token

user_secret

string

Yes

API User Secret Token

from

string

Yes

Y-m-d date format.

to

string

Yes

Y-m-d date format.

zone_id

integer

Yes

Int value.

object

string

Yes

Object name.

type

string

Yes

It must be one of the following list; country, durating-histogram, protocol, device, browser, operating-system

Return Values

Variable

Type

object-name

string

played

integer

duration

integer (in seconds)

histogram

object

Example PHP Code

CODE
<?php

$data = array(
   "user_key": "user_key",
    "user_secret": "user_secret",
    "from": from,
    "to": to,
    "zone_id":zone_id,
    "object":"object",
    "type":"type"
);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.medianova.com/v1/report/stream/object/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => json_encode($data),
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Output

CODE
{
  "status": true,
  "data": [
    {
      "country": "TR",
      "played": 4913,
      "duration": 2581536,
      "histogram": {
        "2017-02-24": {
          "played": 4913,
          "duration": 2581536
        }
      }
    },
    {
      "country": "US",
      "played": 9,
      "duration": 8025,
      "histogram": {
        "2017-02-24": {
          "played": 9,
          "duration": 8025
        }
      }
    }
  ]
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.