google/go-github — pull request #66 by zachlatta (2013-10-23 09:29:24+00:00)
Title: Add support for the Gitignore API.

This pull request adds support for the [Gitignore API](http://developer.github.com/v3/gitignore/).

The `GitignoresService` can be accessed with `client.Gitignores`. There are two functions available, `Gitignores.List` and `Gitignores.Get`. Everything is fully documented and tested.

Example usage:

```go
package main

import (
"fmt"
"github.com/zachlatta/go-github/github"
)

func main() {
client := github.NewClient(nil)

// List all available .gitignore templates.
availableTemplates, _, err := client.Gitignores.List()
if err != nil {
fmt.Println(err)
} else {
fmt.Println(availableTemplates)
}

// Retrieve and print a specific template's source.
template, _, err := client.Gitignores.Get("Go")
if err != nil {
fmt.Println(err)
} else {
fmt.Println(*template.Source)
}
}
```