PHP code example of statikbe / udb-helpers

1. Go to this page and download the library: Download statikbe/udb-helpers 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/ */

    

statikbe / udb-helpers example snippets


composer 

use statikbe\udb\EntryAPI;
use statikbe\udb\Environments;

$udb = new EntryAPI(
    getenv("UDB_KEY"), // API key
    '/var/www/path/to/your/jwt/token.json', // Path to where you're JWT token will be stored
    Environments::PROD // The package 

$url = $udb->api->generalJwtUrl();
echo $url; 
exit;

$udb->searchPlaces([]);

$udb->getPlace($placeId);

$udb->createPlace($data);

$udb->searchOrganizers([]);

$udb->getOrganizer($organizerId);

$udb->createOrganizer($data);

$udb->createEvent($data);

$udb->updateEvent($eventId, $data);

$udb->updateWorkflowStatus($eventId, $data);

$udb->updatePlaceWorkflowStatus($eventId, $data);