chore: Adds login and user creation support to the API.
This commit is contained in:
parent
96833b238b
commit
843cd34785
13 changed files with 683 additions and 12 deletions
21
apiclient/apiclient.go
Normal file
21
apiclient/apiclient.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package apiclient
|
||||
|
||||
import "git.terah.dev/imterah/hermes/apiclient/users"
|
||||
|
||||
type HermesAPIClient struct {
|
||||
URL string
|
||||
}
|
||||
|
||||
/// Users
|
||||
|
||||
func (api *HermesAPIClient) UserGetRefreshToken(username *string, email *string, password string) (string, error) {
|
||||
return users.GetRefreshToken(api.URL, username, email, password)
|
||||
}
|
||||
|
||||
func (api *HermesAPIClient) UserGetJWTFromToken(refreshToken string) (string, error) {
|
||||
return users.GetJWTFromToken(api.URL, refreshToken)
|
||||
}
|
||||
|
||||
func (api *HermesAPIClient) UserCreate(fullName, username, email, password string, isBot bool) (string, error) {
|
||||
return users.CreateUser(api.URL, fullName, username, email, password, isBot)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue