mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-23 07:01:35 +00:00
Commit from m3o/m3o action
This commit is contained in:
35
search/search.go
Executable file
35
search/search.go
Executable 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user