Hooks reference
Hooks give easy and quick way to access particular data types from spinamp database. Every hook is built on top of useQuery
or useInfiniteQuery
hooks from 'react-query' (https://tanstack.com/query/v4/docs/reference/useQuery).
Each hook returns all properties from the wrapped hooks, extended with some direct accessible data like tracks
, artist
, etc. Every hook also takes optional UseQueryOptions
object as the last argument, which can be used to set some specific react-query
options.
Below is a list of all hooks APIs, grouped by referencing data types.
We'd also recommend skimming over the @spinamp/spinamp-sdk
for a list and description of query parameters and interfaces for all returned data.
Additionally, exploring the GraphQL playground where the data comes from will give you a better feel for what's available too.
Tracks
TracksArtists
ArtistsCollection
CollectionPlatforms
PlatformsPlaylists
PlaylistsLast updated