https://github.com/weavc/crusch
Authenticate & query Githubs API with crusch
https://github.com/weavc/crusch
api authentication github golang json
Last synced: 6 months ago
JSON representation
Authenticate & query Githubs API with crusch
- Host: GitHub
- URL: https://github.com/weavc/crusch
- Owner: weavc
- License: mit
- Created: 2020-02-15T13:27:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T00:01:25.000Z (about 4 years ago)
- Last Synced: 2025-08-15T12:36:04.289Z (11 months ago)
- Topics: api, authentication, github, golang, json
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://pkg.go.dev/github.com/weavc/crusch)
Crusch is a lightweight libary which provides tools for Github Apps to communicate with Githubs V3 API, without too much unnecessary hassle.
This libary provides a simple client structure to make requests to Githubs API. Clients aid with adding and creating the required authorization headers, keeping track of when they might need to be renewed and other small helper methods.
If you are looking for something more complete then [`go-github`](https://github.com/google/go-github) is probably for you. [`go-github`](https://github.com/google/go-github) is a more complete libary with types, seperate methods and bindings for every request github offers, which for what I was working on, was too complicated and quite annoying to work with when all I wanted was something simple, hence crusch.
### Usage
```go
import "github.com/weavc/crusch"
```
basic installation example
```go
var v []map[string]interface{}
authorizer, err := crusch
.NewInstallationAuth(, , )
res, err := crusch.Client.Get(
authorizer,
"/repos/weavc/crusch/issues",
"assignee=weavc&state=open",
&v)
```
new client
```go
httpClient := &http.Client{}
client := crusch.NewGithubClient("api.github.com", "https")
client.SetHTTPClient(httpClient)
```