1. Go to this page and download the library: Download aternos/blob-build-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/ */
aternos / blob-build-api example snippets
use Aternos\BlobBuild\Client\BlobBuildAPIClient;
// create an API client. This is the main entry point for the API
$client = new BlobBuildAPIClient();
// set a user agent (recommended)
$client->setUserAgent('aternos/php-blob-build-api-example');
$result = $client->getProjectBuilds("SoundMuffler");
foreach ($result as $channel => $builds) {
echo "Channel: " . $channel . PHP_EOL;
foreach ($builds as $build) {
echo " - Build " . $build->getData()->getBuildId() . PHP_EOL;
}
}
// or with the project wrapper
$project = $client->getProject("SoundMuffler");
$result = $project->getBuilds();
$build = $client->getLatestProjectBuildInChannel("SoundMuffler", "Dev");
echo "Build " . $build->getData()->getBuildId() . PHP_EOL;
// Or with the project wrapper
$project = $client->getProject("SoundMuffler");
// Either pick a channel
$build = $project->getLatestBuildInChannel("Dev");
// Or use the default channel
$build = $project->getLatestBuildInDefaultChannel()
$build = $client->getProjectBuild("SoundMuffler", "Dev", 1);
echo "Build " . $build->getData()->getBuildId() . PHP_EOL;
// Or with the project wrapper
$project = $client->getProject("SoundMuffler");
$build = $project->getBuild("Dev", 1);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.