Crates.io | musixmatch |
lib.rs | musixmatch |
version | 0.1.4 |
source | src |
created_at | 2023-07-03 16:21:44.656405 |
updated_at | 2024-03-30 17:54:28.829526 |
description | A lightweight and intuitive library for accessing musixmatch api in rust |
homepage | https://github.com/Deaths-Door/musixmatch-rs |
repository | https://github.com/Deaths-Door/musixmatch-rs |
max_upload_size | |
id | 907189 |
size | 69,979 |
This repository offers a wide range of functionalities that can be leveraged to build music applications requiring access to this musicmatch. By utilizing this Rust implementation, developers can seamlessly integrate MusixMatch API capabilities into their Rust projects, enabling the development of powerful and feature-rich music applications.
The MusixMatch API is a comprehensive service that provides access to music metadata, lyrics, and album art. It offers a wide range of functionalities, including:
By leveraging the MusixMatch API, developers can build music applications that require access to this rich set of music-related data. The musixmatch-rs
crate provides a convenient Rust implementation for interacting with the MusixMatch API, enabling seamless integration into Rust projects.
For more information about the MusixMatch API and its capabilities, please refer to the MusixMatch API Documentation.
marocs
: Enables the use of default arguments for methods using the default-args
crate.Add this to your Cargo.toml
for default features:
[dependencies]
musixmatch = "0.1.1" # Note version at time of writing
With the marocs
feature enabled, you can use default arguments for methods in the MusixAbgleich API. This allows you to omit certain parameters and have them set to default values automatically (None).
[dependencies]
musixmatch = { version = "0.1.1", features = ["marcos"] } # Note version at time of writing
To use the MusixMatch API, you need an API key. Follow these steps to obtain an API key:
Note
: The exact steps and process may vary slightly depending on any updates or changes made to the MusixMatch Developer Portal. Please refer to the official documentation provided by MusixMatch for the most up-to-date instructions on obtaining an API key.
use musixmatch::MusixAbgleich;
#[tokio::main]
async fn main() {
// Create an instance of MusixAbgleich
let musicabgleich = MusixAbgleich::new("your_api_key",&|error|{
// Custom error handler for handling errors
})
// Call methods with default arguments
let artists = musicabgleich.top_artists_by_country(Some("US"), None, None).await;
println!("{:?}", artists);
//Or when using marcos feature
let marco_feature_artist = top_artists_by_country!(musicabgleich,country = "US").await;
println!("{:?}", marco_feature_artist);
}
Please note that the examples provided here are simplified and serve as a starting point. For comprehensive documentation of the crate, please visit the crate documentation for a better understanding of the crate's functionalities and APIs.
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.