The cl-lastfm Reference Manual

This is the cl-lastfm Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:23:26 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-lastfm

Common Lisp wrapper for the Last.fm web service.

Maintainer

Nicolas Lamirault <>

Author

Nicolas Lamirault <>

License

MIT License

Version

0.1

Dependencies
  • drakma (system).
  • cxml-stp (system).
  • url-rewrite (system).
  • trivial-utf-8 (system).
Source

cl-lastfm.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-lastfm/src

Source

cl-lastfm.asd.

Parent Component

cl-lastfm (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-lastfm/cl-lastfm.asd

Source

cl-lastfm.asd.

Parent Component

cl-lastfm (system).

ASDF Systems

cl-lastfm.


4.1.2 cl-lastfm/src/package.lisp

Source

cl-lastfm.asd.

Parent Component

src (module).

Packages

cl-lastfm.


4.1.3 cl-lastfm/src/conditions.lisp

Dependency

package.lisp (file).

Source

cl-lastfm.asd.

Parent Component

src (module).

Public Interface

4.1.4 cl-lastfm/src/specials.lisp

Dependency

package.lisp (file).

Source

cl-lastfm.asd.

Parent Component

src (module).

Public Interface

*debug* (special variable).

Internals

4.1.5 cl-lastfm/src/tools.lisp

Dependencies
Source

cl-lastfm.asd.

Parent Component

src (module).

Internals

4.1.6 cl-lastfm/src/lastfm.lisp

Dependency

tools.lisp (file).

Source

cl-lastfm.asd.

Parent Component

src (module).

Public Interface
Internals

with-lastfm-stream (macro).


5 Packages

Packages are listed by definition order.


5.1 cl-lastfm

Common Lisp wrapper to Last.fm web service.
See more explanation from the @a[http://www.lastfm.fr/api]{website}. It has been tested under @a[http://www.sbcl.org]{SBCL}

@begin[Albums]{section}
@aboutfun{album-get-info}
@aboutfun{album-search}
@end{section}

@begin[Artists]{section}
@aboutfun{artist-get-events}
@aboutfun{artist-get-info}
@aboutfun{artist-get-similar}
@aboutfun{artist-get-top-albums}
@aboutfun{artist-get-top-fans}
@aboutfun{artist-get-top-tags}
@aboutfun{artist-get-top-tracks}
@aboutfun{artist-search}
@end{section}

@begin[Geo]{section}
@aboutfun{geo-get-events}
@aboutfun{geo-top-artists}
@aboutfun{geo-top-tracks}
@end{section}

@begin[User]{section}
@aboutfun{user-get-events}
@aboutfun{user-get-friends}
@aboutfun{user-get-loved-tracks}
@aboutfun{user-get-neighbours}
@aboutfun{user-get-top-albums}
@aboutfun{user-get-top-artists}
@aboutfun{user-get-top-tags}
@aboutfun{user-get-top-tracks}
@aboutfun{user-get-recent-tracks}
@aboutfun{user-get-shouts} @aboutfun{user-get-weekly-album-chart} @aboutfun{user-get-weekly-artist-chart} @aboutfun{user-get-weekly-chart-list} @aboutfun{user-get-weekly-track-chart}
@end{section}

@begin[Group]{section}
@aboutfun{group-get-members} @aboutfun{group-get-weekly-album-chart} @aboutfun{group-get-weekly-artist-chart} @aboutfun{group-get-weekly-chart-list} @aboutfun{group-get-weekly-track-chart}
@end{section}

@begin[Library]{section}
@aboutfun{library-get-albums}
@aboutfun{library-get-artists}
@aboutfun{library-get-tracks}
@end{section}

@begin[Tag]{section}
@aboutfun{tag-get-similar}
@aboutfun{tag-get-similar}
@aboutfun{tag-get-top-albums}
@aboutfun{tag-get-top-artists}
@aboutfun{tag-get-top-tracks}
@aboutfun{tag-get-top-tags} @aboutfun{tag-get-weekly-artist-chart} @aboutfun{tag-get-weekly-chart-list}
@aboutfun{tag-search}
@end{section}

@begin[Track]{section}
@aboutfun{track-get-info}
@aboutfun{track-get-similar}
@aboutfun{track-get-top-fans}
@aboutfun{track-get-top-tags}
@aboutfun{track-search}
@end{section}

@begin[Events]{section}
@aboutfun{event-get-info}
@aboutfun{event-get-shouts}
@end{section}

@begin[TasteOMeter]{section}
@aboutfun{tasteometer-compare}
@end{section}

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *debug*

If T activate some logs.

Package

cl-lastfm.

Source

specials.lisp.


6.1.2 Ordinary functions

Function: album-get-info (api-key &key artist-name album-name mbid lang)

@short{Get the metadata for an album on Last.fm using the album name or a musicbrainz id. See @fun{playlist-fetch} on how to get the album playlist. This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question}
@arg[album-name]{The album name in question}
@arg[mbid]{The musicbrainz id for the album}
@arg[lang]{The language to return the biography in, expressed as an ISO 639 alpha-2 code}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: album-search (api-key album-name &key limit page)

@short{Search for an album by name. Returns album matches sorted by relevance. This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[album-name]{The album name in question}
@arg[limit]{Limit the number of albums returned at one time. Default (maximum) is 30}
@arg[page]{Scan into the results by specifying a page number. Defaults to first page}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-events (api-key artist-name)

@short{Get a list of upcoming events for this artist. Easily integratable into calendars, using the ical standard.
This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-info (api-key &key artist-name mbid lang)

@short{Get the metadata for an artist on Last.fm. Includes biography. . This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question}
@arg[mbid]{The musicbrainz id for the artist}
@arg[lang]{The language to return the biography in, expressed as an ISO 639 alpha-2 code}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-similar (api-key artist-name &optional limit)

@short{Get all the artists similar to this artist. This service does not require authentication.} @arg[api-key]{A Last.fm API key} @arg[artist-name]{The artist name in question} @arg[limit]{Limit the number of similar artists returned} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-top-albums (api-key artist-name)

@short{Get the top albums for an artist on Last.fm, ordered by popularity. This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-top-fans (api-key artist-name)

@short{Get the top fans for an artist on Last.fm, based on listening data. This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-top-tags (api-key artist-name)

@short{Get the top tags for an artist on Last.fm, ordered by popularity. This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-get-top-tracks (api-key artist-name)

@short{Get the top tracks by an artist on Last.fm, ordered by popularity This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: artist-search (api-key artist-name &key limit page)

@short{Search for an artist by name. Returns artist matches sorted by relevance.
This service does not require authentication.}
@arg[api-key]{A Last.fm API key}
@arg[artist-name]{The artist name in question}
@arg[limit]{Limit the number of artists returned at one time. Default (maximum) is 30}
@arg[page]{Scan into the results by specifying a page number. Defaults to first page}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: event-get-info (api-key eventid)

@short{Get the metadata for an event on Last.fm. Includes attendance and lineup information}
@arg[api_key]{A Last.fm API key}
@arg[eventid]{The numeric Last.fm event id} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: event-get-shouts (api-key eventid)

@short{Get shouts for this event} @arg[api_key]{A Last.fm API key} @arg[eventid]{The numeric Last.fm event id} @see-condition{lastfm-request-error} @return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: geo-get-events (api-key &key location lat long page distance)

@short{Get all events in a specific location by country or city name.
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[location]{Specifies a location to retrieve events for (service returns nearby events by default}
@arg[lat]{Specifies a latitude value to retrieve events for (service returns nearby events by default}
@arg[long]{Specifies a longitude value to retrieve events for (service returns nearby events by default)}
@arg[page]{Display more results by pagination}
@arg[distance]{Find events within a specified distance} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: geo-top-artists (api-key country-name)

@short{Get the most popular artists on Last.fm by country.
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[country-name]{A country name, as defined by the ISO 3166-1 country names standard}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: geo-top-tracks (api-key country-name &optional location)

@short{Get the most popular tracks on Last.fm by country .
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[country-name]{A country name, as defined by the ISO 3166-1 country names standard}
@arg[location]{A metro name, to fetch the charts for (must be within the country specified)}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: group-get-members (api-key group)

@short{Get a list of members for this group. This service does not require authentication} @arg[api_key]{A Last.fm API key} @arg[group]{The group name to fetch the members of} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: group-get-weekly-album-chart (api-key group &key from to)

@short{Get an album chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group.} @arg[api_key]{A Last.fm API key}
@arg[group]{The last.fm group name to fetch the charts of}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: group-get-weekly-artist-chart (api-key group &key from to)

@short{Get an artist chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group} @arg[api_key]{A Last.fm API key}
@arg[group]{The last.fm group name to fetch the charts of}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: group-get-weekly-chart-list (api-key group)

@short{Get a list of available charts for this group, expressed as date ranges which can be sent to the chart services}
@arg[api_key]{A Last.fm API key}
@arg[group]{The last.fm group name to fetch the charts list for} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: group-get-weekly-track-chart (api-key group &key from to)

@short{Get a track chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group} @arg[api_key]{A Last.fm API key}
@arg[group]{The last.fm group name to fetch the charts of}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: library-get-albums (api-key user &key page limit)

@short{A paginated list of all the albums in a user’s library, with play counts and tag counts}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user whose library you want to fetch} @arg[limit]{Limit the amount of albums returned}
@arg[page]{The page number you wish to scan to} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: library-get-artists (api-key user &key page limit)

@short{A paginated list of all the artists in a user’s library, with play counts and tag counts}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user whose library you want to fetch}
@arg[limit]{Limit the amount of artists returned}
@arg[page]{The page number you wish to scan to} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: library-get-tracks (api-key user &key page limit)

@short{A paginated list of all the tracks in a user’s library, with play counts and tag counts. }
@arg[api_key]{A Last.fm API key}
@arg[user]{The user whose library you want to fetch} @arg[limit]{Limit the amount of tracks returned}
@arg[page]{The page number you wish to scan to} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-similar (api-key tag)

@short{Search for tags similar to this one. Returns tags ranked by similarity, based on listening data}
@arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-top-albums (api-key tag)

@short{Get the top albums tagged by this tag, ordered by tag count} @arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-top-artists (api-key tag)

@short{Get the top artists tagged by this tag, ordered by tag count} @arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-top-tags (api-key)

@short{Fetches the top global tags on Last.fm, sorted by popularity (number of times used).}
@arg[api_key]{A Last.fm API key} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-top-tracks (api-key tag)

@short{Get the top tracks tagged by this tag, ordered by tag count} @arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-weekly-artist-chart (api-key tag &key from to limit)

@short{Get an artist chart for a tag, for a given date range.
If no date range is supplied, it will return the most recent artist chart for this tag}
@arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on}
@arg[limit]{The number of chart items to return} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-get-weekly-chart-list (api-key tag)

@short{Get a list of available charts for this tag, expressed as date ranges which can be sent to the chart services}
@arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tag-search (api-key tag &key page limit)

@short{Search for a tag by name. Returns matches sorted by relevance} @arg[api_key]{A Last.fm API key}
@arg[tag]{The tag name in question}
@arg[limit]{Limit the number of tags returned at one time} @arg[page]{Scan into the results by specifying a page number} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: tasteometer-compare (api-key first-type second-type first-value second-value &key limit)

@short{Get a Tasteometer score from two inputs, along with a list of shared artists. If the input is a User or a Myspace URL, some additional information is returned.}
@arg[api_key]{A Last.fm API key}
@arg[fisrt-type]{Must be user, artists or myspace}
@arg[second-type]{Must be user, artists or myspace}
@arg[first-value]{Must be : Last.fm username or comma-separated artist names or a MySpace profile URL}
@arg[second-value]{Must be : Last.fm username or comma-separated artist names or a MySpace profile URL}
@arg[limit]{How many shared artists to display} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: track-get-info (api-key &key artist track mbid)

@short{Get the metadata for a track on Last.fm using the artist/track name or a musicbrainz id}
@arg[api-key]{A Last.fm API key}
@arg[artist]{The artist name in question}
@arg[track]{The track name in question}
@arg[mbid]{The musicbrainz id for the track} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: track-get-similar (api-key &key artist track mbid)

@short{Get the similar tracks for this track on Last.fm, based on listening data}
@arg[api-key]{A Last.fm API key}
@arg[artist]{The artist name in question}
@arg[track]{The track name in question}
@arg[mbid]{The musicbrainz id for the track} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: track-get-top-fans (api-key &key artist track mbid)

@short{Get the top fans for this track on Last.fm, based on listening data. Supply either track & artist name or musicbrainz id}
@arg[api-key]{A Last.fm API key}
@arg[artist]{The artist name in question}
@arg[track]{The track name in question}
@arg[mbid]{The musicbrainz id for the track} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: track-get-top-tags (api-key &key artist track mbid)

@short{Get the top tags for this track on Last.fm, ordered by tag count. Supply either track & artist name or mbid}
@arg[api-key]{A Last.fm API key}
@arg[artist]{The artist name in question}
@arg[track]{The track name in question}
@arg[mbid]{The musicbrainz id for the track} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: track-search (api-key track &key artist page limit)

@short{Search for a track by track name. Returns track matches sorted by relevance}
@arg[api-key]{A Last.fm API key}
@arg[track]{The track name in question}
@arg[limit]{The number of tracks returned at one time} @arg[page]{Scan into the results by specifying a page number} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-events (api-key user)

@short{Get a list of upcoming events that this user is attending. Easily integratable into calendars, using the ical standard. This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user to fetch the events for} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-friends (api-key user &key limit page recenttracks)

@short{Get a list of the user’s friends on Last.fm
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the friends of}
@arg[limit]{An integer used to limit the number of friends returned} @arg[page]{An integer representing the page number to fetch. Defaults to first page} @arg[recenttracks]{Whether or not to include information about friends’ recent listening in the response}
@see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-loved-tracks (api-key user &key limit page)

@short{Get the last 50 tracks loved by a user.
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user name to fetch the loved tracks for}
@arg[limit]{An integer representing the number of results to fetch per page. Defaults to 50} @arg[page]{An integer representing the page number to fetch. Defaults to first page} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-neighbours (api-key user &key limit)

@short{Get a list of a user’s neighbours on Last.fm
This service does not require authentication}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the neighbours of} @arg[limit]{An integer used to limit the number of neighbours returned} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-recent-tracks (api-key user &key limit)

@short{Get a list of the recent tracks listened to by this user. Indicates now playing track if the user is currently listening}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user name to fetch the recent tracks of}
@arg[limit]{An integer used to limit the number of tracks returned} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-shouts (api-key user)

@short{Get shouts for this user} @arg[api_key]{A Last.fm API key} @arg[user]{The user name to fetch shouts for} @see-condition{lastfm-request-error} @return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-top-albums (api-key user &key period limit page)

@short{Get the top albums listened to by a user. You can stipulate a time period. Sends the overall chart by default}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user name to fetch top albums for}
@arg[period]{overall | 3month | 6month | 12month - The time period over which to retrieve top albums for.}
@arg[limit]{The number of results to fetch per page. Defaults to 50} @arg[page]{The page number to fetch. Defaults to first page} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-top-artists (api-key user &key period limit page)

@short{Get the top artists listened to by a user. You can stipulate a time period. Sends the overall chart by default.}
@arg[api_key]{A Last.fm API key}
@arg[user]{The user name to fetch top artists for}
@arg[period]{overall | 3month | 6month | 12month - The time period over which to retrieve top albums for.}
@arg[limit]{The number of results to fetch per page. Defaults to 50} @arg[page]{The page number to fetch. Defaults to first page} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-top-tags (api-key user &key limit)

@short{Get the top tags used by this user} @arg[api_key]{A Last.fm API key} @arg[user]{The user name} @arg[limit]{The number of tags returned} @see-condition{lastfm-request-error} @return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-top-tracks (api-key user &key period limit page)

@short{Get the top tracks listened to by a user. You can stipulate a time period. Sends the overall chart by default. }
@arg[api_key]{A Last.fm API key}
@arg[user]{The user name to fetch top tracks for}
@arg[period]{overall | 3month | 6month | 12month - The time period over which to retrieve top tracks for.}
@arg[limit]{The number of results to fetch per page. Defaults to 50} @arg[page]{The page number to fetch. Defaults to first page} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-weekly-album-chart (api-key user &key from to)

@short{Get an album chart for a user profile, for a given date range.
If no date range is supplied, it will return the most recent album chart for this user.}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the charts of}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-weekly-artist-chart (api-key user &key from to)

@short{Get an artist chart for a user profile, for a given date range.
If no date range is supplied, it will return the most recent artist chart for this user.}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the charts of}
@arg[from]{The date at which the chart should start from}
@arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-weekly-chart-list (api-key user)

@short{Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the charts list for} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.

Function: user-get-weekly-track-chart (api-key user &key from to)

@short{Get a track chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent track chart for this user}
@arg[api_key]{A Last.fm API key}
@arg[user]{The last.fm username to fetch the charts of} @arg[from]{The date at which the chart should start from} @arg[to]{The date at which the chart should end on} @see-condition{lastfm-request-error}
@return{An XML stream}

Package

cl-lastfm.

Source

lastfm.lisp.


6.1.3 Generic functions

Generic Reader: error-message-of (condition)
Package

cl-lastfm.

Methods
Reader Method: error-message-of ((condition lastfm-error))
Source

conditions.lisp.

Target Slot

message.

Generic Reader: request-error-code-of (condition)
Package

cl-lastfm.

Methods
Reader Method: request-error-code-of ((condition lastfm-request-error))
Source

conditions.lisp.

Target Slot

code.


6.1.4 Conditions

Condition: lastfm-error

Main Lastfm error.

Package

cl-lastfm.

Source

conditions.lisp.

Direct superclasses

simple-error.

Direct subclasses
Direct methods

error-message-of.

Direct slots
Slot: message

Explanation message.

Initargs

:message

Readers

error-message-of.

Writers

This slot is read-only.

Condition: lastfm-protocol-error

Lastfm protocol error.

Package

cl-lastfm.

Source

conditions.lisp.

Direct superclasses

lastfm-error.

Condition: lastfm-request-error

Condition raised when an invalide request to the
Lastfm web services is performed.
Available codes are :
@pre{
* 2 : Invalid service -This service does not exist
* 3 : Invalid Method - No method with that name in this package
* 4 : Authentication Failed - You do not have permissions to access the service * 5 : Invalid format - This service doesn’t exist in that format
* 6 : Invalid parameters - Your request is missing a required parameter
* 7 : Invalid resource specified
* 9 : Invalid session key - Please re-authenticate
* 10 : Invalid API key - You must be granted a valid key by last.fm
* 11 : Service Offline - This service is temporarily offline. Try again later.
* 12 : Subscribers Only - This service is only available to paid last.fm subscribers }

Package

cl-lastfm.

Source

conditions.lisp.

Direct superclasses

lastfm-error.

Direct methods

request-error-code-of.

Direct slots
Slot: code

The error code.

Initargs

:code

Readers

request-error-code-of.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Constants

Constant: +album-get-info+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +album-search+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-events+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-info+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-similar+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-top-albums+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-top-fans+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-top-tags+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-get-top-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +artist-search+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +event-get-info+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +event-get-shouts+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +geo-get-events+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +geo-top-artists+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +geo-top-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +group-get-members+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +group-get-weekly-album-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +group-get-weekly-artist-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +group-get-weekly-chart-list+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +group-get-weekly-track-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +last-fm-ws+

The LastFM web service.

Package

cl-lastfm.

Source

specials.lisp.

Constant: +library-get-albums+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +library-get-artists+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +library-get-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-similar+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-top-albums+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-top-artists+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-top-tags+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-top-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-weekly-artist-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-get-weekly-chart-list+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tag-search+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +tasteometer-compare+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +track-get-info+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +track-get-similar+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +track-get-top-fans+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +track-get-top-tags+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +track-search+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-events
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-friends+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-loved-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-neighbours+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-recent-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-shouts+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-top-albums+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-top-artists+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-top-tags+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-top-tracks+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-weekly-album-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-weekly-artist-chart+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-weekly-chart-list+
Package

cl-lastfm.

Source

specials.lisp.

Constant: +user-get-weekly-track-chart+
Package

cl-lastfm.

Source

specials.lisp.


6.2.2 Special variables

Special Variable: *api-key*
Package

cl-lastfm.

Source

specials.lisp.

Special Variable: *api-secret-key*
Package

cl-lastfm.

Source

specials.lisp.


6.2.3 Macros

Macro: def-lastfm-uri (name uri)
Package

cl-lastfm.

Source

specials.lisp.

Macro: with-lastfm-stream (stream &body body)

Macro which creates an HTTP url, add parameters executing body, and performs the HTTP request defined by uri.

Package

cl-lastfm.

Source

lastfm.lisp.


6.2.4 Ordinary functions

Function: extract-lastfm-xml-error (xml)

Extract a LastFM error from a ‘XML’ message. Returns an error code and an error message.

Package

cl-lastfm.

Source

tools.lisp.

Function: get-current-date ()

Get current date in YYYY-MM-DD hh:mm:ss format.

Package

cl-lastfm.

Source

tools.lisp.

Function: get-date-formated (control-string)

Get current date in CONTROL-STRING format.

Package

cl-lastfm.

Source

tools.lisp.

Function: get-timestamp ()

Get current date in YYYYMMDDHHMMSS format.

Package

cl-lastfm.

Source

tools.lisp.

Function: perform-lastfm-query (query &key parameters method)

Retreive informations from LastFM Web Service.
‘QUERY’ is the HTTP request.
‘PARAMETERS’ is a list of assoc list which specify HTTP parameters. ‘METHOD’ is the HTTP method used to perform the HTTP call.

Package

cl-lastfm.

Source

tools.lisp.

Function: unix-timestamp ()

Get the Unix timestamp : seconds since Jan 01 1970.

Package

cl-lastfm.

Source

tools.lisp.

Function: url-encode-utf8 (sequence)

URL encode in UTF-8 the sequence.

Package

cl-lastfm.

Source

tools.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   D   E   F   G   L   M   P   R   T   U   W  
Index Entry  Section

A
album-get-info: Public ordinary functions
album-search: Public ordinary functions
artist-get-events: Public ordinary functions
artist-get-info: Public ordinary functions
artist-get-similar: Public ordinary functions
artist-get-top-albums: Public ordinary functions
artist-get-top-fans: Public ordinary functions
artist-get-top-tags: Public ordinary functions
artist-get-top-tracks: Public ordinary functions
artist-search: Public ordinary functions

D
def-lastfm-uri: Private macros

E
error-message-of: Public generic functions
error-message-of: Public generic functions
event-get-info: Public ordinary functions
event-get-shouts: Public ordinary functions
extract-lastfm-xml-error: Private ordinary functions

F
Function, album-get-info: Public ordinary functions
Function, album-search: Public ordinary functions
Function, artist-get-events: Public ordinary functions
Function, artist-get-info: Public ordinary functions
Function, artist-get-similar: Public ordinary functions
Function, artist-get-top-albums: Public ordinary functions
Function, artist-get-top-fans: Public ordinary functions
Function, artist-get-top-tags: Public ordinary functions
Function, artist-get-top-tracks: Public ordinary functions
Function, artist-search: Public ordinary functions
Function, event-get-info: Public ordinary functions
Function, event-get-shouts: Public ordinary functions
Function, extract-lastfm-xml-error: Private ordinary functions
Function, geo-get-events: Public ordinary functions
Function, geo-top-artists: Public ordinary functions
Function, geo-top-tracks: Public ordinary functions
Function, get-current-date: Private ordinary functions
Function, get-date-formated: Private ordinary functions
Function, get-timestamp: Private ordinary functions
Function, group-get-members: Public ordinary functions
Function, group-get-weekly-album-chart: Public ordinary functions
Function, group-get-weekly-artist-chart: Public ordinary functions
Function, group-get-weekly-chart-list: Public ordinary functions
Function, group-get-weekly-track-chart: Public ordinary functions
Function, library-get-albums: Public ordinary functions
Function, library-get-artists: Public ordinary functions
Function, library-get-tracks: Public ordinary functions
Function, perform-lastfm-query: Private ordinary functions
Function, tag-get-similar: Public ordinary functions
Function, tag-get-top-albums: Public ordinary functions
Function, tag-get-top-artists: Public ordinary functions
Function, tag-get-top-tags: Public ordinary functions
Function, tag-get-top-tracks: Public ordinary functions
Function, tag-get-weekly-artist-chart: Public ordinary functions
Function, tag-get-weekly-chart-list: Public ordinary functions
Function, tag-search: Public ordinary functions
Function, tasteometer-compare: Public ordinary functions
Function, track-get-info: Public ordinary functions
Function, track-get-similar: Public ordinary functions
Function, track-get-top-fans: Public ordinary functions
Function, track-get-top-tags: Public ordinary functions
Function, track-search: Public ordinary functions
Function, unix-timestamp: Private ordinary functions
Function, url-encode-utf8: Private ordinary functions
Function, user-get-events: Public ordinary functions
Function, user-get-friends: Public ordinary functions
Function, user-get-loved-tracks: Public ordinary functions
Function, user-get-neighbours: Public ordinary functions
Function, user-get-recent-tracks: Public ordinary functions
Function, user-get-shouts: Public ordinary functions
Function, user-get-top-albums: Public ordinary functions
Function, user-get-top-artists: Public ordinary functions
Function, user-get-top-tags: Public ordinary functions
Function, user-get-top-tracks: Public ordinary functions
Function, user-get-weekly-album-chart: Public ordinary functions
Function, user-get-weekly-artist-chart: Public ordinary functions
Function, user-get-weekly-chart-list: Public ordinary functions
Function, user-get-weekly-track-chart: Public ordinary functions

G
Generic Function, error-message-of: Public generic functions
Generic Function, request-error-code-of: Public generic functions
geo-get-events: Public ordinary functions
geo-top-artists: Public ordinary functions
geo-top-tracks: Public ordinary functions
get-current-date: Private ordinary functions
get-date-formated: Private ordinary functions
get-timestamp: Private ordinary functions
group-get-members: Public ordinary functions
group-get-weekly-album-chart: Public ordinary functions
group-get-weekly-artist-chart: Public ordinary functions
group-get-weekly-chart-list: Public ordinary functions
group-get-weekly-track-chart: Public ordinary functions

L
library-get-albums: Public ordinary functions
library-get-artists: Public ordinary functions
library-get-tracks: Public ordinary functions

M
Macro, def-lastfm-uri: Private macros
Macro, with-lastfm-stream: Private macros
Method, error-message-of: Public generic functions
Method, request-error-code-of: Public generic functions

P
perform-lastfm-query: Private ordinary functions

R
request-error-code-of: Public generic functions
request-error-code-of: Public generic functions

T
tag-get-similar: Public ordinary functions
tag-get-top-albums: Public ordinary functions
tag-get-top-artists: Public ordinary functions
tag-get-top-tags: Public ordinary functions
tag-get-top-tracks: Public ordinary functions
tag-get-weekly-artist-chart: Public ordinary functions
tag-get-weekly-chart-list: Public ordinary functions
tag-search: Public ordinary functions
tasteometer-compare: Public ordinary functions
track-get-info: Public ordinary functions
track-get-similar: Public ordinary functions
track-get-top-fans: Public ordinary functions
track-get-top-tags: Public ordinary functions
track-search: Public ordinary functions

U
unix-timestamp: Private ordinary functions
url-encode-utf8: Private ordinary functions
user-get-events: Public ordinary functions
user-get-friends: Public ordinary functions
user-get-loved-tracks: Public ordinary functions
user-get-neighbours: Public ordinary functions
user-get-recent-tracks: Public ordinary functions
user-get-shouts: Public ordinary functions
user-get-top-albums: Public ordinary functions
user-get-top-artists: Public ordinary functions
user-get-top-tags: Public ordinary functions
user-get-top-tracks: Public ordinary functions
user-get-weekly-album-chart: Public ordinary functions
user-get-weekly-artist-chart: Public ordinary functions
user-get-weekly-chart-list: Public ordinary functions
user-get-weekly-track-chart: Public ordinary functions

W
with-lastfm-stream: Private macros


A.3 Variables

Jump to:   *   +  
C   M   S  
Index Entry  Section

*
*api-key*: Private special variables
*api-secret-key*: Private special variables
*debug*: Public special variables

+
+album-get-info+: Private constants
+album-search+: Private constants
+artist-get-events+: Private constants
+artist-get-info+: Private constants
+artist-get-similar+: Private constants
+artist-get-top-albums+: Private constants
+artist-get-top-fans+: Private constants
+artist-get-top-tags+: Private constants
+artist-get-top-tracks+: Private constants
+artist-search+: Private constants
+event-get-info+: Private constants
+event-get-shouts+: Private constants
+geo-get-events+: Private constants
+geo-top-artists+: Private constants
+geo-top-tracks+: Private constants
+group-get-members+: Private constants
+group-get-weekly-album-chart+: Private constants
+group-get-weekly-artist-chart+: Private constants
+group-get-weekly-chart-list+: Private constants
+group-get-weekly-track-chart+: Private constants
+last-fm-ws+: Private constants
+library-get-albums+: Private constants
+library-get-artists+: Private constants
+library-get-tracks+: Private constants
+tag-get-similar+: Private constants
+tag-get-top-albums+: Private constants
+tag-get-top-artists+: Private constants
+tag-get-top-tags+: Private constants
+tag-get-top-tracks+: Private constants
+tag-get-weekly-artist-chart+: Private constants
+tag-get-weekly-chart-list+: Private constants
+tag-search+: Private constants
+tasteometer-compare+: Private constants
+track-get-info+: Private constants
+track-get-similar+: Private constants
+track-get-top-fans+: Private constants
+track-get-top-tags+: Private constants
+track-search+: Private constants
+user-get-events: Private constants
+user-get-friends+: Private constants
+user-get-loved-tracks+: Private constants
+user-get-neighbours+: Private constants
+user-get-recent-tracks+: Private constants
+user-get-shouts+: Private constants
+user-get-top-albums+: Private constants
+user-get-top-artists+: Private constants
+user-get-top-tags+: Private constants
+user-get-top-tracks+: Private constants
+user-get-weekly-album-chart+: Private constants
+user-get-weekly-artist-chart+: Private constants
+user-get-weekly-chart-list+: Private constants
+user-get-weekly-track-chart+: Private constants

C
code: Public conditions
Constant, +album-get-info+: Private constants
Constant, +album-search+: Private constants
Constant, +artist-get-events+: Private constants
Constant, +artist-get-info+: Private constants
Constant, +artist-get-similar+: Private constants
Constant, +artist-get-top-albums+: Private constants
Constant, +artist-get-top-fans+: Private constants
Constant, +artist-get-top-tags+: Private constants
Constant, +artist-get-top-tracks+: Private constants
Constant, +artist-search+: Private constants
Constant, +event-get-info+: Private constants
Constant, +event-get-shouts+: Private constants
Constant, +geo-get-events+: Private constants
Constant, +geo-top-artists+: Private constants
Constant, +geo-top-tracks+: Private constants
Constant, +group-get-members+: Private constants
Constant, +group-get-weekly-album-chart+: Private constants
Constant, +group-get-weekly-artist-chart+: Private constants
Constant, +group-get-weekly-chart-list+: Private constants
Constant, +group-get-weekly-track-chart+: Private constants
Constant, +last-fm-ws+: Private constants
Constant, +library-get-albums+: Private constants
Constant, +library-get-artists+: Private constants
Constant, +library-get-tracks+: Private constants
Constant, +tag-get-similar+: Private constants
Constant, +tag-get-top-albums+: Private constants
Constant, +tag-get-top-artists+: Private constants
Constant, +tag-get-top-tags+: Private constants
Constant, +tag-get-top-tracks+: Private constants
Constant, +tag-get-weekly-artist-chart+: Private constants
Constant, +tag-get-weekly-chart-list+: Private constants
Constant, +tag-search+: Private constants
Constant, +tasteometer-compare+: Private constants
Constant, +track-get-info+: Private constants
Constant, +track-get-similar+: Private constants
Constant, +track-get-top-fans+: Private constants
Constant, +track-get-top-tags+: Private constants
Constant, +track-search+: Private constants
Constant, +user-get-events: Private constants
Constant, +user-get-friends+: Private constants
Constant, +user-get-loved-tracks+: Private constants
Constant, +user-get-neighbours+: Private constants
Constant, +user-get-recent-tracks+: Private constants
Constant, +user-get-shouts+: Private constants
Constant, +user-get-top-albums+: Private constants
Constant, +user-get-top-artists+: Private constants
Constant, +user-get-top-tags+: Private constants
Constant, +user-get-top-tracks+: Private constants
Constant, +user-get-weekly-album-chart+: Private constants
Constant, +user-get-weekly-artist-chart+: Private constants
Constant, +user-get-weekly-chart-list+: Private constants
Constant, +user-get-weekly-track-chart+: Private constants

M
message: Public conditions

S
Slot, code: Public conditions
Slot, message: Public conditions
Special Variable, *api-key*: Private special variables
Special Variable, *api-secret-key*: Private special variables
Special Variable, *debug*: Public special variables