Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lastfm Client Laravel Package

calliostro/lastfm-client

Lightweight Last.fm API client for PHP 8.1+ with clean, modern methods for artists, albums, tracks, search, and charts. Uses Guzzle and supports API-key access for all calls plus session authentication for write actions like scrobbling and loving tracks.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Music Discovery & Recommendation Features: Enables integration of artist/track metadata, charts, and user listening history for apps like Spotify alternatives, music blogs, or recommendation engines.
  • User Personalization: Powers features like "Top Tracks," "Loved Tracks," or "Recently Played" sections by leveraging Last.fm’s user-specific APIs.
  • Social Features: Supports friend lists, shared playlists, or collaborative music discovery via Last.fm’s user-to-user connections.
  • Scrobbling & Analytics: Critical for music apps needing to track user activity (e.g., "last played," "listening history") for analytics or social sharing.
  • Build vs. Buy: Buy for rapid integration of Last.fm’s full API (60+ endpoints) without reinventing HTTP clients/auth flows. Build only if needing custom API transformations or non-standard use cases (e.g., offline caching).
  • Roadmap Priorities:
    • Phase 1: Quick wins like artist/track search, charts, and read-only data (low auth friction).
    • Phase 2: User-specific features (scrobbling, libraries) requiring session auth.
    • Phase 3: Advanced social features (friends, tags) or mobile auth for native apps.

When to Consider This Package

Adopt if:

  • Your PHP 8.1+ app needs fast, lightweight access to Last.fm’s full API (60+ endpoints) with minimal boilerplate.
  • You prioritize developer comfort: Clean method names (e.g., getArtistInfo()), named parameters, and IDE support (PHPStan, PSR-12).
  • You require authentication flexibility: API keys for read-only, sessions for scrobbling, or mobile auth for native apps.
  • Your use case aligns with Last.fm’s strengths: music metadata, user listening history, or social features (not streaming or high-frequency writes).
  • You want future-proofing: PHP 8.1–8.5 compatibility, Guzzle 6/7 support, and active maintenance (recent 2025 release).

Look elsewhere if:

  • You need offline-first sync: Last.fm’s API is HTTP-only; consider caching layers (e.g., Redis) or a hybrid solution.
  • Your app requires custom API transformations: The package maps Last.fm endpoints 1:1; heavy post-processing may need middleware.
  • You’re on PHP <8.1 or need non-PHP backends (e.g., Node.js/Python).
  • You need high-volume scrobbling: Last.fm’s rate limits (e.g., 1 track/second) may require queueing; this package doesn’t abstract that.
  • You’re building a Last.fm competitor: The package is a client, not a service layer.

How to Pitch It (Stakeholders)

For Executives: "This package lets us integrate Last.fm’s music data and user activity in weeks, not months*. It’s a lightweight, battle-tested client that handles authentication, rate limits, and all 60+ Last.fm API endpoints—so our team can focus on building features like personalized recommendations or social music discovery, not HTTP clients. With support for scrobbling, charts, and user libraries, we can add depth to our music app without reinventing the wheel. It’s MIT-licensed, PHP 8.1+, and backed by modern tooling (Guzzle, PHPStan), so it’s low-risk and future-proof."*

For Engineers: *"This is a minimalist, opinionated Last.fm client for PHP 8.1+ that trades flexibility for simplicity. Key wins:

  • Zero bloat: Two classes, Guzzle-based, no custom transport.
  • Clean API: Methods like getArtistInfo() or scrobbleTrack() with named parameters (PHP 8.0+).
  • Full coverage: All Last.fm endpoints (tracks, artists, users, charts, etc.) with proper auth flows (API key, session, mobile).
  • Modern tooling: PHPStan Level 8, 100% test coverage, PSR-12, and rate-limit-ready middleware.
  • Easy auth: Dedicated AuthHelper for OAuth flows and session management.

Tradeoffs:

  • Not a service layer (you’ll need to handle caching/retries yourself).
  • Breaking changes in v2.0 (method renames), but the API is now stable.

Recommendation: Use this for any Last.fm integration in PHP 8.1+. For custom needs (e.g., offline sync), wrap it with your own layer."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium