getOviTrend
Returns the Monitoring OVI trend of a project domain.
| Route | /monitor/getOviTrend[/:key[/:projhash[/:format[/:limit[/:skip[/:device[/:sengineid[/:labelid[/:date[/:competitor]]]]]]]]]] |
|---|---|
| required parameters | projhash |
| optional parameters | format limit (max:1000) skip device sengineid labelid date competitor |
| Return values | date value |
| CROSS References | getProjects() – This function contains the projecthashes. getSearchengines() – This function contains the searchengine ids. getLabels() – This function contains the label ids. |
| HINTS | date – if there is no OVI for the last crawldate, the date with the last valid OVI will be chosen. limit – The maximum limit is 1000. To get more results, please use the parameter skip. resultCount – Shows the amount of the result without limits. Usefull for pagination. |
Parameter
| Labeling | description | values margin | defaults |
|---|---|---|---|
| projhash | Contains a hash of an project. | md5-String see getProjects() |
– |
| device | Contains a device Id. | 1 – PC 2 – Tablet 3 – Handy |
1 |
| limit | Defines the amount of the returned results. (max:1000) | 0-1000 | 100 |
| skip | Defines the starting page of the result. One page equals the the value of limit. | (0-9)+ | 0 |
| format | Defines in which format the result will be returned. | json|xml | json |
| sengineid | Contains a Searchengine Id. | see getSearchengines() | NULL (All) |
| labelid | Contains a Label Hash. | see getLabels() | NULL (All) |
| date | Contains a Startdatum. | Y-m-d | last valid Datum |
| competitor | A valid competitor-hash of the given project. | string | NULL |
Rückgabewerte
| labeling | description | values margin |
|---|---|---|
| date | Shows the date the OVI got determined. | Date: YYYY-MM-DD |
| value | Contains the static OVI of a domain. | (0-9)+.(0-9)+ |
Meldungen
| message | description |
|---|---|
| maximum limit exeeded | The maximum limit is reached. |
| internal error | An internal error occured. |
| param missing | A required parameter is missing. |
| param invalid | The value of a parameter is not valid. |
| result empty | The request was successful, but the result itself is empty. |
| cost error | The current credit amount is not sufficient to handle the request. |
| 0k. | The processing was successful. |
Beispielcode
$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
'service' =>'keywords',
'method' =>'getMonitoringOviTrend',
'key' =>'myPersonalKey',
'projhash' => 'myProjectHash',
);
$GETparams = implode('/', $arrayParams);
$requestURL = $root.$GETparams;
if (!function_exists('curl_init')) die('cURL not available');
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Download the given URL, and return output
$output = curl_exec($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
echo $output;
?>
Beispielergebnisse
JSON
{
"apiErrorCode":0,
"apiErrorMessage":"0k.",
"apiResult":[
{
"date":"2013-02-11",
"value":5995.01
},
{
"date":"2013-02-18",
"value":5859.46
},
{
"date":"2013-02-25",
"value":5626.82
}]
}
XML
<?xml version="1.0"?>
<result>
<apiErrorCode>0</apiErrorCode>
<apiErrorMessage>0k.</apiErrorMessage>
<apiResult>
<monitoringOvis>
<monitoringOvi>
<date>2013-02-18</date>
<value>97.67</value>
</monitoringOvi>
<monitoringOvi>
<date>2013-02-25</date>
<value>93.36</value>
</monitoringOvi>
<monitoringOvi>
<date>2013-03-04</date>
<value>91.98</value>
</monitoringOvi>
</monitoringOvis>
</apiResult>
</result>
