Compare commits
4 Commits
4219b1d5d8
...
cda9f86b92
Author | SHA1 | Date | |
---|---|---|---|
|
cda9f86b92 | ||
|
36bda1e89f | ||
|
3baaf86132 | ||
|
01822e79bb |
1672
Cargo.lock
generated
1672
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ edition = "2021"
|
||||
[dependencies]
|
||||
chrono = "0.4.26"
|
||||
reqwest = { version ="0.11.18", features = ["json"]}
|
||||
tokio = { version = "1" }
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
|
||||
serde = { version = "1.0.104", features = ["derive"] }
|
||||
serde_json = "1.0.48"
|
||||
lemmy_api_common = "0.18.1"
|
||||
lemmy_api_common = "0.19.3"
|
||||
|
@ -55,19 +55,19 @@ async fn post_to_lemmy(
|
||||
)
|
||||
.as_ref(),
|
||||
)?;
|
||||
println!("{}", title);
|
||||
println!("Using title: {}", title);
|
||||
|
||||
let params = CreatePost {
|
||||
community_id,
|
||||
name: title,
|
||||
url: Some(url),
|
||||
body: Some("Post your results and discuss your guesses. Have fun! \nNote: there might be spoilers in the thread.".to_owned()),
|
||||
auth,
|
||||
body: Some("Post your results and discuss your guesses. Have fun! \nNote: there _will_ be spoilers in the thread, so try it first.".to_owned()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let response = client
|
||||
.post(helper::api_url("post"))
|
||||
.header("Authorization", "Bearer ".to_owned() + &auth)
|
||||
.json(¶ms)
|
||||
.send()
|
||||
.await?;
|
||||
@ -94,6 +94,7 @@ async fn get_latest_post(
|
||||
client: &Client,
|
||||
user: &Sensitive<String>,
|
||||
) -> Result<Option<Post>, Box<dyn std::error::Error>> {
|
||||
println!("Checking if already posted...");
|
||||
let params = GetPersonDetails {
|
||||
username: Some(user.to_string()),
|
||||
sort: Some(SortType::New),
|
||||
|
Loading…
Reference in New Issue
Block a user