Adds the `replies_count` property to Status

Closes #73
master
Paul Woolcock 6 years ago
parent 690b029d99
commit 7d752a9fed
  1. 24
      examples/home_timeline.rs
  2. 2
      src/entities/status.rs

@ -0,0 +1,24 @@
#![cfg_attr(not(feature = "toml"), allow(dead_code))]
#![cfg_attr(not(feature = "toml"), allow(unused_imports))]
mod register;
use register::MastodonClient;
use std::error;
#[cfg(feature = "toml")]
fn main() -> Result<(), Box<error::Error>> {
let mastodon = register::get_mastodon_data()?;
let tl = mastodon.get_home_timeline()?;
println!("{:#?}", tl);
Ok(())
}
#[cfg(not(feature = "toml"))]
fn main() {
println!(
"examples require the `toml` feature, run this command for this example:\n\ncargo run \
--example print_your_profile --features toml\n"
);
}

@ -30,6 +30,8 @@ pub struct Status {
pub created_at: DateTime<Utc>, pub created_at: DateTime<Utc>,
/// An array of Emoji /// An array of Emoji
pub emojis: Vec<Emoji>, pub emojis: Vec<Emoji>,
/// The numbef or replies to this status.
pub replies_count: u64,
/// The number of reblogs for the status. /// The number of reblogs for the status.
pub reblogs_count: u64, pub reblogs_count: u64,
/// The number of favourites for the status. /// The number of favourites for the status.

Loading…
Cancel
Save