Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-02 08:27:08 +00:00
parent 59088be869
commit dc4ea3ec58
20 changed files with 819 additions and 729 deletions

35
search/search.go Executable file
View File

@@ -0,0 +1,35 @@
package search
import (
"go.m3o.com/client"
)
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"`
}