pub enum CFBlogEntryCommand {
Comments {
blog_entry_id: i64,
},
View {
blog_entry_id: i64,
},
}
Expand description
Wrapper enum for all API methods of form blogEntry.<method>
.
More details for the blogEntry command can be found here.
Variants§
Comments
Struct for sending blogEntry.comments
requests to the Codeforces API.
Returns a list of comments on a specified blog entry.
If correctly parsed, the response object will be of type
responses::CFResult::CFCommentVec
.
More details for the blogEntry.comments
command can be found
here.
§Examples
let x = CFBlogEntryCommand::Comments {
blog_entry_id: 82347,
};
match x.get(api_key, api_secret) {
Ok(CFResult::CFCommentVec(v)) => {
// your code here
},
_ => {
panic!("API request failed");
}
}
Fields
blog_entry_id: i64
blogEntryId of a blog (can be seen in the url of a blog, eg.
/blog/entry/82347
).
View
Struct for sending blogEntry.view
requests to the Codeforces API.
Returns a specified blog entry.
If correctly parsed, the response object will be of type
responses::CFResult::CFBlogEntry
.
More details for the blogEntry.view
command can be found
here.
§Examples
let x = CFBlogEntryCommand::View {
blog_entry_id: 82347,
};
match x.get(api_key, api_secret) {
Ok(CFResult::CFBlogEntry(e)) => {
// your code here
},
_ => {
panic!("API request failed");
}
}
Fields
blog_entry_id: i64
blogEntryId of a blog (can be seen in the url of a blog, eg.
/blog/entry/82347
).
Trait Implementations§
Source§impl CFAPIRequestable for CFBlogEntryCommand
impl CFAPIRequestable for CFBlogEntryCommand
Source§fn query_params(&self) -> Vec<(&'static str, String)>
fn query_params(&self) -> Vec<(&'static str, String)>
Source§fn method_name(&self) -> &'static str
fn method_name(&self) -> &'static str
Source§impl Clone for CFBlogEntryCommand
impl Clone for CFBlogEntryCommand
Source§fn clone(&self) -> CFBlogEntryCommand
fn clone(&self) -> CFBlogEntryCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CFBlogEntryCommand
impl Debug for CFBlogEntryCommand
Source§impl PartialEq for CFBlogEntryCommand
impl PartialEq for CFBlogEntryCommand
impl Copy for CFBlogEntryCommand
impl Eq for CFBlogEntryCommand
impl StructuralPartialEq for CFBlogEntryCommand
Auto Trait Implementations§
impl Freeze for CFBlogEntryCommand
impl RefUnwindSafe for CFBlogEntryCommand
impl Send for CFBlogEntryCommand
impl Sync for CFBlogEntryCommand
impl Unpin for CFBlogEntryCommand
impl UnwindSafe for CFBlogEntryCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.