divolt

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckServerStatus

func CheckServerStatus(sesh *Session) error

func SendDownloadMessage

func SendDownloadMessage(sesh *Session, url string, quality uint) error

Types

type Message

type Message struct {
	Type    string `json:"type"`
	Channel string `json:"channel"`
	Author  string `json:"author"`

	ID      string `json:"_id"`
	Content string `json:"content"`
	Embeds  []struct {
		Description string `json:"description"`
	} `json:"embeds"`
}

func GetUploadMessage

func GetUploadMessage(sesh *Session) (Message, error)

type RequestInfo

type RequestInfo struct {
	Method string
	Path   string
	Body   io.Reader
}

type Session

type Session struct {
	Client *http.Client
	Config *config.Config
}

func NewSession

func NewSession(cfg *config.Config) Session

func (*Session) AuthenticatedRequest

func (sesh *Session) AuthenticatedRequest(info RequestInfo) (*http.Response, error)

func (*Session) Login

func (sesh *Session) Login() error

func (*Session) Logout

func (sesh *Session) Logout() error

type UserStatus

type UserStatus struct {
	JoinedAt string `json:"joined_at"`
	Timeout  string `json:"timeout"`
}

Jump to

Keyboard shortcuts

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