Struct octorust::licenses::Licenses [−][src]
pub struct Licenses {
pub client: Client,
}
Fields
client: Client
Implementations
pub async fn get_all_commonly_used(
&self,
featured: bool,
per_page: i64,
page: i64
) -> Result<Vec<LicenseSimple>>
pub async fn get_all_commonly_used(
&self,
featured: bool,
per_page: i64,
page: i64
) -> Result<Vec<LicenseSimple>>
Get all commonly used licenses.
This function performs a GET
to the /licenses
endpoint.
FROM: https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses
Parameters:
featured: bool
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
Get all commonly used licenses.
This function performs a GET
to the /licenses
endpoint.
As opposed to get_all_commonly_used
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses
Get a license.
This function performs a GET
to the /licenses/{license}
endpoint.
FROM: https://docs.github.com/rest/reference/licenses#get-a-license
Parameters:
license: &str
Get the license for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/license
endpoint.
This method returns the contents of the repository’s license file, if one is detected.
Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
FROM: https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository
Parameters:
owner: &str
repo: &str
Auto Trait Implementations
impl !RefUnwindSafe for Licenses
impl !UnwindSafe for Licenses
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more