PHP code example of pisa / gizmo-api

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

    

pisa / gizmo-api example snippets



isa\GizmoAPI\Gizmo;

$gizmo = new Gizmo([
    'http' => [
        'base_uri' => 'http://url_to_gizmo_api_here:8080',
        'auth'     => ['username', 'password'],
    ],
]);

$host = $gizmo->hosts->get(1); // Gets the host model with id 1

$user = $gizmo->users->get(1); // Gets the user model with id 1