PHP code example of opdavies / drupalorg-api-php
1. Go to this page and download the library: Download opdavies/drupalorg-api-php 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/ */
opdavies / drupalorg-api-php example snippets
$nids = [107871, 2945793, 1306976];
$query = new NodeQuery();
$query->setOptions(['query' => ['type' => Node::TYPE_MODULE, 'nid' => $nids]]);
$nodes = $query->execute()->getContents()->all();
$uids = [1, 381388];
$query = new UserQuery();
$query->setOptions(['query' => ['uid' => $uids]]);
$users = $query->execute()->getContents()->all();