-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.php
More file actions
44 lines (35 loc) · 1.07 KB
/
example.php
File metadata and controls
44 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
//start the session
session_start();
$incPath = 'bdpPhpRestClient/core/';
//grab the core client
require_once($incPath . 'class.bdCoreRestClient.php');
//grab the gprops client
require_once($incPath . 'class.gpropsRestClient.php');
//run the class
$api = new gPropsRestClient();
//set the api key
$api->apiKey = '#### YOUR API KEY ####';
//set the shared secret
$api->sharedSecret = '#### YOUR SHARED SECRET ####';
//set the wsdl path
$api->apiPath = 'https://bdphq.com/restapi';
//set the firm id
$api->accId = '### YOUR ACCOUNT ID ###';
//force insecurity when running local and unable to authenticate against ssl
//$api->forceInsecure = true;
$api->fullLog = true;
//start the soap client
$api->startUp();
//Retrieve Specific Property Data
//Use a valid property ID on your account
$propertyData = $api->getProperty('1');
echo'Got property data:';
print_r($propertyData);
$allProperties = $api->getProperties();
//$allProperties = $api->getProperties('nres=999999');
var_dump($allProperties);
echo"<br/>";
echo count($api->apiErrors) .' Api Errors';
var_dump($api->apiErrors);
?>