https://github.com/df-mc/vote
Go library for accessing the minecraftpocket-servers.com voting API
https://github.com/df-mc/vote
df-mc go golang mcpe minecraft vote voting
Last synced: 5 months ago
JSON representation
Go library for accessing the minecraftpocket-servers.com voting API
- Host: GitHub
- URL: https://github.com/df-mc/vote
- Owner: df-mc
- License: mit
- Created: 2020-11-01T15:14:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-16T16:13:54.000Z (over 4 years ago)
- Last Synced: 2025-10-28T08:04:00.152Z (8 months ago)
- Topics: df-mc, go, golang, mcpe, minecraft, vote, voting
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
[](https://pkg.go.dev/github.com/df-mc/vote)
Usage of the vote package relies on a `*vote.Client` that may be constructed and used as such:
```go
// 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
[](https://discord.gg/U4kFWHhTNR)