vrchat

package module
v0.0.0-...-cff7185 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 12 Imported by: 0

README

vrchat-go

An unofficial Go module for VRChat API. (WIP)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Err2FAFailed         = errors.New("2FA verification failed")
	ErrAuthTokenNotFound = errors.New("AuthToken not found")
)

Functions

This section is empty.

Types

type Map

type Map map[string]interface{}

type Options

type Options struct {
	ClientUserAgent string
	Timeout         time.Duration
	RetryCount      int
	ProxyURL        string
}

type User

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

func (*User) CurrentUser

func (v *User) CurrentUser() (user objects.CurrentUser, err error)

func (*User) FriendStatus

func (v *User) FriendStatus(uid string) (isFriend, outgoingRequest, incomingRequest bool, err error)

func (*User) Friends

func (v *User) Friends(offline bool) (list []objects.LimitedUser, err error)

type VRCGO

type VRCGO struct {
	sync.Mutex

	User     User
	Pipeline *websocket.Pipeline
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *VRCGO

func NewClientWithOptions

func NewClientWithOptions(opt Options) *VRCGO

func (*VRCGO) AuthToken

func (v *VRCGO) AuthToken() (token string, err error)

func (*VRCGO) CallEvent

func (v *VRCGO) CallEvent(name string, param interface{})

func (*VRCGO) Cookies

func (v *VRCGO) Cookies() ([]*http.Cookie, error)

func (*VRCGO) Health

func (v *VRCGO) Health() (bool, error)

func (*VRCGO) Login

func (v *VRCGO) Login(username, password string) (user objects.CurrentUser, err error)

func (*VRCGO) LoginWithSteam

func (v *VRCGO) LoginWithSteam(steamTicket string) (user objects.CurrentUser, err error)

func (*VRCGO) Logout

func (v *VRCGO) Logout() error

func (*VRCGO) RegisterEvent

func (v *VRCGO) RegisterEvent(name string, callback func(interface{}))

func (*VRCGO) RemoteConfig

func (v *VRCGO) RemoteConfig() (config objects.RemoteConfig, err error)

func (*VRCGO) SystemTime

func (v *VRCGO) SystemTime() (t time.Time, err error)

func (*VRCGO) VerifyAuthToken

func (v *VRCGO) VerifyAuthToken() (token string, err error)

func (*VRCGO) VerifyOTP

func (v *VRCGO) VerifyOTP(code string) error

func (*VRCGO) VerifyTOTP

func (v *VRCGO) VerifyTOTP(code string) error

func (*VRCGO) Visits

func (v *VRCGO) Visits() (int, error)

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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