Function icecast_stats::fetch[][src]

pub fn fetch(url: &str) -> Result<IcecastStats, Box<dyn Error>>

Fetch icecast status information from server

This is a shorthand for

  • generate_icecast_stats_url()
  • downloading json
  • parsing json

Example:

use icecast_stats::fetch;
 
let url_str = "https://stream.example.com:8000/somestream";
let stats = fetch(url_str).unwrap();