Crate elefren[−][src]
Elefren: API Wrapper around the Mastodon API.
Most of the api is documented on Mastodon's github
use elefren::{helpers::cli, prelude::*}; let registration = Registration::new("https://mastodon.social") .client_name("elefren_test") .build()?; let mastodon = cli::authenticate(registration)?; println!( "{:?}", mastodon .get_home_timeline()? .items_iter() .take(100) .collect::<Vec<_>>() );
Re-exports
pub use data::Data; |
pub use errors::ApiError; |
pub use errors::Error; |
pub use errors::Result; |
pub use registration::Registration; |
pub use status_builder::StatusBuilder; |
Modules
apps |
Registering your App |
data |
Contains the struct that holds the client auth data |
entities |
Entities returned from the API |
errors |
Errors |
helpers |
Collection of helpers for serializing/deserializing |
http_send |
Contains trait for converting |
page |
Handling multiple pages of entities. |
prelude |
Automatically import the things you need |
registration |
Registering your app. |
requests |
Requests |
scopes |
OAuth Scopes |
status_builder |
Constructing a status |
Structs
AddFilterRequest |
Form used to create a filter |
AddPushRequest |
Builder to pass to the Mastodon::add_push_subscription method |
Mastodon |
Your mastodon application client, handles all requests to and from Mastodon. |
StatusesRequest |
Builder for making a client.statuses() call |
UpdateCredsRequest |
Builder to pass to the Mastodon::update_credentials method |
UpdatePushRequest |
Builder to pass to the Mastodon::update_push_data method |
Enums
Language |
Traits
MastodonClient |
Represents the set of methods that a Mastodon Client can do, so that implementations might be swapped out for testing |