PHP code example of snide / php-magnum-client

1. Go to this page and download the library: Download snide/php-magnum-client 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/ */

    

snide / php-magnum-client example snippets


    "    ...
        "snide/php-magnum-client": "dev-master"
        ...
    },




nide\Magnum\Client;
use Snide\Magnum\Model\User;
use Snide\Magnum\Model\Project;

$client = new Client();
$project = new Project();
$project->setApiToken('YourProjectAPIKey');
$project = $client->fetchProject($project); // Fetch project & builds
$project = $client->fetchProject($project, false); // Fetch project without builds




nide\Magnum\Client;
use Snide\Magnum\Model\User;
use Snide\Magnum\Model\Project;

$client = new Client();
$user = new User();
$user->setApiToken('YourProjectAPIKey');
$user = $client->fetchProject($user); // Fetch user profile