Expand description
Tidal music streaming service integration.
This crate provides a Rust client for interacting with the Tidal music streaming API.
It implements the MusicApi trait to enable fetching artists, albums, tracks, and
search results from Tidal, as well as managing user favorites.
§Features
- OAuth 2.0 device authorization flow for authentication
- Fetch and manage favorite artists, albums, and tracks
- Search for music content across Tidal’s catalog
- Retrieve track playback URLs and metadata
- Support for different audio quality levels (High, Lossless, Hi-Res Lossless)
- Optional database persistence for authentication tokens
§Examples
use moosicbox_tidal::TidalMusicApi;
let api = TidalMusicApi::builder()
.with_db(db)
.build()
.await?;Modules§
- api
- HTTP API endpoints for Tidal integration.
- db
- Database operations for persisting Tidal authentication credentials.
- models
- Tidal API data models and type conversions.
Macros§
- tidal_
api_ endpoint - Constructs Tidal API endpoint URLs with optional parameters and query strings.
Structs§
- Tidal
Music Api - Implementation of the
MusicApitrait for Tidal streaming service. - Tidal
Music ApiBuilder - Builder for configuring and constructing a
TidalMusicApiinstance. - Tidal
Track Playback Info - Playback information for a Tidal track including audio metadata.
- TryFrom
Album Type Error - Error returned when converting an unsupported album type to
TidalAlbumType.
Enums§
- Error
- Errors that can occur when interacting with the Tidal API.
- Search
Type - Content types that can be searched on Tidal.
- Tidal
Album Order - Order field for album queries.
- Tidal
Album Order Direction - Sort direction for album queries.
- Tidal
Album Type - Album type classification in Tidal.
- Tidal
Artist Order - Order field for artist queries.
- Tidal
Artist Order Direction - Sort direction for artist queries.
- Tidal
Audio Quality - Audio quality levels supported by Tidal.
- Tidal
Config Error - Errors that can occur when configuring the Tidal API client.
- Tidal
Device Type - Device type for Tidal API requests.
- Tidal
Search Type - Tidal-specific search type identifiers.
- Tidal
Track Order - Order field for track queries.
- Tidal
Track Order Direction - Sort direction for track queries.
Statics§
- API_
SOURCE - The API source identifier for Tidal.
Functions§
- add_
favorite_ album - Adds an album to the user’s favorites on Tidal.
- add_
favorite_ artist - Adds an artist to the user’s favorites on Tidal.
- add_
favorite_ track - Adds a track to the user’s favorites on Tidal.
- album
- Retrieves album metadata from Tidal by album ID.
- album_
tracks - Fetches tracks from an album on Tidal.
- all_
favorite_ albums - Retrieves all favorite albums from Tidal by paginating through results.
- artist
- Retrieves artist metadata from Tidal by artist ID.
- artist_
albums - Fetches albums by an artist from Tidal.
- device_
authorization - Initiates the OAuth 2.0 device authorization flow for Tidal.
- device_
authorization_ token - Exchanges a device code for an access token in the OAuth 2.0 flow.
- favorite_
albums - Fetches the user’s favorite albums from Tidal.
- favorite_
artists - Fetches the user’s favorite artists from Tidal.
- favorite_
tracks - Fetches the user’s favorite tracks from Tidal.
- remove_
favorite_ album - Removes an album from the user’s favorites on Tidal.
- remove_
favorite_ artist - Removes an artist from the user’s favorites on Tidal.
- remove_
favorite_ track - Removes a track from the user’s favorites on Tidal.
- search
- Searches for content on Tidal by query string and content types.
- track
- Retrieves track metadata from Tidal by track ID.
- track_
file_ url - Retrieves the playback URLs for a track at the specified audio quality.
- track_
playback_ info - Retrieves detailed playback information for a track including audio metadata.