2020-08-13 20:14:25 +00:00
|
|
|
package serverapi
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
// TPS is a Minecraft server's relative performance
|
|
|
|
type TPS struct {
|
|
|
|
Average float64 `json:"average"`
|
|
|
|
History []float64 `json:"history"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// TPS returns TPS from a ServerAPI instance
|
|
|
|
func (c *Client) TPS() (tps *TPS, err error) {
|
2020-10-06 03:21:20 +00:00
|
|
|
return tps, c.jsonGET(fmt.Sprintf("%s/tps", c.endpoint), &tps)
|
2020-08-13 20:14:25 +00:00
|
|
|
}
|