Enum codeforces_api::requests::CFContestCommand [−][src]
Wrapper enum for all API methods of form contest.<method>
.
More details for the contest command can be found here.
Variants
Struct for sending contest.hacks
requests to the Codeforces API.
Returns list of hacks in the specified contest. Full information about hacks is available only after some time after the contest end. During the contest, a user can see only their own hacks.
If correctly parsed, the response object will be of type
responses::CFResult::CFHackVec
.
More details for the contest.hacks
command can be found
here.
Examples
let x = CFContestCommand::Hacks { contest_id: 1485, }; match x.get(api_key, api_secret) { Ok(CFResult::CFHackVec(v)) => { // your code here }, _ => { panic!("API request failed"); } }
Fields of Hacks
contest_id: i64
contestId of a contest (can be seen in the url of a contest, eg.
/contest/1485
).
Struct for sending contest.list
requests to the Codeforces API.
Returns information about all available contests.
If correctly parsed, the response object will be of type
responses::CFResult::CFContestVec
.
More details for the contest.list
command can be found
here.
Examples
let x = CFContestCommand::List { gym: Some(false), }; match x.get(api_key, api_secret) { Ok(CFResult::CFContestVec(v)) => { // your code here }, _ => { panic!("API request failed"); } }
Fields of List
Struct for sending contest.ratingChanges
requests to the Codeforces
API.
Returns rating changes after a specified contest.
If correctly parsed, the response object will be of type
responses::CFResult::CFRatingChangeVec
.
More details for the contest.ratingChanges
command can be found
here.
Examples
let x = CFContestCommand::RatingChanges { contest_id: 1485, }; match x.get(api_key, api_secret) { Ok(CFResult::CFRatingChangeVec(v)) => { // your code here }, _ => { panic!("API request failed"); } }
Fields of RatingChanges
contest_id: i64
contestId of a contest (can be seen in the url of a contest, eg.
/contest/1485
).
Struct for sending contest.standings
requests to the Codeforces API.
Returns a description of a specified contest as well as the requested part of the standings.
If correctly parsed, the response object will be of type
responses::CFResult::CFContestStandings
.
More details for the contest.standings
command can be found
here.
Examples
let x = CFContestCommand::Standings { contest_id: 1485, from: Some(1), count: Some(3), handles: Some(vec!["thud".to_string()]), room: None, show_unofficial: Some(false), }; match x.get(api_key, api_secret) { Ok(CFResult::CFContestStandings(s)) => { // your code here }, _ => { panic!("API request failed"); } }
Fields of Standings
contest_id: i64
contestId of a contest (can be seen in the url of a contest, eg.
/contest/1485
).
from: Option<i64>
1-based index of the standings row to start the ranklist (most recent first).
count: Option<i64>
Number of standing rows to return.
handles: Option<Vec<String>>
Vec of handles. No more than 10000 handles is allowed by Codeforces.
room: Option<i64>
If specified, then only participants from this room will be shown in the result. If not, all the participants will be shown.
show_unofficial: Option<bool>
If true, then all participants (virtual, out of competition) are shown. Otherwise, only official contestants are shown.
Struct for sending contest.status
requests to the Codeforces API.
Returns submissions for specified contest. Optionally can return submissions of specified user.
If correctly parsed, the response object will be of type
responses::CFResult::CFSubmissionVec
.
More details for the contest.status
command can be found
here.
Examples
let x = CFContestCommand::Status { contest_id: 1485, handle: None, from: Some(1), count: Some(3), }; match x.get(api_key, api_secret) { Ok(CFResult::CFSubmissionVec(v)) => { // your code here }, _ => { panic!("API request failed"); } }
Fields of Status
contest_id: i64
contestId of a contest (can be seen in the url of a contest, eg.
/contest/1485
).
handle: Option<String>
If specified, then only this user's submissions are returned.
from: Option<i64>
1-based index of the standings row to start the ranklist (most recent first).
count: Option<i64>
Number of submissions to return.
Trait Implementations
impl CFAPIRequestable for CFContestCommand
[src]
fn query_params(&self) -> Vec<(&'static str, String)>
[src]
fn method_name(&self) -> &'static str
[src]
fn get(&self, api_key: &str, api_secret: &str) -> Result<CFResult, Error>
[src]
fn get_raw(&self, api_key: &str, api_secret: &str) -> Result<String, Error>
[src]
impl Clone for CFContestCommand
[src]
fn clone(&self) -> CFContestCommand
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CFContestCommand
[src]
impl Eq for CFContestCommand
[src]
impl PartialEq<CFContestCommand> for CFContestCommand
[src]
fn eq(&self, other: &CFContestCommand) -> bool
[src]
fn ne(&self, other: &CFContestCommand) -> bool
[src]
impl StructuralEq for CFContestCommand
[src]
impl StructuralPartialEq for CFContestCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for CFContestCommand
[src]
impl Send for CFContestCommand
[src]
impl Sync for CFContestCommand
[src]
impl Unpin for CFContestCommand
[src]
impl UnwindSafe for CFContestCommand
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,