rchehd/reqres_users
最新稳定版本:v0.0.3
Composer 安装命令:
composer require rchehd/reqres_users
包简介
Provides a block listing users from the Reqres dummy API.
README 文档
README
Drupal 10/11 module that fetches users from the Reqres dummy REST API and displays them in a paginated, AJAX-powered block.
Features
- Block showing user email, forename, and surname in a table
- AJAX pagination — page changes replace only the block, no full reload
- Configurable items per page, cache TTL, and column labels
- API response cached with hash-based invalidation (cache is busted only when data changes)
- API key stored in Drupal State — never written to
config/syncor version control - Filter extension point via a Symfony event
- Multiple block instances on the same page are fully supported
- PHPUnit unit tests runnable outside a full Drupal installation
Requirements
- PHP 8.1+
- Drupal 10 or 11
drupal:blockmodule (core)- A Reqres API key (obtain from reqres.in)
Installation
Via Composer (recommended)
composer require rchehd/reqres_users drush en reqres_users
Setup Reqres API key
- Visit reqres.in and create an account.
- Then, visit your profile page and copy the API key.
- Paste it here - /admin/config/services/reqres-users
- Clear the cache if you have changed the API key.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-02-27