Files
m3o-go/search/search.go
2021-12-29 13:41:36 +00:00

40 lines
701 B
Go
Executable File

package search
import (
"go.m3o.com/client"
)
type Search interface {
Vote(*VoteRequest) (*VoteResponse, error)
}
func NewSearchService(token string) *SearchService {
return &SearchService{
client: client.NewClient(&client.Options{
Token: token,
}),
}
}
type SearchService struct {
client *client.Client
}
// Vote to have the Search api launched faster!
func (t *SearchService) Vote(request *VoteRequest) (*VoteResponse, error) {
rsp := &VoteResponse{}
return rsp, t.client.Call("search", "Vote", request, rsp)
}
type VoteRequest struct {
// optional message
Message string `json:"message"`
}
type VoteResponse struct {
// response message
Message string `json:"message"`
}