1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! Complete async Rust client for the OpenSubsonic / Subsonic REST API.
//!
//! Supports Subsonic API v1.16.1 and OpenSubsonic extensions.
//!
//! # Quick start
//!
//! ```no_run
//! use opensubsonic::{Client, Auth};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), opensubsonic::Error> {
//! // Token auth (username + password):
//! let client = Client::new(
//! "https://music.example.com",
//! Auth::token("admin", "password"),
//! )?;
//!
//! // Or API key auth (OpenSubsonic extension):
//! let client = Client::new(
//! "https://music.example.com",
//! Auth::api_key("your-api-key"),
//! )?;
//!
//! // Verify connectivity.
//! client.ping().await?;
//!
//! // Browse artists.
//! let artists = client.get_artists(None).await?;
//! for index in &artists.index {
//! for artist in &index.artist {
//! println!("{}", artist.name);
//! }
//! }
//!
//! // Search for songs.
//! let results = client.search3("bohemian", None, None, None, None, None, None, None).await?;
//! for song in &results.song {
//! println!("{} - {}", song.artist.as_deref().unwrap_or("?"), song.title);
//! }
//!
//! // Get a streaming URL.
//! let url = client.stream_url("song-id-123", None, None)?;
//! println!("Stream: {url}");
//!
//! Ok(())
//! }
//! ```
//!
//! # API coverage
//!
//! All Subsonic API v1.16.1 endpoints are implemented, plus OpenSubsonic extensions:
//!
//! - **System**: `ping`, `getLicense`, `getOpenSubsonicExtensions`, `tokenInfo`
//! - **Browsing**: `getMusicFolders`, `getIndexes`, `getMusicDirectory`, `getGenres`,
//! `getArtists`, `getArtist`, `getAlbum`, `getSong`, `getVideos`, `getArtistInfo`/`2`,
//! `getAlbumInfo`/`2`, `getSimilarSongs`/`2`, `getTopSongs`
//! - **Lists**: `getAlbumList`/`2`, `getRandomSongs`, `getSongsByGenre`, `getNowPlaying`,
//! `getStarred`/`2`
//! - **Searching**: `search`, `search2`, `search3`
//! - **Playlists**: `getPlaylists`, `getPlaylist`, `createPlaylist`, `updatePlaylist`,
//! `deletePlaylist`
//! - **Media Retrieval**: `stream`, `download`, `hls`, `getCaptions`, `getCoverArt`,
//! `getLyrics`, `getLyricsBySongId`, `getAvatar`
//! - **Media Annotation**: `star`, `unstar`, `setRating`, `scrobble`
//! - **Sharing**: `getShares`, `createShare`, `updateShare`, `deleteShare`
//! - **Podcast**: `getPodcasts`, `getNewestPodcasts`, `getPodcastEpisode`, `refreshPodcasts`,
//! `createPodcastChannel`, `deletePodcastChannel`, `deletePodcastEpisode`,
//! `downloadPodcastEpisode`
//! - **Jukebox**: `jukeboxControl`
//! - **Internet Radio**: `getInternetRadioStations`, `createInternetRadioStation`,
//! `updateInternetRadioStation`, `deleteInternetRadioStation`
//! - **Chat**: `getChatMessages`, `addChatMessage`
//! - **User Management**: `getUser`, `getUsers`, `createUser`, `updateUser`, `deleteUser`,
//! `changePassword`
//! - **Bookmarks**: `getBookmarks`, `createBookmark`, `deleteBookmark`, `getPlayQueue`,
//! `savePlayQueue`, `getPlayQueueByIndex`, `savePlayQueueByIndex`
//! - **Scanning**: `getScanStatus`, `startScan`
//! - **Transcoding** (OpenSubsonic): `getTranscodeDecision`, `getTranscodeStream`
pub use Auth;
pub use Client;
pub use ;
// Re-export commonly used API types that live in api modules.
pub use ;
pub use ;