sioweb / admiralcloud-client
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sioweb/admiralcloud-client
Requires
- php: ^7.0||^8.0
- guzzlehttp/guzzle: ^7.2
- symfony/dotenv: ^5
This package is auto-updated.
Last update: 2025-10-09 20:31:33 UTC
README
PHP Client for Admiralcloud
This is a simple example wrapper to use the admiralcloud search API.
Installation
composer req sioweb/admiralcloud-client
Test
.env
Create a .env file in the root of your project and add your API data:
AC_API_URL="https://api.admiralcloud.com"
AC_API_KEY="......................"
AC_SECRET_KEY="........-....-....-....-............"
AC_API_VERSION="v5"
public/index.php
Create a file in a subdirectory of your project: public/index.php. Its not necessary how you name the public dir, it also could be named web, or what ever you prever. The index.php file just should not be in the same level as vendor.
To test the requests, just remove the comments (// ) from behind a die()-block.
<?php use Sioweb\AdmiralcloudClient\Api\Request; include '../vendor/autoload.php'; $Request = new Request(); // // Get Media by mediaContainerId & mediaId // die(json_encode($Request->media([ // 'mediaContainerId' => 9999999, // 'mediaId' => 9999999 // ]))); // // Get Media by mediaContainerId only // die(json_encode($Request->media([ // 'mediaContainerId' => 9999999 // ]))); // Get Mediacontainer by mediaContainerId (not id!) // die(json_encode($Request->mediacontainer([ // 'mediaContainerId' => 9999999 // ]))); // // Get 250 Media IDs from Mediacontainer // die(json_encode($Request->mediacontainerBatch())); // // Get 10 Media IDs from Mediacontainer // die(json_encode($Request->mediacontainerBatch([ // 'limit' => 10 // ]))); // // how to search by meta fields // die(json_encode($Request->search([ // 'searchTerm' => 'lorem ipsum', // 'field' => 'meta_yourOwnMetaDataField' // ])));
Unable to read the "/.../.env" environment file
You can set a custom path to your .env file:
$Request = new Request('/var/www/html/yourproject/');