2017 © Pedro Peláez
 

library lastfm-api

Last.fm webservice client for php

image

core23/lastfm-api

Last.fm webservice client for php

  • Sunday, July 15, 2018
  • by core23
  • Repository
  • 1 Watchers
  • 2 Stars
  • 594 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

Last.fm PHP library

Latest Stable Version Latest Unstable Version License, (*1)

Total Downloads Monthly Downloads Daily Downloads, (*2)

Continuous Integration Code Coverage Type Coverage, (*3)

This library provides a wrapper for using the Last.fm API inside PHP., (*4)

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:, (*5)

composer require nucleos/lastfm
# To define a default http client and message factory
composer require symfony/http-client nyholm/psr7

Usage

// Create connection
use Nucleos\LastFm\Service\AuthService;
use Nucleos\LastFm\Service\ChartService;
use Nucleos\LastFm\Service\PsrClientConnection;

$connection = new PsrClientConnection($httpClient, $requestFactory);

// Auth user to get a token
// http://www.last.fm/api/auth/?api_key=API_KEY

// Create a session (with generated token)
$token = 'API token';
$authApi = new AuthService($connection);
$session = $authApi->createSession($token);

$chartApi = new ChartService($connection);
$tags = $chartApi->getTopTags(10);

Limitations

Last.fm removed some of their favorite APIs due their relaunch in March 2016. Some of the following removed methods are available via a webcrawler. Please have a look at the Nucleos\LastFm\Crawler package., (*6)

    Album
        album.getBuylinks
        album.getShouts
        album.share
    Artist
        artist.getEvents
        artist.getPastEvents
        artist.getPodcast
        artist.getShouts
        artist.getTopFans
        artist.share
        artist.shout
    Chart
        chart.getHypedArtists
        chart.getHypedTracks
        chart.getLovedTracks
    Event
        event.attend
        event.getAttendees
        event.getInfo
        event.getShouts
        event.share
        event.shout
    Geo
        geo.getEvents
        geo.getMetroArtistChart
        geo.getMetroHypeArtistChart
        geo.getMetroHypeTrackChart
        geo.getMetroTrackChart
        geo.getMetroUniqueArtistChart
        geo.getMetroUniqueTrackChart
        geo.getMetroWeeklyChartlist
        geo.getMetros
    Group
        group.getHype
        group.getMembers
        group.getWeeklyAlbumChart
        group.getWeeklyArtistChart
        group.getWeeklyChartList
        group.getWeeklyTrackChart
    Library
        library.addAlbum
        library.addArtist
        library.addTrack
        library.getAlbums
        library.getTracks
        library.removeAlbum
        library.removeArtist
        library.removeScrobble
        library.removeTrack
    Playlist
        playlist.addTrack
        playlist.create
    Radio
        radio.getPlaylist
        radio.search
        radio.tune
    Tag
        tag.getWeeklyArtistChart
        tag.search
    Tasteometer
        tasteometer.compare
        tasteometer.compareGroup
    Track
        track.ban
        track.getBuylinks
        track.getFingerprintMetadata
        track.getShouts
        track.getTopFans
        track.share
        track.unban
    User
        user.getArtistTracks
        user.getBannedTracks
        user.getEvents
        user.getNeighbours
        user.getNewReleases
        user.getPastEvents
        user.getPlaylists
        user.getRecentStations
        user.getRecommendedArtists
        user.getRecommendedEvents
        user.getShouts
        user.shout
        user.signUp
        user.terms
    Venue
        venue.getEvents
        venue.getPastEvents
        venue.search

License

This library is under the MIT license., (*7)

The Versions

15/07 2018
07/01 2018

0.4.0

0.4.0.0 https://core23.de

Last.fm webservice client for php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

api crawler last.fm webservice client