client

package
v0.0.0-...-2b433ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIUsersPatchCustomData

type APIUsersPatchCustomData struct {
	CustomData AdditionalUserInformation `json:"customData"`
}

type APIUsersPostReq

type APIUsersPostReq struct {
	PrimaryPhone string `json:"primaryPhone"`
	PrimaryEmail string `json:"primaryEmail"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Name         string `json:"name"`
}

type APIUsersPostRes

type APIUsersPostRes struct {
	Id string `json:"id"`
}

type APIUsersSearchRes

type APIUsersSearchRes struct {
	Email    string `json:"primaryEmail"`
	Id       string `json:"id"`
	UserName string `json:"username"`
}

type AccessTokenResp

type AccessTokenResp struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

type AdditionalUserInformation

type AdditionalUserInformation struct {
	Profession       string `json:"profession"`
	JobTitle         string `json:"job_title"`
	Institution      string `json:"institution"`
	Address          string `json:"address"`
	SecondaryAddress string `json:"secondary_address"`
	City             string `json:"city"`
	State            string `json:"state"`
	Region           string `json:"region"`
	Country          string `json:"country"`
	Zipcode          string `json:"zipcode"`
	Subscribed       bool   `json:"subscribed"`
	ResearchInterest string `json:"research_interest"`
	Phone            string `json:"phone"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string) *Client

NewClient creates a new instance of the Client struct. It takes an endpoint string as a parameter and returns a pointer to the Client struct.

func (*Client) AccessToken

func (clnt *Client) AccessToken(
	user, pass, resource string,
) (*AccessTokenResp, error)

func (*Client) AddCustomUserInformation

func (clnt *Client) AddCustomUserInformation(
	token,
	userId string,
	user *APIUsersPatchCustomData,
) error

func (*Client) CheckUser

func (clnt *Client) CheckUser(
	token string, email string,
) (bool, string, error)

func (*Client) CheckUserWithUserName

func (clnt *Client) CheckUserWithUserName(
	token, username string,
) (bool, string, error)

func (*Client) CreateUser

func (clnt *Client) CreateUser(
	token string,
	user *APIUsersPostReq,
) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL