定制 alienlebarge/lastfm-sync 二次开发

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

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

alienlebarge/lastfm-sync

最新稳定版本:0.0.6

Composer 安装命令:

composer require alienlebarge/lastfm-sync

包简介

Kirby plugin to synchronize loved tracks from Last.fm and automatically create jam pages

README 文档

README

Kirby plugin to synchronize loved tracks from Last.fm and automatically create jam pages.

Installation

  1. Place the lastfm-sync folder in site/plugins/
  2. Configure options in site/config/config.php

Configuration

return [
    'alienlebarge.lastfm-sync' => [
        'apiKey' => 'your-lastfm-api-key',
        'user' => 'your-lastfm-username',
        'webhookLimit' => 20,
        'webhookSecret' => 'your-webhook-secret',
        'contentDir' => 'jams'
    ]
];

Options

  • apiKey: Last.fm API key
  • user: Last.fm username
  • webhookLimit: Number of tracks to retrieve (default: 20)
  • webhookSecret: Security token for webhook
  • contentDir: Content directory (default: 'jams')

Usage

Webhook

Synchronization via POST webhook:

curl -X POST "https://your-site.com/lastfm-sync/cron/sync-jams" -d "secret=your-webhook-secret"

Or call the URL directly with GET parameter:

curl -X POST "https://your-site.com/lastfm-sync/cron/sync-jams?secret=your-webhook-secret"

Page Methods

// In a template or controller
$result = $page->syncJams(50); // Sync max 50 tracks

Site Methods

// Access to service
$syncService = site()->lastfmSync();
$result = $syncService->sync(20);

Response

{
    "success": true,
    "message": "Jams synchronization completed via Last.fm plugin",
    "data": {
        "total": 20,
        "imported": 2,
        "skipped": 18,
        "errors": 0
    }
}

Security

The webhook uses a secret token for authentication. Configure webhookSecret in your options.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固