angstrom / cyclos-api
Laravel package for interacting with Cyclos API
v1.0.0
2025-02-02 09:47 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-06-30 10:56:47 UTC
README
A Laravel package that provides a clean and intuitive way to interact with the Cyclos API.
Features
- Full Cyclos API support
- Laravel integration
- Type-safe methods
- Comprehensive test coverage
- Easy configuration
Installation
You can install the package via composer:
composer require angstrom/cyclos-api
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="Angstrom\CyclosApi\CyclosApiServiceProvider"
Add the following environment variables to your .env
file:
CYCLOS_API_URL=your-cyclos-api-url CYCLOS_API_KEY=your-api-key
Usage
Using the Facade
use Angstrom\CyclosApi\Facades\CyclosApi; // Authentication $response = CyclosApi::login([ 'username' => 'user', 'password' => 'password' ]); // User Management $users = CyclosApi::searchUsers([ 'keywords' => 'john', 'groups' => ['customers'] ]); // Account Management $balance = CyclosApi::getAccountStatus('account123'); $history = CyclosApi::getAccountHistory('account123', [ 'datePeriod' => ['begin' => '2023-01-01', 'end' => '2023-12-31'] ]); // Marketplace $ads = CyclosApi::searchAdvertisements([ 'keywords' => 'electronics', 'categories' => ['tech'] ]);
Using Dependency Injection
use Angstrom\CyclosApi\CyclosApi; class YourController extends Controller { public function __construct(private CyclosApi $api) { } public function getUsers() { return $this->api->searchUsers([ 'status' => 'active' ]); } }
Available Methods
The package includes comprehensive traits for different Cyclos functionalities:
- Authentication (login, logout, password management)
- User Management (search, create, update, delete users)
- Account Management (balances, history, transfers)
- Marketplace Management (advertisements, favorites)
- Payment Management
- Transaction Management
- Message Management
- And more...
Testing
composer test
Security
If you discover any security-related issues, please email security@angstrom.dev instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.