v0.1
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s

This commit is contained in:
2023-10-20 23:31:16 +09:00
parent 430b5977d8
commit 7b03adda1f
53 changed files with 3466 additions and 1 deletions

24
src/followers.rs Normal file
View File

@ -0,0 +1,24 @@
extern crate reqwest;
use crate::data_refresh;
use crate::url;
//use serde_json::json;
pub async fn get_request(actor: String, cursor: Option<String>) -> String {
let token = data_refresh(&"access");
let url = url(&"followers");
let cursor = cursor.unwrap();
let client = reqwest::Client::new();
let res = client
.get(url)
.query(&[("actor", actor), ("cursor", cursor)])
.header("Authorization", "Bearer ".to_owned() + &token)
.send()
.await
.unwrap()
.text()
.await
.unwrap();
return res;
}