An open API service indexing awesome lists of open source software.

https://github.com/accelbyte/ic-go-sdk


https://github.com/accelbyte/ic-go-sdk

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# ic-go-sdk

This is AccelByte's IC Go SDK for integrating with IC in Go projects.

## Usage

### Importing package

```go
import "github.com/AccelByte/ic-go-sdk"
```

### Creating default IC client

```go
cfg := &iam.Config{
BaseURL: "",
ClientID: "",
ClientSecret: "",
}

client := iam.NewDefaultClient(cfg)

cfg := &ic.Config{
BaseURL: "",
ClientID: "",
ClientSecret: "",
}
client := ic.NewDefaultClient(cfg)
```

### Validate config

```go
_, err := client.ClientToken()
if err != nil {
logrus.Fatalf("ic-go-sdk start err: %v \n", err)
}
```

### Example:
1. replace the placeholder in ```example/example.go```
2. ```go build example.go```