mirror of
https://github.com/koel/koel
synced 2024-12-22 18:43:21 +00:00
21 lines
473 B
PHP
21 lines
473 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Models\Song;
|
|
|
|
class ScrobbleController extends Controller
|
|
{
|
|
/**
|
|
* Create a Last.fm scrobble entry for a song.
|
|
*
|
|
* @param Song $song
|
|
* @param string $timestamp The UNIX timestamp when the song started playing.
|
|
*
|
|
* @return \Illuminate\Http\JsonResponse
|
|
*/
|
|
public function store(Song $song, $timestamp)
|
|
{
|
|
return response()->json($song->scrobble($timestamp));
|
|
}
|
|
}
|