Documentation ¶
Index ¶
- func JoinValues(dst Values, srcs ...Values)
- type Client
- func (mw *Client) Block(user, expiry, reason string, v Values) (*Response, error)
- func (mw *Client) Delete(title, reason string, v Values) (*Response, error)
- func (mw *Client) Edit(title string, txt string, summ string, minor, create bool) (*Response, error)
- func (mw *Client) Get(v Values) (*Response, error)
- func (mw *Client) Login() error
- func (mw *Client) Move(from, to, reason string, v Values) (*Response, error)
- func (mw *Client) Post(v Values) (*Response, error)
- func (mw *Client) Protect(title, protection, expiry, reason string, v Values) (*Response, error)
- func (mw *Client) Query() *Query
- func (mw *Client) Read() *Query
- func (mw *Client) Token(names ...string) (tokens map[string]string, e error)
- type Error
- type Gen
- type LoginType
- type Query
- func (q *Query) Continue(cont ...string) bool
- func (q *Query) Do() (e error)
- func (q *Query) List(list string, v Values) *Query
- func (q *Query) Pages(v interface{}) error
- func (q *Query) Prop(prop string, v Values) *Query
- func (q *Query) Response() *Response
- func (q *Query) ReturnToPool()
- func (q *Query) With(v ...interface{}) *Query
- type QueryPage
- type ReadPage
- type Response
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { LoginType // contains filtered or unexported fields }
Client handles all requests to MediaWiki API
func (*Client) Edit ¶
func (mw *Client) Edit(title string, txt string, summ string, minor, create bool) (*Response, error)
Edit sends an edit action
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query builds a query action for API call
func (*Query) ReturnToPool ¶
func (q *Query) ReturnToPool()
ReturnToPool sets all contained data to default end adds a query builder to a pool
type QueryPage ¶
type QueryPage struct { PageID int64 `json:"pageid"` NS int `json:"ns"` Title string `json:"title"` Missing bool `json:"missing,omitempty"` }
QueryPage holds basic data returned by a query request
type ReadPage ¶
type ReadPage struct { QueryPage Revisions []struct { Slots struct { Main struct { ContentModel string `json:"contentmodel"` Content string `json:"content"` } `json:"main"` } `json:"slots"` } `json:"revisions"` }
ReadPage holds returned data with page content
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response contains json-encoded API result
func (*Response) ReturnToPool ¶ added in v0.3.0
func (r *Response) ReturnToPool()
ReturnToPool sets all contained data to default end adds a response to a pool
Click to show internal directories.
Click to hide internal directories.