Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { Username string // TokenUID is needed when uploading files TokenUID string // R is a imroc/req.Req that allows to perform requests with the proper cookies set. R *req.Req }
Credentials object that holds the necessary information to make a request. It does not save the user password, only a tooken and cookies.
func GetInstance ¶
func GetInstance(creds ...string) *Credentials
GetInstance creates and returns a new Credentials instance. It accepts at most 2 parameters: email and password. If any of them are omitted the program will prompt the user to input them through stdout. Note that you can not omit the email and not the password. It panics when login fails.
type TokenNotFound ¶
type TokenNotFound struct{}
TokenNotFound error returned when the parser can't find the TokenUID, this usually means that the login failed or cookies expired
func (*TokenNotFound) Error ¶
func (*TokenNotFound) Error() string
Click to show internal directories.
Click to hide internal directories.