modified: Cargo.lock
modified: Cargo.toml modified: src/lib.rs modified: src/sobjects.rs
This commit is contained in:
parent
22f02cfa43
commit
a72d62cb36
4
Cargo.lock
generated
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,7 +13,7 @@ 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)]
|
||||
@ -27,12 +27,13 @@ pub struct CloudTrack {
|
||||
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,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user