This is golang client for accessing Mediawiki API endpoints, such as REST API and Actions API. Purpose of this package is to provide some kind of SDK like abstraction for developers. Intention here take away headache of parsing JSON responses and keeping track of API endpoints to provide clear and easy to use way for access to the Mediawiki data.
Small example of getting page meta data:
client := mediawiki.NewClient("https://en.wikipedia.org/") // creating the client
ctx := context.Background() // getting context instance
meta, err := client.PageMeta(ctx, "Pet_door") // accessing "Pet_door" page meta data
if err != nil {
log.Panic(err)
}
fmt.Println(meta)