1use std::borrow::Cow;
2
3use error::ClientError;
4
5use crate::client::builder::ClientBuilder;
6
7pub mod api;
8pub mod client;
9pub mod error;
10pub mod model;
11
12pub const API_PATH: &str = "https://api.music.yandex.net:443/";
13pub const DEFAULT_CLIENT_ID: &str = "YandexMusicAndroid/24023621";
14
15pub struct YandexMusicClient {
17 pub inner: reqwest::Client,
19}
20
21impl YandexMusicClient {
22 pub fn builder<'a>(token: impl Into<Cow<'a, str>>) -> ClientBuilder<'a> {
24 ClientBuilder::new(token)
25 }
26
27 pub fn from_client(client: reqwest::Client) -> Self {
30 Self { inner: client }
31 }
32}