Add publish_post method #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "publish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Just getting warmed up here. This PR adds a wrapper method to publish_post which calls publish.
I also fixed a clippy warning in the init method, which suggests an alternate rust syntax for setting the value of a variable via an if/else clause.
Nice, cool to see this taking shape. I've requested some changes in the review comments.
I also suggest changing the
init
method name toconnect
; that should help to clarify that we are connecting to an sbot instance and not start / initialising one.@ -24,6 +24,8 @@
//! }
//! ```
extern crate kuska_ssb;
The need to write
extern crate
was removed in Rust 2018. Rather writeuse kuska_ssb;
.oops hmm I'm not sure how or why this got into there, thanks
@ -43,2 +42,2 @@
if ip_port.is_none() {
address = "127.0.0.1:8008".to_string();
let address = if ip_port.is_none() {
Ahh this is so much nicer! It always pained me to write
let address;
but I didn't know an alternative approach.@ -116,0 +116,4 @@
///
/// # Arguments
///
/// * `text` - A &str which represents the text to be published in the post
Let's replace "A &str..." with "A reference to a string slice...".
Incorporated the code review suggestions,
and due to accidental git issues, also added the publish_description method to this PR.
but based on your comment on that other PR, it sounds like we could merge this in (since the null fields is not a breaking change, just something that would be nice to fix, and could be fixed in Kuska).
Noice 🟢