PHP code example of yusu / unioncloud-api-php

1. Go to this page and download the library: Download yusu/unioncloud-api-php 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/ */

    

yusu / unioncloud-api-php example snippets


use UnionCloud\Api;
$api = new Api();
$api->setHost("www.yusu.org");

$api = new Api(["

$api->setOptions(["

$api->authenticate($user_email, $user_password, $app_id, $app_password);

$api->setAuthToken($auth_token, $expiry_timestamp);

// users
$users = $api->users();
$user = $api->user_search(["id" => "lm638"]);

// events
$events = $api->events();
$event = $api->event_get($event_id);
$api->event_update($event_id, ["event_name" => "New Event Name"]);

// groups
$groups = $api->groups();
bash
composer