<commit_before># go-octokit

Go toolkit for the GitHub API.

# Hypermedia-driven client

## Show a user

```go
package main

import "github.com/octokit/go-octokit/octokit"

func main() {
    client := octokit.NewClient()

    user, result := client.User("jingweno") // Internally it's hypermedia-driven
    if result.HasError() {
      // Handle error
    }
    // Do something with user
}
```

or

```go
package main

import "github.com/octokit/go-octokit/octokit"

func main() {
    client := octokit.NewClient()

    // Get root
    root, result := client.Root()
    if result.HasError() {
      // Handle error
    }

    // Get a user
    userURL, _ := root.UserURL.Expand(octokit.M{"user": "jingweno"})
    requester := client.Requester(userURL)
    user := new(User)
    result = requester.Get(user)
    if result.HasError() {
      // Handle error
    }
    // Do something with user
}
```

## Release Notes

See [Releases](https://github.com/octokit/go-octokit/releases).

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## License

go-octokit is released under the MIT license. See
[LICENSE.md](https://github.com/octokit/go-octokit/blob/master/LICENSE.md).<commit_msg>Add pagination example to README<commit_after># go-octokit

Go toolkit for the GitHub API.

# Hypermedia-driven client

## Show a user

```go
package main

import "github.com/octokit/go-octokit/octokit"

func main() {
    client := octokit.NewClient()

    user, result := client.User("jingweno") // Internally it's hypermedia-driven
    if result.HasError() {
      // Handle error
    }
    // Do something with user
}
```

or

```go
package main

import "github.com/octokit/go-octokit/octokit"

func main() {
    client := octokit.NewClient()

    // Get root
    root, result := client.Root()
    if result.HasError() {
      // Handle error
    }

    // Get a user
    userURL, _ := root.UserURL.Expand(octokit.M{"user": "jingweno"})
    requester := client.Requester(userURL)
    user := new(User)
    result = requester.Get(user)
    if result.HasError() {
      // Handle error
    }
    // Do something with user
}
```

## Pagination

```go
package main

import "github.com/octokit/go-octokit/octokit"

func main() {
    client := octokit.NewClient()
    users, result := client.AllUsers(0)
    if result.HasError() {
      // Handle error
    }
    // Do something with users

    // next page
    result = client.Requester(result.NextPage).Get(&users)
    if result.HasError() {
      // Handle error
    }
    // Do something with users
}

```

## Release Notes

See [Releases](https://github.com/octokit/go-octokit/releases).

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## License

go-octokit is released under the MIT license. See
[LICENSE.md](https://github.com/octokit/go-octokit/blob/master/LICENSE.md).
{'fraction_non_alphanumeric': 0.13900219642296832, 'fraction_numerical': 0.0034515218073423283, 'mean_word_length': 2.8878048780487804, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671193', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1073, 'n_words': 288}