Get users
https://cybozudev.zendesk.com/hc/ja/articles/202363040#step2

@param array $ids
@param array $codes
@param integer $offset
@param integer $limit
@return array
343659
public function get(array $ids = [], array $codes = [], $offset = 0, $limit = self::MAX_GET_USERS): array
    {
        $options = ['json' => compact('ids', 'codes')];
        $options['json']['size'] = $limit;
        $options['json']['offset'] = $offset;

        /** @var JsonStream $stream */
        $stream = $this->client
            ->get(UserApi::generateUrl('users.json'), $options)
            ->getBody();

        return $stream->jsonSerialize()['users'];
    }
402053
public function findById(array $ids)
    {
        $ids = $this->idsToMongo($ids);

        $documents = array();
        $remaining = array();
        foreach ($ids as $id) {
            if ($this->identityMap->has($id)) {
                $documents[(string) $id] = $this->identityMap->get($id);
            } else {
                $remaining[] = $id;
            }
        }

        if (count($documents) == count($ids)) {
            return $documents;
        }

        return array_merge(
            $documents,
            $this->createQuery(array('_id' => array('$in' => $remaining)))->all()
        );
    }
112274
public function getObjectsWithCollections($limit, $offset)
    {
        $contentIdsQuery = $this->connection->createQueryBuilder();
        $contentIdsQuery
            ->select("DISTINCT contentobject_id AS id")
            ->from($this->connection->quoteIdentifier('ezinfocollection'));

        $statement = $contentIdsQuery->execute();

        $contents = [];
        foreach ($statement->fetchAll() as $content) {
            $contents[] = (int)$content['id'];
        }

        if (empty($contents)) {
            return [];
        }

        $query = $this->connection->createQueryBuilder();
        $query
            ->select(
                "eco.id AS content_id",
                "ecot.main_node_id"
            )
            ->from($this->connection->quoteIdentifier('ezcontentobject'), 'eco')
            ->leftJoin(
                'eco',
                $this->connection->quoteIdentifier('ezcontentobject_tree'),
                'ecot',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eco.id'),
                    $this->connection->quoteIdentifier('ecot.contentobject_id')
                )
            )
            ->innerJoin(
                'eco',
                $this->connection->quoteIdentifier('ezcontentclass'),
                'ecc',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eco.contentclass_id'),
                    $this->connection->quoteIdentifier('ecc.id')
                )
            )
            ->where(
                $query->expr()->eq('ecc.version', 0)
            )
            ->andWhere($query->expr()->in('eco.id', $contents))
            ->groupBy([
                $this->connection->quoteIdentifier('ecot.main_node_id'),
                $this->connection->quoteIdentifier('content_id'),
            ])
            ->setFirstResult($offset)
            ->setMaxResults($limit);

        $statement = $query->execute();

        return $statement->fetchAll(PDO::FETCH_ASSOC);
    }
815472
public function getAllSentOrders($storeIds, $limit)
    {
        $collection = $this->addFieldToFilter('email_imported', 1)
            ->addFieldToFilter('store_id', ['in' => $storeIds]);

        $collection->getSelect()->limit($limit);

        return $collection->load();
    }
8271
public function getAllFriendships($limit = null, $offset = null): array
    {
        return $this->findFriendshipsByStatus(null, $limit, $offset);
    }
401490
public function getByIds(array $ids)
    {
        if (empty($ids)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'list_list',
            'ids' => implode(',', $ids)
        );

        $response = $this->request($parameters);

        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            'array<integer, ' . \FondOfPHP\ActiveCampaign\DataTransferObject\MailingList::class . '>',
            'json'
        );
    }
922873
public function getResult($limit = 0, $offset = 0)
    {
        if ($limit > 0 && false === $this->limitOffset($limit, $offset)) {
            return [];
        }

        $stmt = $this->queryBuilder->execute();
        $this->result = $stmt->fetchAll();

        return $this->result;
    }
815753
public function findActionsForIds(array $ids)
    {
        if (empty($ids)) {
            return array();
        }

        $datas = $this->client->hmget($this->getActionKey(), $ids);

        return array_values(
            array_map(
                function ($v) {
                    return unserialize($v);
                },
                $datas
            )
        );
    }
451322
public function getMany(array $ids) {
		$event  = $this->getProfiler()->startRead('Get (' . count($ids) . '): ' . implode(', ', $ids));
		$result = $this->getBackend()->getMany($ids);
		
		if (empty($result)) {
			$event->stopNotice();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
492560
public function getProjects($limit = 100, $offset = 0)
    {
        /** @var ProjectFbApi $response */
        $response = $this->call(new Request('project.get', array(), $limit, $offset), 'DVelopment\FastBill\Model\ProjectFbApi');

        return $response->getResponse()->getProjects();
    }
52293
public function get_from_ids(array $ids) {
        $alias = $this->get_table_alias();
        list($insql, $params) = $this->get_db()->get_in_or_equal($ids);
        $wheresql = $alias . '.id ' . $insql;
        $sql = $this->generate_get_records_sql($wheresql);
        $records = $this->get_db()->get_records_sql($sql, $params);

        return $this->transform_db_records_to_entities($records);
    }
105465
private function slice(array $rows, ?int $limit, ?int $offset) : array
    {
        if ($limit === null) {
            $limit = count($rows);
        }

        if ($offset === null) {
            $offset = 0;
        }

        return array_slice($rows, $offset, $limit);
    }
1026454
public function getBlockedFriendships($limit = null, $offset = 0): array
    {
        return $this->findFriendshipsByStatus(Status::BLOCKED, $limit, $offset);
    }
1319842
public function loadAllLocations(int $offset = 0, int $limit = 25): array
    {
        return $this->service->loadAllLocations($offset, $limit);
    }
36047
public function getUserFollows($id = 'self', $limit = 0)
    {
        $params = array();

        if ($limit > 0) {
            $params['count'] = $limit;
        }

        return $this->_makeCall('users/' . $id . '/follows', true, $params);
    }
330066
public function members(int $limit = 100) : array
    {
        $returnMembers = [];

        $members = $this->get(sprintf(self::COMMUNITY_ENDPOINT . 'communities/%s/members', $this->id()), [
            'limit' => $limit
        ]);

        if ($members->size === 0) return $returnMembers;

        foreach ($members->members as $member) {
            $returnMembers[] = new User($this->client, $member->onlineId);
        }

        return $returnMembers;
    }
1106826
public function getPosts($limit = false, $offset = false)
    {
        if (!$limit) {
            $limit = Option::get('posts_per_page');
        }
        return Post::getByAuthor($this->ID, $limit, $offset);
    }