forked from frozensheep/rightmoveADF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getBrandPhoneLeads.php
35 lines (26 loc) · 875 Bytes
/
getBrandPhoneLeads.php
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
<?php
/**
* Get Brand Phone Leads Example.
*
* @package Frozensheep\RightmoveADF
* @author Jacob Wyke <jacob@frozensheep.com>
* @license MIT
*
*/
require_once(__DIR__.'/../vendor/autoload.php');
use Frozensheep\RightmoveADF\RightmoveADF;
//include the config file
require_once('config.php');
//create the RightmoveADF object
$objRightmoveADF = new RightmoveADF(CERT_FILE, CERT_PASS, RightmoveADF::TEST);
//create a request
$objRequest = $objRightmoveADF->createRequest(RightmoveADF::GetBrandPhoneLeads);
//set the details for the request
$objRequest->network->network_id = NETWORK_ID;
$objRequest->brand->brand_id = BRAND_ID;
$objRequest->export_period->start_date_time = '20 minutes ago';
$objRequest->export_period->end_date_time = 'now';
echo json_encode($objRequest);
//send the request
$objResponse = $objRightmoveADF->send($objRequest);
print_r($objResponse);