Suggestion: Add working example to README
ErikKalkoken opened this issue · 1 comments
ErikKalkoken commented
As a go beginner I was struggling a bit to get a very simple example to work. One reason might be that there no working example in the README and all the one has to fill in a lot of gaps with the current examples.
To help people get acquainted more easily with this nice library, I would suggest to add this simple example to the README:
package main
import (
"context"
"fmt"
"github.com/antihax/goesi"
)
func main() {
// create ESI client
client := goesi.NewAPIClient(nil, "name@example.com")
// call Status endpoint
status, _, _ := client.ESI.StatusApi.GetStatus(context.Background(), nil)
// print current status
fmt.Println("Players online: ", status.Players)
}
antihax commented
Done, thanks