PHP code example of survos / loc-bundle
1. Go to this page and download the library: Download survos/loc-bundle 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/ */
survos / loc-bundle example snippets
use Survos\LocBundle\Client\LocClientInterface;
final readonly class ImportService
{
public function __construct(private LocClientInterface $locClient) {}
public function import(): void
{
foreach ($this->locClient->iterateCollection('voices-remembering-slavery') as $result) {
$item = $this->locClient->getItemDto($result->id);
foreach ($item->resources as $resource) {
// raw LOC resource array — walk/extract per-file URLs as needed (Phase 2)
}
}
}
}