Phriction DatingVIP Public Payment Application Project API Documentation items.statistics History Version 1 vs 3
Version 1 vs 3
Version 1 vs 3
Edits
Edits
- Delete by pmiroslawski, Version 3
- Apr 19 2019 04:00
- Move Here by boris, Version 1
- Mar 11 2015 13:27
Edit Older Version 1... |
Content Changes
Content Changes
== items.statistics ==
==== Description ====
Retrieve items statistics
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>item_id</td><td>mixed (int|array)</td><td>no</td><td>Show results for specified item ID(s)</td></tr>
<tr><td>page</td><td>(int)</td><td>no</td><td>Show only results on specified page</td></tr>
<tr><td>limit</td><td>(int)</td><td>no</td><td>Restrict results per page</td></tr>
<tr><td>on_date</td><td>(string)</td><td>no</td><td>Show results occured on specified date</td></tr>
<tr><td>from_date</td><td>(string)</td><td>no</td><td>Show results from specified date</td></tr>
<tr><td>to_date</td><td>(string)</td><td>no</td><td>Show results until specidied date</td></tr>
<tr><td>from_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>higher than specified</td></tr>
<tr><td>to_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>lower than specified</td></tr>
<tr><td>nocache</td><td>(bool)</td><td>no</td><td>Choose whether results should be cached or not</td></tr>
<tr><td>tracking_tag</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side tracking tag(s)</td></tr>
<tr><td>tracking_order</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side order ID(s)</td></tr>
<tr><td>currency</td><td>mixed (string|array)</td><td>no</td><td>Show results with specified currency</td></tr>
<tr><td>tracking_user</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side user ID(s)</td></tr>
<tr><td>order_id</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified order ID(s)</td></tr>
<tr><td>country</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified countries</td></tr>
<tr><td>ip</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified IP address(es)</td></tr>
<tr><td>host</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified host name(s)</td></tr>
<tr><td>pp_type</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified processor type(s)</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result array with data</td></tr>
</table>
==== Usage Example ====
```
<?php
require_once "curl_http_client/curl_http_client.php";
$curl = new Curl_HTTP_Client();
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com';
$timeout = 30;
//generate post data
$post_data = array
(
'token' => 'some-token',
'password' => '130d04b80a4196857e47b254ebfbb53f',
'command' => 'items.statistics',
'data' => array()
);
$response = $curl->send_post_data($payment_url, $post_data, null, $timeout);
if($response === false)
{
//handle errors
}
//decode json to get array
$response = json_decode($response, true);
var_dump($response);
```
Excepted output after running this script should be:
```
array (size=9)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'items.statistics' (length=16)
'result' =>
array (size=1)
14 =>
array (size=1)
'EUR' =>
array (size=1)
'0.00-24.99' =>
array (size=6)
'spp' => string '0.00' (length=4)
'rpp' => string '24.99' (length=5)
'site_id' => string '14' (length=2)
'signup_count' => int 1
'signup_amount' => float 24.99
'signup_unique' => int 1
'request' =>
array (size=3)
'token' => string 'some-token' (length=10)
'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32)
'command' => string 'items.statistics' (length=16)
'ts' => int 1399658213
'origin_ip' => boolean false
'debug' => null
'errors' => null
```
== items.statistics ==
==== Description ====
Retrieve items statistics
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>item_id</td><td>mixed (int|array)</td><td>no</td><td>Show results for specified item ID(s)</td></tr>
<tr><td>page</td><td>(int)</td><td>no</td><td>Show only results on specified page</td></tr>
<tr><td>limit</td><td>(int)</td><td>no</td><td>Restrict results per page</td></tr>
<tr><td>on_date</td><td>(string)</td><td>no</td><td>Show results occured on specified date</td></tr>
<tr><td>from_date</td><td>(string)</td><td>no</td><td>Show results from specified date</td></tr>
<tr><td>to_date</td><td>(string)</td><td>no</td><td>Show results until specidied date</td></tr>
<tr><td>from_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>higher than specified</td></tr>
<tr><td>to_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>lower than specified</td></tr>
<tr><td>nocache</td><td>(bool)</td><td>no</td><td>Choose whether results should be cached or not</td></tr>
<tr><td>tracking_tag</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side tracking tag(s)</td></tr>
<tr><td>tracking_order</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side order ID(s)</td></tr>
<tr><td>currency</td><td>mixed (string|array)</td><td>no</td><td>Show results with specified currency</td></tr>
<tr><td>tracking_user</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side user ID(s)</td></tr>
<tr><td>order_id</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified order ID(s)</td></tr>
<tr><td>country</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified countries</td></tr>
<tr><td>ip</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified IP address(es)</td></tr>
<tr><td>host</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified host name(s)</td></tr>
<tr><td>pp_type</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified processor type(s)</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result array with data</td></tr>
</table>
==== Usage Example ====
```
<?php
require_once "curl_http_client/curl_http_client.php";
$curl = new Curl_HTTP_Client();
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com';
$timeout = 30;
//generate post data
$post_data = array
(
'token' => 'some-token',
'password' => '130d04b80a4196857e47b254ebfbb53f',
'command' => 'items.statistics',
'data' => array()
);
$response = $curl->send_post_data($payment_url, $post_data, null, $timeout);
if($response === false)
{
//handle errors
}
//decode json to get array
$response = json_decode($response, true);
var_dump($response);
```
Excepted output after running this script should be:
```
array (size=9)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'items.statistics' (length=16)
'result' =>
array (size=1)
14 =>
array (size=1)
'EUR' =>
array (size=1)
'0.00-24.99' =>
array (size=6)
'spp' => string '0.00' (length=4)
'rpp' => string '24.99' (length=5)
'site_id' => string '14' (length=2)
'signup_count' => int 1
'signup_amount' => float 24.99
'signup_unique' => int 1
'request' =>
array (size=3)
'token' => string 'some-token' (length=10)
'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32)
'command' => string 'items.statistics' (length=16)
'ts' => int 1399658213
'origin_ip' => boolean false
'debug' => null
'errors' => null
```