Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bithavoc/id-go-client
Go client library for id.bithavoc.io
https://github.com/bithavoc/id-go-client
Last synced: about 14 hours ago
JSON representation
Go client library for id.bithavoc.io
- Host: GitHub
- URL: https://github.com/bithavoc/id-go-client
- Owner: bithavoc
- License: mit
- Created: 2014-09-02T23:18:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-29T23:54:03.000Z (about 9 years ago)
- Last Synced: 2024-06-21T11:03:41.518Z (5 months ago)
- Language: Go
- Homepage: http://id.bithavoc.io
- Size: 207 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bithavoc's Identity Client for Golang
Golang client for Bithavoc.io's Identity hub.
See [id.bithavoc.io](http://id.bithavoc.io)## Setup
`go get github.com/bithavoc/id-go-client`
## Initialization
```go
import bithavocid "github.com/bithavoc/id-go-client"
func main() {
client := bithavocid.NewClient("")
}```
## SignUp
SignUp for a new account.
Example:
```go
err := client.SignUp(bithavocid.SignUp{
Email: "[email protected]",
Password: "msdos",
Fullname: "Bill G",
})if err != nil {
fmt.Printf("Error signing up: %s\n", err.Error())
}```
### Confirm
Confirm your email address.
Example:
```go
authCode, err := client.Confirm("")if err != nil {
fmt.Printf("Error confirming account: %s\n", err.Error())
} else {
fmt.Printf("Authorization Code: %s\n", authCode.Code)
}```
### Login
Log-in into your account.
Example:
```go
authCode, err := client.LogIn(bithavocid.Credentials{
Email: "[email protected]",
Password: "msdos",
})if err != nil {
fmt.Printf("Error: %s\n", err.Error())
} else {
fmt.Printf("Authorization Code: %s\n", authCode.Code)
}```
## Tests
`go test`
## License
MIT (See LICENSE)