App\services\Lastfm::scrobble PHP Method

scrobble() public method

Scrobble a song.
public scrobble ( string $artist, string $track, string | integer $timestamp, string $album, string $sk ) : boolean
$artist string The artist name
$track string The track name
$timestamp string | integer The UNIX timestamp
$album string The album name
$sk string The session key
return boolean
    public function scrobble($artist, $track, $timestamp, $album, $sk)
    {
        $params = compact('artist', 'track', 'timestamp', 'sk');
        if ($album) {
            $params['album'] = $album;
        }
        $params['method'] = 'track.scrobble';
        try {
            return (bool) $this->post('/', $this->buildAuthCallParams($params), false);
        } catch (Exception $e) {
            Log::error($e);
            return false;
        }
    }