| Crates.io | msr-api |
| lib.rs | msr-api |
| version | 0.1.0 |
| created_at | 2025-03-04 22:02:41.584517+00 |
| updated_at | 2025-03-04 22:02:41.584517+00 |
| description | Wrapper for Monster-Siren's API |
| homepage | |
| repository | https://github.com/Meph1sto666/monster-siren-api |
| max_upload_size | |
| id | 1577862 |
| size | 59,851 |
This is a unofficial Rust wrapper for Monster Siren's API
cargo add msr-api
use msr_api::types::{lyrics::{from_lyrics_url, Lyrics}, song::{fetch_song_details, Song}};
use tokio;
#[tokio::main]
async fn main() {
let song: Song = fetch_song_details("514530").await.unwrap();
let lyrics: Lyrics = from_lyrics_url(song.lyrics_url_ref().to_owned().unwrap().as_str()).await.unwrap();
}
use msr_api::types::{album::{fetch_album_details, Album}, song::fetch_song_list};
use tokio;
#[tokio::main]
async fn main() {
let song_list: Vec<msr_api::types::song::SongSyn> = fetch_song_list().await.unwrap();
for s in song_list.iter().cloned() {
let album: Album = fetch_album_details(&s.clone().album_cid_ref().to_owned().unwrap()).await.unwrap();
let idx: u16 = s.get_details().await.unwrap().get_song_index(&album).unwrap();
println!("[{}] {} in {}", s.cid_ref(), idx, album.name_ref())
}
}
Contributions are welcome, just make sure to install the --dev dependencies for testing
This project is not affiliated with Hypergryph, Studio Montagne, Yostar or Gryphline in any ways.