A wrapper for the Semetric (and Musicmetric) API.
The SemetricAPI is the main entry point for interacting the with Semetric API:
>>> from semetric.apiclient import SemetricAPI
>>> from semetric.apiclient.entity import Artist
>>> semetricapi = SemetricAPI(apitoken)
>>> artist = semetricapi.get(Artist, id="fe66302b0aee49cfbd7d248403036def")
>>> artist.name
"Lady Gaga"
The main API wrapper class for the Semetric API.
Query the API to get an Entity from the API based on id params.
Parameters: |
|
---|---|
Returns: | semetric.apiclient.entity.Entity – the result from the query. |
Raises : | semetric.apiclient.exc.APIError |
Search for Entities in using the API
Parameters: |
|
---|---|
Returns: | semetric.apiclient.entity.Entity – the result from the query. |
Raises : | semetric.apiclient.exc.APIError |