Expand description

Module containing different get request to the uHunt API

The requests are used to get certain data and are always organized into structs (or collections of a struct). This API request get data from the Universidad de Valladolid competitive programming judge.

This library can be used both in Rust and in python, as building it with maturin develop creates a python module.

Structs

Problem 🔒
A struct holding the data asociated with a problem
Submission 🔒
A Struct holding data for a problem submission
UserRank 🔒
A struct holding data for the position in the ranking of a user
A struct holding data for an user’s submissions

Functions

Returns the URL of a pdf for a certain problem number.
Returns the problem with number num, or an empty struct if it does not exist. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().
Returns the problem with id pid, or an empty struct if it does not exist. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().
Returns a Vector containing the Rank of the above users over the user with id uid, the user with that id and the below users, below the asme user. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().
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().
Returns the user’s id number by searching using the stated username. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().
Returns the user’s last submissions to any problem. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().
Returns a HashMap containing the submissions the speccified user to the selected problem. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().