PHP code example of fw4 / skarabee-weblink

1. Go to this page and download the library: Download fw4/skarabee-weblink 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/ */

    

fw4 / skarabee-weblink example snippets


use Skarabee\Weblink\Client;

$client = new Client('username', 'password');

$publications = $client->getPublicationSummaries();

use Skarabee\Weblink\Enums\PropertyType;

$modified_since = new DateTime('2021-01-01 12:00:00');
$property_types = [
    PropertyType::Transaction,
    PropertyType::Project,
];
$exclude_shared = true;

$publications = $client->getPublicationSummaries($modified_since, $property_types, $exclude_shared);

$publication = $client->getPublication($publication_id);
$bedrooms = $publication->property->numberOfBedrooms;

$projects = $client->getProjectSummaries();

$modified_since = new DateTime('2021-01-01 12:00:00');
$exclude_shared = true;

$projects = $client->getProjectSummaries($modified_since, $exclude_shared);

$info = $client->getContactInfo();

$users = $client->getLogins();

$client->insertContactMes([
    'FirstName' => 'string',
    'LastName'  => 'string',
    'Comments'  => 'string',
    'Email'     => 'string',
]);

$client->insertContactMes([$contact1, $contact2]);

use Skarabee\Weblink\Enums\FeedbackStatus;

$client->feedback([
    'PublicationID' => $publication_id,
    'Status'        => FeedbackStatus::Available,
    'URL'           => $property_url,
]);

$client->feedback([$feedback1, $feedback2]);