Function u_interface::get_submissions_problem
source · [−]pub(crate) async fn get_submissions_problem(
pid: u16,
start: u32,
end: u32
) -> Result<Vec<Submission>, ExitFailure>
Expand description
Returns a vector containing the submissions to a certain problem in
a certain timeframe. This function is async, that means it has to be
called inside an async function/method or using tokio::Runtime.block_on()
.
Arguments
pid
- An unsigned, 16 bit number indicating the id of the problem.start
- An unsigned, 32 bit number indicating the start of the timeframe, stated in Unix timestamp.end
- An unsigned, 32 bit number indicating the end of the timeframe, stated in Unix timestamp.
Examples
// Returns the submisions to problem with id 403, from 01/01/2023 - 12:00 to
// 01/02/2023 - 12:00
let sub: Vec<Submission> = get_submissions_problem(403, 1672531200, 1675209600).await?;