### Rustybook::get_first_video Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets the first video from a given URL. Returns an optional Video object. ```APIDOC ## Rustybook::get_first_video ### Description Gets the first video from the provided URL. ### Parameters - **url** (string) - Required. The URL from which to fetch the first video. ### Returns - **Result, Error>**: The first video if found, `None` otherwise, or an error. ### Example ```rust if let Some(video) = client.get_first_video(&url).await? { // process video } ``` ``` -------------------------------- ### Rustybook::get_videos Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets videos from a given URL. Returns a vector of Video objects. ```APIDOC ## Rustybook::get_videos ### Description Gets videos from the provided URL. ### Parameters - **url** (string) - Required. The URL from which to fetch videos. ### Returns - **Result, Error>**: A vector of `Video` objects on success, or an error. ### Example ```rust let videos = client.get_videos(&url).await?; ``` ``` -------------------------------- ### Rustybook::get_attachments Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets attachments from a given URL. Returns a vector of Attachment objects. ```APIDOC ## Rustybook::get_attachments ### Description Gets attachments from the provided URL. Attachments typically include media or link resources. ### Parameters - **url** (string) - Required. The URL from which to fetch attachments. ### Returns - **Result, Error>**: A vector of `Attachment` objects on success, or an error. ### Example ```rust let attachments = client.get_attachments(&url).await?; ``` ``` -------------------------------- ### Rustybook::get_first_post Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets the first post from a given URL. Returns an optional Post, which is None if no posts are found. ```APIDOC ## Rustybook::get_first_post ### Parameters - **url** (string) - Required. The URL from which to fetch the first post. ### Returns - **Result, Error>**: The first `Post` if available, `None` if no posts are found, or an error on failure. ### Example ```rust if let Some(post) = client.get_first_post(&url).await? { println!("{:?}", post); } ``` ``` -------------------------------- ### Rustybook::get_posts Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets posts from a given URL. This is an asynchronous method that fetches a list of Post objects. ```APIDOC ## Rustybook::get_posts ### Description Gets posts from the specified `url`. Returns a vector of `Post` objects. ### Method async fn get_posts(&self, url: &str) -> Result, Error> ### Parameters - **url** (string) - Required - The URL from which to fetch posts. ### Returns - **Result, Error>**: A vector of `Post` objects on success, or an error on failure. ### Example ```rust let posts = client.get_posts("https://www.facebook.com/somepage").await?; ``` ``` -------------------------------- ### Rustybook::get_raw_payloads Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Gets extracted raw module payloads from a given URL. This provides access to nested data structures used internally. ```APIDOC ## Rustybook::get_raw_payloads ### Description Gets extracted raw module payloads from the provided URL. These are structured `ModuleInvocation` objects representing internal data. ### Parameters - **url** (string) - Required. The URL from which to extract raw payloads. ### Returns - **Result, Error>**: A vector of `ModuleInvocation` objects on success, or an error. ### Example ```rust let payloads = client.get_raw_payloads(&url).await?; ``` ``` -------------------------------- ### Rustybook::new Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Creates a new Rustybook client with default settings. This is the primary constructor for initializing a client without any custom configuration. ```APIDOC ## Rustybook::new ### Description Creates a new Rustybook client with default settings. The client is used for making subsequent API calls to fetch content from Facebook pages. ### Signature Rustybook::new() -> Result ### Returns - **Result**: A new Rustybook client on success, or an error on failure. ### Example ```rust let client = Rustybook::new()?; ``` ``` -------------------------------- ### Initialize Rustybook client with default and builder Source: https://docs.rs/rustybook/0.2.1/rustybook/index.html Shows two ways to create a Rustybook client: using Rustybook::new() for default options and Rustybook::builder().build() for customization. Both return a Result and are used before calling asynchronous methods. ```rust use rustybook::Rustybook; // default let client = Rustybook::new().unwrap(); // builder let client = Rustybook::builder().build().unwrap(); ``` -------------------------------- ### Rustybook::builder Source: https://docs.rs/rustybook/0.2.1/rustybook/struct.Rustybook.html Returns a builder for configuring the client. Use this to customize client settings such as network options or other parameters before building the client. ```APIDOC ## Rustybook::builder ### Description Returns a builder for configuring the client. This allows setting custom options before constructing a Rustybook instance. ### Method Rustybook::builder() -> RustybookBuilder ### Returns - **RustybookBuilder**: A builder object that can be used to configure and finally create a Rustybook client. ### Example ```rust let client = Rustybook::builder().some_option(...).build()?; ``` ``` -------------------------------- ### Add rustybook dependency in Cargo.toml Source: https://docs.rs/rustybook/0.2.1/rustybook/index.html Cargo.toml snippet to add the rustybook crate as a dependency with version 0. ```toml [dependencies] rustybook = "0" ``` -------------------------------- ### BuildError enum definition Source: https://docs.rs/rustybook/0.2.1/rustybook/error/enum.BuildError.html Defines the BuildError enum with two variants: HttpClient(Error) for HTTP client errors and Other(String) for other errors. Used when building the HTTP client. ```rust pub enum BuildError { HttpClient(Error), Other(String), } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.