Page MenuHomeHelloSingles

api.help
Updated 3,457 Days AgoPublic

api.help

Description

Retrieves help for specified API command

Input Parameters
NameTypeRequiredDescription
cmdStringYesCmd Name
Return
NameTypeDescription
helpstringDescription for specified command
parramsarrayArray with list of params
Usage Example
<?php
$curl = new \Dinke\CurlHttpClient;

//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com/api.json';
$timeout 	= 30;

$curl->setCredentials('some-token', 'some-pass');

//generate post data
$post_data = array
(
	'cmd'	=> 'api.help',
	'data'	=> array('cmd' => 'api.help')
);

$response = $curl->sendPostData($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=1)
  'result' => 
    array (size=8)
      'code' => int 700
      'status' => string 'Action completed succesfully' (length=28)
      'command' => string 'api.help' (length=8)
      'result' => 
        array (size=2)
          'help' => string 'Retrieve list of subscriptions' (length=30)
          'params' => 
            array (size=22)
              'sub_id' => string '(int|array) Show results for specified subscription ID(s)' (length=57)
              'item_id' => string '(int|array) Show results for specified item ID(s)' (length=49)
              'page' => string '(int) Show only results on specified page' (length=41)
              'limit' => string '(int) Restrict results per page' (length=31)
              'on_date' => string '(string) Show results occured on specified date' (length=47)
              'from_date' => string '(string) Show results from specified date' (length=41)
              'to_date' => string '(string) Show results until specidied date' (length=42)
              'from_id' => string '(int) Show results with ID(s) higher than specified' (length=51)
              'to_id' => string '(int) Show results with ID(s) lower than specified' (length=50)
              'nocache' => string '(bool) Choose whether results should be cached or not' (length=53)
              'tracking_tag' => string '(int|array) Show results with specified client side tracking tag(s)' (length=67)
              'tracking_order' => string '(int|array) Show results with specified client side order ID(s)' (length=63)
              'currency' => string '(string|array) Show results with specified currency' (length=51)
              'tracking_user' => string '(int|array) Show results with specified client side user ID(s)' (length=62)
              'order_id' => string '(int|array) Show results with specified order ID(s)' (length=51)
              'country' => string '(string|array) Show results having specified countries' (length=54)
              'ip' => string '(string|array) Show only results having specified IP address(es)' (length=64)
              'name' => string '(string*) Show only results having specified user name' (length=54)
              'ccnum' => string '(string*) Show only results having specified credit card number part' (length=68)
              'pp_type' => string '(string|array) Show results having specified processor type(s)' (length=62)
              'rebill_count' => string '(int) Show results having specified nubmer of rebill count(s)' (length=61)
              'email' => string '(string*) Show results having specified user email' (length=50)
      'request' => 
        array (size=5)
          'cmd' => string 'api.help' (length=8)
          'data' => 
            array (size=1)
              'cmd' => string 'api.help' (length=8)
          'token' => string 'some-token' (length=26)
          'pass' => string 'some-pass' (length=32)
          'prefixes' => string 'api' (length=3)
      'ts' => int 1429543640
      'origin_ip' => string '93.87.220.184' (length=13)
      'errors' => null
Last Author
dinke
Last Edited
Apr 20 2016, 14:41

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:23
boris changed the visibility from "Public (No Login Required)" to "All Users".
boris changed the visibility from "All Users" to "Public (No Login Required)".
dinke edited the content of this document. (Show Details)
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:21