modified: Cargo.lock

modified:   Cargo.toml
	modified:   src/lib.rs
	modified:   src/sobjects.rs
This commit is contained in:
Michael Wain 2025-02-13 03:10:14 +03:00
parent 22f02cfa43
commit a72d62cb36
4 changed files with 13 additions and 12 deletions

4
Cargo.lock generated

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
version = 4
[[package]]
name = "addr2line"
@ -1036,7 +1036,7 @@ dependencies = [
[[package]]
name = "soundcloud"
version = "0.1.4"
version = "0.1.5"
dependencies = [
"hyper-util",
"regex",

@ -1,6 +1,6 @@
[package]
name = "soundcloud"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
description = "A small rust crate for fetching data from soundcloud without developer account"
authors = ["alterwain"]

@ -1,7 +1,7 @@
use std::{collections::HashMap, error::Error, fmt::format, fs::File, io::Write};
use std::error::Error;
use regex::Regex;
use reqwest::header::{HOST, ORIGIN, REFERER, USER_AGENT};
use reqwest::header::USER_AGENT;
use sobjects::CloudPlaylists;
pub mod sobjects;

@ -1,6 +1,6 @@
#[derive(Debug, serde::Deserialize, Clone)]
pub struct CloudPlaylists {
pub collection: Vec<CloudPlaylist>
pub collection: Vec<CloudPlaylist>,
}
#[derive(Debug, serde::Deserialize, Clone)]
@ -13,26 +13,27 @@ pub struct CloudPlaylist {
pub created_at: String,
pub title: String,
pub track_count: u32,
pub tracks: Vec<CloudTrack>
pub tracks: Vec<CloudTrack>,
}
#[derive(Debug, serde::Deserialize, Clone)]
pub struct CloudTrack {
pub artwork_url: Option<String>,
pub created_at: Option<String>,
pub description: Option<String>,
pub description: Option<String>,
pub duration: Option<u32>,
pub genre: Option<String>,
pub id: u64,
pub permalink_url: Option<String>,
pub title: Option<String>,
pub uri: Option<String>,
pub media: Option<CloudTranscodings>
pub artist: Option<String>,
pub media: Option<CloudTranscodings>,
}
#[derive(Debug, serde::Deserialize, Clone)]
pub struct CloudTranscodings {
pub transcodings: Vec<CloudTranscoding>
pub transcodings: Vec<CloudTranscoding>,
}
#[derive(Debug, serde::Deserialize, Clone)]
@ -40,5 +41,5 @@ pub struct CloudTranscoding {
pub duration: u32,
pub preset: String,
pub quality: String,
pub url: String
}
pub url: String,
}