Returns information about a gitignore template
GET
/gitignore/templates/{name}
const url = 'https://gitea.com/api/v1/gitignore/templates/example';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.com/api/v1/gitignore/templates/example \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
Name of the template
Responses
Section titled “Responses”GitignoreTemplateInfo
Media typeapplication/json
GitignoreTemplateInfo name and text of a gitignore template
object
name
string
source
string
Examplegenerated
{ "name": "example", "source": "example"}APINotFound is a not found empty response
Media typeapplication/json