Skip to content
/ vote Public

Go library for accessing the minecraftpocket-servers.com voting API

License

Notifications You must be signed in to change notification settings

df-mc/vote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vote

Go library for accessing the minecraftpocket-servers.com voting API

Getting started

The vote library may be imported using go get:

go get github.com/df-mc/vote

Usage

Go Reference

Usage of the vote package relies on a *vote.Client that may be constructed and used as such:

// var key string

c := vote.NewClient(key)
voted, err := c.Voted("Steve")
if err != nil {
	panic(err)
}
if !voted {
	fmt.Println("Steve has not yet voted")
	return
}
claimed, err := c.Claim("Steve")
if err != nil {
	panic(err)
}
if !claimed {
	fmt.Println("Steve has already claimed his vote")
	return
}
fmt.Println("Steve claimed his vote successfully")

The errors returned by methods on *vote.Client only return HTTP errors.

Contact

Discord Banner 2

About

Go library for accessing the minecraftpocket-servers.com voting API

Topics

Resources

License

Stars

Watchers

Forks

Languages