add banner ad view counting
This commit is contained in:
@@ -2,6 +2,7 @@ package pixelapi
|
||||
|
||||
import (
|
||||
"io"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -36,3 +37,9 @@ type FileInfo struct {
|
||||
func (p *PixelAPI) GetFileInfo(id string) (resp FileInfo, err error) {
|
||||
return resp, p.jsonRequest("GET", p.apiEndpoint+"/file/"+id+"/info", &resp)
|
||||
}
|
||||
|
||||
func (p *PixelAPI) PostFileView(id, viewtoken string) (err error) {
|
||||
vals := url.Values{}
|
||||
vals.Set("token", viewtoken)
|
||||
return p.form("POST", p.apiEndpoint+"/file/"+id+"/view", vals, nil, true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user