Versions in this module Expand all Collapse all v1 v1.1.2 Feb 2, 2020 v1.1.1 Jan 26, 2020 Changes in this version + const AssertBot + const AssertNone + const AssertUser + const CSRFToken + const DefaultUserAgent + const DeleteGlobalAccountToken + const LoginToken + const PatrolToken + const RollbackToken + const SetGlobalAccountStatusToken + const UserRightsToken + const WatchToken + var ErrAPIBusy = errors.New("the API is too busy. Try again later") + var ErrEditNoChange = errors.New("edit successful, but did not change page") + var ErrNoArgs = errors.New("no arguments passed") + var ErrPageNotFound = errors.New("wiki page not found") + type APIError struct + Code string + Info string + func (e APIError) Error() string + type APIWarnings []struct + func (w APIWarnings) Error() string + type BriefRevision struct + Content string + Error error + PageID string + Timestamp string + type CaptchaError struct + ID string + Mime string + Question string + Type string + URL string + func (e CaptchaError) Error() string + type Client struct + Assert assertType + Maxlag Maxlag + Tokens map[string]string + UserAgent string + func New(inURL, userAgent string) (*Client, error) + func (w *Client) Download(filename string) (io.ReadCloser, error) + func (w *Client) DownloadToFile(remote, local string, overwrite bool) error + func (w *Client) DumpCookies() []*http.Cookie + func (w *Client) Edit(p params.Values) error + func (w *Client) Get(p params.Values) (*jason.Object, error) + func (w *Client) GetPageByID(pageID string) (content string, timestamp string, err error) + func (w *Client) GetPageByName(pageName string) (content string, timestamp string, err error) + func (w *Client) GetPagesByID(pageIDs ...string) (pages map[string]BriefRevision, err error) + func (w *Client) GetPagesByName(pageNames ...string) (pages map[string]BriefRevision, err error) + func (w *Client) GetRaw(p params.Values) ([]byte, error) + func (w *Client) GetToken(tokenName string) (string, error) + func (w *Client) LoadCookies(cookies []*http.Cookie) + func (w *Client) LocalizedNamespace(canonical string) (string, error) + func (w *Client) Login(username, password string) error + func (w *Client) Logout() error + func (w *Client) Namespaces() (map[string]string, error) + func (w *Client) NewQuery(p params.Values) *Query + func (w *Client) OAuth(consumerToken, consumerSecret, accessToken, accessSecret string) error + func (w *Client) Post(p params.Values) (*jason.Object, error) + func (w *Client) PostRaw(p params.Values) ([]byte, error) + func (w *Client) PostToken(tokenName string) (string, error) + func (w *Client) Replace(old, new string, p params.Values) error + func (w *Client) SetDebug(wr io.Writer) + func (w *Client) SetHTTPTimeout(timeout time.Duration) + func (w *Client) Upload(file io.Reader, filename string, p params.Values) (*jason.Object, error) + func (w *Client) Version() (*semver.Version, error) + type Maxlag struct + On bool + Retries int + Timeout string + type Query struct + func (q *Query) Err() error + func (q *Query) Next() (done bool) + func (q *Query) Resp() *jason.Object