Semetric Entity Types

Definition of the entities supported by the Semetric API.

Artist

class semetric.apiclient.entity.artist.Artist(id, name=None, summary=None, **kwargs)[source]

The Artist entity represents the artists in the Semetric API.

The Artist entity supports the get() and search() methods of the SemetricAPI class. To query the API for an Artist object the get() method or the search() method should be used.

SemetricAPI.get(entity, id[, idprefix=None])

See also

This method refers to the SemetricAPI.get() method.

Parameters:
  • entity – the Artist entity class.
  • id – ID of the Artist.
  • idprefix – the prefix of the ID eg. musicbrainz.
>>> semetricapi.get(Artist, id="fe66302b0aee49cfbd7d248403036def")
>>> semetricapi.get(Artist, id="lady+gaga", idprefix="lastfm")

TODO: full list of supported ID prefixes

SemetricAPI.search(entity, name)

See also

This method refers to the SemetricAPI.search() method.

Parameters:
  • entity – the Artist entity class.
  • name – Name of the artist to search for.
>>> semetricapi.search(Artist, name="Lady Gaga")
>>> semetricapi.search(Artist, name="Muse")
reload()[source]

Reload the object from the API.

timeseries(dataset, **kwargs)[source]

Get a Timeseries for an Artist.

Project Versions

Table Of Contents

Previous topic

API Client

This Page