fix the test so it actually tests something

master
Paul Woolcock 6 years ago
parent 6501470312
commit 664cb2797f
  1. 21
      src/entities/itemsiter.rs

@ -3,14 +3,25 @@ use serde::Deserialize;
/// Abstracts away the `next_page` logic into a single stream of items /// Abstracts away the `next_page` logic into a single stream of items
/// ///
/// ```ignore /// ```no_run
/// # extern crate mammut /// # extern crate mammut;
/// # use mammut::Mastodon; /// # use mammut::{Data, Mastodon};
/// # use std::error::Error;
/// # fn main() -> Result<(), Box<Error>> {
/// # let data = Data {
/// # base: "".into(),
/// # client_id: "".into(),
/// # client_secret: "".into(),
/// # redirect: "".into(),
/// # token: "".into(),
/// # };
/// let client = Mastodon::from_data(data); /// let client = Mastodon::from_data(data);
/// let statuses = client.statuses("user-id", None); /// let statuses = client.statuses("user-id", false, false)?;
/// for status in statuses.into_iter() { /// for status in statuses.items_iter() {
/// // do something with `status` /// // do something with `status`
/// } /// }
/// # Ok(())
/// # }
/// ``` /// ```
pub struct ItemsIter<'a, T: Clone + for<'de> Deserialize<'de>> { pub struct ItemsIter<'a, T: Clone + for<'de> Deserialize<'de>> {
page: Page<'a, T>, page: Page<'a, T>,

Loading…
Cancel
Save