Page MenuHomeDatingVIP

users.search
Updated 3,313 Days AgoPublic

Version 2 of 3: You are viewing an older version of this document, as it appeared on Apr 20 2015, 17:08.

users.search

Description

Search users by custom parameters

Input Parameters
NameTypeRequiredDescription
email(string)noEmail
ccname(string)noName on credit card
ccnum(string)noPart of the user's credit card number
Return
NameTypeDescription
resultarrayResult array with data
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');

$post_data = array(
	'cmd'	=> 'users.search',
	'data'	=> array('email' => 'webdriver+4872@gmail.com')
);

$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 'users.search' (length=12)
      'result' => 
        array (size=1)
          0 => 
            array (size=7)
              'system_id' => string 'dbt' (length=3)
              'tracking_user' => string '30540107' (length=8)
              'email' => string 'webdriver+4872@gmail.com' (length=24)
              'name' => string 'Test Test' (length=9)
              'ccnum' => string '510510xxxxxx5100' (length=16)
              'cc_type' => string 'mc' (length=2)
              'status' => string 'inactive' (length=8)
      'request' => 
        array (size=4)
          'cmd' => string 'users.search' (length=12)
          'data' => 
            array (size=1)
              'email' => string 'webdriver+4872@gmail.com' (length=24)
          'token' => string 'some-token' (length=26)
          'pass' => string 'some-pass' (length=32)
      'ts' => int 1429564031
      'origin_ip' => string '93.87.220.184' (length=13)
      'errors' => null
Last Author
dinke
Last Edited
Apr 20 2015, 17:08

Event Timeline

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