pub struct Gitignore {
pub client: Client,
}
Fields§
§client: Client
Implementations§
source§impl Gitignore
impl Gitignore
sourcepub async fn get_all_templates(
&self
) -> Result<Response<Vec<String>>, ClientError>
pub async fn get_all_templates( &self ) -> Result<Response<Vec<String>>, ClientError>
Get all gitignore templates.
This function performs a GET
to the /gitignore/templates
endpoint.
List all templates available to pass as an option when creating a repository.
FROM: https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates
sourcepub async fn get_all_all_templates(
&self
) -> Result<Response<Vec<String>>, ClientError>
pub async fn get_all_all_templates( &self ) -> Result<Response<Vec<String>>, ClientError>
Get all gitignore templates.
This function performs a GET
to the /gitignore/templates
endpoint.
As opposed to get_all_templates
, this function returns all the pages of the request at once.
List all templates available to pass as an option when creating a repository.
FROM: https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates
sourcepub async fn get_template(
&self,
name: &str
) -> Result<Response<GitignoreTemplate>, ClientError>
pub async fn get_template( &self, name: &str ) -> Result<Response<GitignoreTemplate>, ClientError>
Get a gitignore template.
This function performs a GET
to the /gitignore/templates/{name}
endpoint.
The API also allows fetching the source of a single template. Use the raw media type to get the raw contents.
FROM: https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template
Parameters:
name: &str