PHP code example of narcoticfresh / shotwell
1. Go to this page and download the library: Download narcoticfresh/shotwell 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/ */
narcoticfresh / shotwell example snippets
// make sure composer autoloader is there
ome/user/.local/share/shotwell/data/photo.db');
// get everything
$items = $shotwell->getAll();
// get only photos
$items = $shotwell->getAllPhotos();
// get only videos
$items = $shotwell->getAllVideos();
// get by a tag
$items = $shotwell->getItemsByTag('diving');
// get all tags
$tags = $shotwell->getAllTags();
// set tag on an object
$shotwell->setItemTags('my-object-id', ['tag1', 'tag2']);
// set item rating
$shotwell->setItemRating('my-object-id', 3);