agendum / agendum-sdk
Agendum SDK for PHP applications
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/agendum/agendum-sdk
Requires
- php: ^8.0
Requires (Dev)
- pestphp/pest: ^2.0
- phpstan/phpstan: ^1.0
This package is not auto-updated.
Last update: 2025-11-12 14:35:46 UTC
README
A PHP SDK for interacting with the Agendum API. This library provides convenient wrapper classes for modules, users, and records management.
Installation
composer require agendum/agendum-sdk
Quick Start
<?php require_once 'vendor/autoload.php'; use Agendum\Sdk\Modules\ModuleManager; use Agendum\Sdk\Users\UserManager; use Agendum\Sdk\Records\RecordManager; // Create a new module ModuleManager::create('my-module'); // Create a user UserManager::create([ 'name' => 'John Doe', 'email' => 'john@example.com' ]); // Create a record RecordManager::create([ 'title' => 'My Document', 'type' => 'document', 'content' => 'Document content' ]);
Features
Module Management
- Create, update, delete modules
- Install, uninstall, enable, disable modules
- Search and list modules
- Check module status
User Management
- CRUD operations for users
- User search and filtering
- Account activation/deactivation
- Email-based user lookup
Record Management
- Full CRUD operations
- Bulk operations (create, update, delete)
- Record archiving and restoration
- Record duplication
- Type and status-based filtering
Documentation
For detailed documentation and examples, see the docs/ directory:
API Reference
Modules
use Agendum\Sdk\Modules\ModuleManager; // Basic operations ModuleManager::create($moduleName, $moduleData); ModuleManager::update($moduleId, $moduleData); ModuleManager::delete($moduleId); ModuleManager::get($moduleId); ModuleManager::list($options); ModuleManager::search($query, $options); // Module lifecycle ModuleManager::install($moduleName, $config); ModuleManager::uninstall($moduleId, $options); ModuleManager::enable($moduleId); ModuleManager::disable($moduleId); // Utilities ModuleManager::getByName($moduleName); ModuleManager::getEnabled(); ModuleManager::getDisabled(); ModuleManager::isInstalled($moduleName); ModuleManager::isEnabled($moduleName);
Users
use Agendum\Sdk\Users\UserManager; // Basic operations UserManager::create($userData); UserManager::update($userId, $userData); UserManager::delete($userId); UserManager::get($userId); UserManager::list($options); UserManager::search($query, $options); // User management UserManager::getByEmail($email); UserManager::activate($userId); UserManager::deactivate($userId);
Records
use Agendum\Sdk\Records\RecordManager; // Basic operations RecordManager::create($recordData); RecordManager::update($recordId, $recordData); RecordManager::delete($recordId); RecordManager::get($recordId); RecordManager::list($options); RecordManager::search($query, $options); // Bulk operations RecordManager::bulkCreate($records, $options); RecordManager::bulkUpdate($updates, $options); RecordManager::bulkDelete($recordIds, $options); // Advanced operations RecordManager::getByType($type, $options); RecordManager::getByStatus($status, $options); RecordManager::archive($recordId); RecordManager::restore($recordId); RecordManager::duplicate($recordId, $overrides);
Testing
This project uses PestPHP for testing:
# Run all tests ./vendor/bin/pest # Run specific test suite ./vendor/bin/pest tests/Modules ./vendor/bin/pest tests/Users ./vendor/bin/pest tests/Records # Run with coverage ./vendor/bin/pest --coverage
Development
Requirements
- PHP 8.0 or higher
- Composer
Setup
- Clone the repository
- Install dependencies:
composer install - Run tests:
./vendor/bin/pest
Code Quality
- PHPStan for static analysis
- PSR-4 autoloading
- Comprehensive PHPDoc documentation
Contributing
- Fork the project
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License. See LICENSE for details.
Support
For issues and questions:
- Create an issue on GitHub
- Check the documentation
- Review the CLAUDE.md file for development details