Trait github_rs::github::Misc
[−]
[src]
pub trait Misc { fn get_meta(&self) -> Result<Meta>; fn get_rate_limit(&self) -> Result<RateLimit>; fn get_gitignore_templates(&self) -> Result<Vec<String>>; fn get_gitignore_templates_lang(&self, lang: &str) -> Result<GitIgnore>; fn post_markdown(&self, data: Markdown) -> Result<HTML>; fn post_markdown_raw(&self, data: Markdown) -> Result<HTML>; }
Trait used to specify function hearders for endpoints grouped under Miscellaneous in the Github API specification
Required Methods
fn get_meta(&self) -> Result<Meta>
Request Type:
GET
Endpoint:
/meta
Description
Returns a Meta
struct which contains information about the Github service
fn get_rate_limit(&self) -> Result<RateLimit>
Request Type:
GET
Endpoint:
/rate_limit
Description
Returns a RateLimit struct to allow the user to know how many requests they can still make. Note hiting this endpoint with a request does not count against that limit.
fn get_gitignore_templates(&self) -> Result<Vec<String>>
Request Type:
GET
Endpoint:
/gitignore/templates
Description
Returns a vector of the languages that have gitignore templates on Github.
fn get_gitignore_templates_lang(&self, lang: &str) -> Result<GitIgnore>
Request Type:
GET
Endpoint:
/gitignore/templates/:lang
Description
Returns a GitIgnore
struct that has the string for the gitignore file and the language as
part of it.
fn post_markdown(&self, data: Markdown) -> Result<HTML>
Request Type:
POST
Endpoint:
/markdown
Description
Returns a rendered version of the Markdown
sent to Github as HTML
.
fn post_markdown_raw(&self, data: Markdown) -> Result<HTML>
Request Type:
POST
Endpoint:
/markdown/raw
Description
Returns a rendered version of the markdown posted to it. This expects the request to not be JSON so right now this function is broken until it can be updated to work properly.
Implementors
impl Misc for Client