PHP code example of antistatique / realforce-php-sdk
1. Go to this page and download the library: Download antistatique/realforce-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
antistatique / realforce-php-sdk example snippets
use \Antistatique\Realforce\RealforceClient;
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);
# Prepare the request.
$query = new Antistatique\Realforce\Request\PropertiesListRequest();
$query
->lang(['fr', 'en'])
->page(0)
->perPage(10)
;
# Fetch the list of properties.
$response = $rf->publicProperties()->list($query);
print_r($response);
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);
# Prepare the request.
$query = new Antistatique\Realforce\Request\I18nRequest();
$query
->lang(['fr', 'en'])
;
# Fetch the list of amenities' labels.
$response = $rf->publicLabels()->amenities($query);
print_r($response);
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);
# Prepare the request.
$query = new Antistatique\Realforce\Request\I18nRequest();
$query
->lang(['fr', 'en'])
;
# Fetch the list od categories' labels.
$response = $rf->publicLabels()->categories($query);
print_r($response);
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);
# Prepare the request.
$query = new Antistatique\Realforce\Request\LocationsRequest();
$query
->isQuarter(true)
->lang(['fr', 'en'])
;
# Fetch the list of locations' labels.
$response = $rf->publicLabels()->locations($query);
print_r($response);