bunch of API changes

This commit is contained in:
2020-05-05 22:03:34 +02:00
parent e89db822cc
commit e811d0a54f
22 changed files with 12289 additions and 352 deletions

View File

@@ -8,12 +8,12 @@ type Recaptcha struct {
// GetRecaptcha gets the reCaptcha site key from the pixelapi server. If
// reCaptcha is disabled the key will be empty
func (p *PixelAPI) GetRecaptcha() (resp Recaptcha, err error) {
return resp, p.jsonRequest("GET", p.apiEndpoint+"/misc/recaptcha", &resp)
return resp, p.jsonRequest("GET", p.apiEndpoint+"/misc/recaptcha", &resp, false)
}
// GetMiscViewToken requests a viewtoken from the server. The viewtoken is valid
// for a limited amount of time and can be used to add views to a file.
// Viewtokens can only be requested from localhost
func (p *PixelAPI) GetMiscViewToken() (resp string, err error) {
return resp, p.jsonRequest("GET", p.apiEndpoint+"/misc/viewtoken", &resp)
return resp, p.jsonRequest("GET", p.apiEndpoint+"/misc/viewtoken", &resp, false)
}