mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
36 lines
623 B
Go
Executable File
36 lines
623 B
Go
Executable File
package space
|
|
|
|
import (
|
|
"go.m3o.com/client"
|
|
)
|
|
|
|
func NewSpaceService(token string) *SpaceService {
|
|
return &SpaceService{
|
|
client: client.NewClient(&client.Options{
|
|
Token: token,
|
|
}),
|
|
}
|
|
}
|
|
|
|
type SpaceService struct {
|
|
client *client.Client
|
|
}
|
|
|
|
// Vote to have the Space api launched faster!
|
|
func (t *SpaceService) Vote(request *VoteRequest) (*VoteResponse, error) {
|
|
|
|
rsp := &VoteResponse{}
|
|
return rsp, t.client.Call("space", "Vote", request, rsp)
|
|
|
|
}
|
|
|
|
type VoteRequest struct {
|
|
// optional message
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type VoteResponse struct {
|
|
// response message
|
|
Message string `json:"message"`
|
|
}
|