7 releases

0.1.6 Oct 23, 2024
0.1.5 Oct 23, 2024
0.1.4 Aug 21, 2024
0.1.0 Jul 25, 2024

#1751 in Web programming

Download history 96/week @ 2024-07-20 23/week @ 2024-07-27 77/week @ 2024-08-03 14/week @ 2024-08-10 269/week @ 2024-08-17 39/week @ 2024-08-24 5/week @ 2024-08-31 18/week @ 2024-09-21 7/week @ 2024-09-28 1/week @ 2024-10-05 2/week @ 2024-10-12 279/week @ 2024-10-19 21/week @ 2024-10-26 9/week @ 2024-11-02

564 downloads per month

MIT/Apache

12KB
220 lines

一个基于biliup-rs已经封装好可以满足基本需求的自用库

BiliupApi - crates.io: Rust Package Registry

默认是在当前目录下使用biliup-rs格式的cookie.json

然后函数就三个

pub fn upload_video(video_info:VideoInfo,filename:&String)->Result

pub fn append_video(filename:&String,bv:&String)->Result<()>

pub fn show_video(bv:&String)->Result

都做了同步封装

如果要异步的是如下:

pub async fn _upload_video(video_info:VideoInfo,filename:&String)->Result

pub async fn _append_video(filename:&String,bv:&String)->Result<()>

pub async fn _show_video(bv:&String)->Result

使用简单,下面是VideoInfo的实现,手动弄一下就好了

pub struct VideoInfo{

title:String,//标题

copyright:u8,//1自制 2转载

source:String,//来源

tag:String,//用逗号分割

tid:u16,//分区号

desc:String,//简介

}

Dependencies

~26–40MB
~621K SLoC