mod client;
mod error;
pub use client::Client;
pub use error::Error;
pub const PROBLEM_CONTENT_LICENSE: &str = "CC BY-NC-SA 4.0";
pub const PROBLEM_CONTENT_LICENSE_URL: &str = "https://creativecommons.org/licenses/by-nc-sa/4.0/";
pub const PROBLEM_CONTENT_ATTRIBUTION: &str = "Problem content from Project Euler";
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Difficulty {
pub level: u8,
pub percentage: u8,
}
#[derive(Debug, PartialEq, Eq)]
pub struct ProblemSummary {
pub number: u16,
pub title: Box<str>,
pub solved_count: Option<u32>,
pub published_at: Option<Box<str>>,
pub canonical_url: Box<str>,
}
#[derive(Debug, PartialEq, Eq)]
pub struct ArchivePage {
pub page: u8,
pub problems: Vec<ProblemSummary>,
}
#[derive(Debug, PartialEq, Eq)]
pub struct RecentProblems {
pub problems: Vec<ProblemSummary>,
}
#[derive(Debug, PartialEq, Eq)]
pub struct ProblemCatalog {
pub problems: Vec<ProblemSummary>,
}
#[derive(Debug, PartialEq, Eq)]
pub struct Problem {
pub summary: ProblemSummary,
pub difficulty: Option<Difficulty>,
pub statement_html: Box<str>,
pub attribution: &'static str,
pub license: &'static str,
pub license_url: &'static str,
}
#[cfg(test)]
mod tests;