Crates.io | BiliupApi |
lib.rs | BiliupApi |
version | 0.1.7 |
source | src |
created_at | 2024-07-25 09:16:37.838934 |
updated_at | 2024-11-29 23:57:52.094356 |
description | 一个封装好的自用库 |
homepage | |
repository | |
max_upload_size | |
id | 1314818 |
size | 12,683 |
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,//简介
}