34 lines
904 B
Rust
34 lines
904 B
Rust
use crate::config::Config;
|
|
use crate::error::GeneralError;
|
|
use crate::gitea::issue::Issue;
|
|
use url::Url;
|
|
|
|
pub(crate) async fn debug(config: Config) -> Result<(), GeneralError> {
|
|
println!("test");
|
|
|
|
let gitea_client = crate::gitea::client::Client::from_config(config.gitea.first().unwrap());
|
|
let issue: Issue = gitea_client
|
|
.get(
|
|
Url::parse("https://gitea.champs-libres.be/api/v1/repos/julienfastre/test/issues/6")
|
|
.unwrap(),
|
|
)
|
|
.await?;
|
|
|
|
println!("issue: {:?}", issue);
|
|
|
|
Ok(())
|
|
|
|
/*
|
|
let open_project_client = Client::from_config(&config.openproject);
|
|
println!("base_url: {}", open_project_client.base_url);
|
|
println!("base_url: will get root");
|
|
let r = open_project_client.root().await?;
|
|
println!("root: {:?}", r);
|
|
let u = open_project_client.me().await?;
|
|
println!("me: {:?}", u);
|
|
|
|
Ok(())
|
|
|
|
*/
|
|
}
|