qobuz_api_rust/
api.rs

1/// Authentication module for the Qobuz API.
2///
3/// This module provides functionality for authenticating with the Qobuz API,
4/// including user login with credentials or tokens, and password reset capabilities.
5/// It handles the management of authentication tokens required for accessing
6/// protected API endpoints.
7pub mod auth;
8
9/// Content modules for the Qobuz API.
10///
11/// This module contains various submodules that handle different types of content available
12/// through the Qobuz API, including albums, artists, catalogs, labels, playlists, and tracks.
13/// Each submodule provides specific functionality for interacting with the corresponding
14/// content type on the Qobuz platform.
15///
16/// # Example
17///
18/// ```no_run
19/// use qobuz_api_rust::QobuzApiService;
20///
21/// #[tokio::main]
22/// async fn main() -> Result<(), Box<dyn std::error::Error>> {
23///     let service = QobuzApiService::new().await?;
24///
25///     // Search for albums
26///     let albums = service.search_albums("radiohead", Some(10), None, None).await?;
27///
28///     // Get a specific track
29///     let track = service.get_track("12345", None).await?;
30///
31///     Ok(())
32/// }
33/// ```
34pub mod content;
35
36/// Favorites management module for the Qobuz API.
37///
38/// This module provides functionality for managing user favorites, including adding,
39/// removing, and retrieving favorite tracks, albums, and artists. It requires user
40/// authentication to access and modify the user's favorites.
41pub mod favorites;
42
43/// HTTP request handling module for the Qobuz API.
44///
45/// This module contains the core request functions used to communicate with the Qobuz API.
46/// It handles GET, POST, and signed GET requests with proper authentication, parameter
47/// handling, and response parsing. The functions in this module are used by other API
48/// modules to make actual HTTP calls to the Qobuz API endpoints.
49pub mod requests;
50
51/// Main service module for the Qobuz API.
52///
53/// This module contains the core `QobuzApiService` struct and its implementation,
54/// which serves as the main interface for interacting with the Qobuz API. It handles
55/// authentication, credential management, and provides methods for accessing all
56/// available API endpoints through a unified interface.
57pub mod service;