rmv-core 1.0.0

Configuration, retries, stop resolution and connection status for the RMV API
Documentation
//! The User-Agent, which names the project so RMV can tell where requests
//! come from.

/// The project, named in every User-Agent.
pub const PROJECT_URL: &str = "https://github.com/udondan/rmv";

/// The User-Agent for `product`, like `rmv/1.2.0`.
pub fn user_agent(product: &str) -> String {
    format!("{product} (+{PROJECT_URL})")
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn names_product_and_project() {
        assert_eq!(
            user_agent("rmv/1.0.0"),
            "rmv/1.0.0 (+https://github.com/udondan/rmv)"
        );
    }
}