lucie/ballchasing-sdk
Composer 安装命令:
composer require lucie/ballchasing-sdk
包简介
Laravel package for Ballchasing.com API integration
README 文档
README
A Laravel package for integrating with the Ballchasing.com API, providing easy access to Rocket League replay data and analysis.
Features
- ✅ Replay Management: List, retrieve, upload, update, and delete replays
- ✅ Group Management: Create and manage replay groups
- ✅ Maps Information: Get available Rocket League maps
- ✅ Laravel Integration: Service provider with dependency injection
- ✅ Type Safety: Full PHP 8.2+ type declarations and DTOs
- ✅ Testing: Comprehensive test suite with mocked HTTP responses
- ✅ Error Handling: Custom exceptions with detailed error messages
- ✅ Retry Logic: Automatic retry for server errors
Installation
Install the package via Composer:
composer require lucie/ballchasing-laravel
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=ballchasing-config
Add your Ballchasing API key to your .env file:
BALLCHASING_API_KEY=your_api_key_here
Testing
Unit Tests (Mocked)
Run unit tests with mocked HTTP responses (no API key required):
composer test # or specifically composer test-unit
Integration Tests (Real API)
For integration testing with the real Ballchasing API:
-
Copy the example environment file:
cp .env.testing .env
-
Add your real API key to
.env:BALLCHASING_API_KEY=your_real_api_key_here
-
Run integration tests:
composer test-integration
Coverage Reports
Generate test coverage reports:
composer test-coverage
Development
Code Style
Format code using Pint:
composer format
Static Analysis
Run PHPStan analysis:
composer analyse
Versioning
This package follows Semantic Versioning. To create a new release:
- Update the version in
composer.json - Run all checks:
composer release - Commit the changes
- Create a new git tag:
git tag v1.0.0 - Push with tags:
git push --tags
Note: Since this is a beta package (0.x.x), the API may change between minor versions until we reach 1.0.0.
Documentation
📖 Full documentation is available in multiple languages:
- English: docs/en/usage.md
- Français: docs/fr/usage.md
Requirements
- PHP 8.2+
- Laravel 10.0+
- Guzzle HTTP 7.0+
License
The MIT License (MIT). Please see License File for more information.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you discover any security vulnerabilities, please send an e-mail to lucie@parapluie.link.
Credits
- Lucie
- Ballchasing.com for providing the API
Built for the Rocket League community 🚗⚽
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-27