Compare commits
No commits in common. "cda9f86b9204317c96b7d4f5d258ca299316c86c" and "4219b1d5d82ccf9589d03db1ea0b2449db159d31" have entirely different histories.
cda9f86b92
...
4219b1d5d8
1710
Cargo.lock
generated
1710
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", features = ["rt-multi-thread", "macros"] }
|
||||
tokio = { version = "1" }
|
||||
serde = { version = "1.0.104", features = ["derive"] }
|
||||
serde_json = "1.0.48"
|
||||
lemmy_api_common = "0.19.3"
|
||||
lemmy_api_common = "0.18.1"
|
||||
|
@ -55,19 +55,19 @@ async fn post_to_lemmy(
|
||||
)
|
||||
.as_ref(),
|
||||
)?;
|
||||
println!("Using title: {}", title);
|
||||
println!("{}", title);
|
||||
|
||||
let params = CreatePost {
|
||||
community_id,
|
||||
name: title,
|
||||
url: Some(url),
|
||||
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()),
|
||||
body: Some("Post your results and discuss your guesses. Have fun! \nNote: there might be spoilers in the thread.".to_owned()),
|
||||
auth,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let response = client
|
||||
.post(helper::api_url("post"))
|
||||
.header("Authorization", "Bearer ".to_owned() + &auth)
|
||||
.json(¶ms)
|
||||
.send()
|
||||
.await?;
|
||||
@ -94,7 +94,6 @@ 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