定制 marque/cennad 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marque/cennad

最新稳定版本:v2.0.0

Composer 安装命令:

composer require marque/cennad

包简介

REST API for Marque tracker platform

README 文档

README

REST API for the Marque tracker platform. Provides JSON endpoints for torrent management.

Installation

Requires marque/trove.

composer require marque/cennad

Publish the config:

php artisan vendor:publish --tag=cennad-config

Endpoints

All endpoints require authentication and return JSON.

Method Endpoint Description
GET /api/torrents List torrents (paginated, searchable)
GET /api/torrents/{id} Get torrent details
PUT /api/torrents/{id} Update torrent (name, description)
DELETE /api/torrents/{id} Delete torrent

List Torrents

GET /api/torrents?search=ubuntu&page=2

Returns paginated results with standard Laravel pagination metadata.

Get Torrent

GET /api/torrents/1

Response:

{
    "data": {
        "id": 1,
        "info_hash": "a1b2c3...",
        "name": "Example Torrent",
        "description": "Description text",
        "size": 734003200,
        "size_formatted": "700 MB",
        "file_count": 12,
        "has_torrent_file": true,
        "created_at": "2026-01-15T10:30:00Z",
        "updated_at": "2026-01-15T10:30:00Z",
        "user": {
            "id": 1,
            "name": "uploader"
        },
        "links": {
            "self": "https://example.com/api/torrents/1",
            "download": "https://example.com/torrents/1/download"
        }
    }
}

Update Torrent

PUT /api/torrents/1
Content-Type: application/json

{
    "name": "Updated Name",
    "description": "Updated description"
}

Requires ownership or Moderator+ role.

Delete Torrent

DELETE /api/torrents/1

Requires Moderator+ role. Returns 204 No Content.

Authorization

Cennad uses Trove's TorrentPolicy for access control:

Action Who Can
List / View Any authenticated user
Update Torrent owner or Moderator+
Delete Moderator+

Configuration

Published to config/cennad.php:

Key Default Description
prefix api URL prefix for all endpoints
middleware ['api', 'auth:api'] Middleware stack
route_names.prefix cennad Route name prefix
route_names.download torrents.download Download route name (for link generation)
rate_limit 60 Requests per minute

Authentication

Cennad uses Laravel's standard auth:api guard. Configure authentication in your application - Sanctum, Passport, or any guard that satisfies auth:api will work.

Requirements

License

MIT

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固