Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-19 18:01:25 +00:00
parent 95f8372cb9
commit 7a39dbb5ad
19 changed files with 1116 additions and 1169 deletions

View File

@@ -8,7 +8,6 @@ type Emoji interface {
Find(*FindRequest) (*FindResponse, error)
Flag(*FlagRequest) (*FlagResponse, error)
Print(*PrintRequest) (*PrintResponse, error)
Send(*SendRequest) (*SendResponse, error)
}
func NewEmojiService(token string) *EmojiService {
@@ -48,14 +47,6 @@ func (t *EmojiService) Print(request *PrintRequest) (*PrintResponse, error) {
}
// Send an emoji to anyone via SMS. Messages are sent in the form '<message> Sent from <from>'
func (t *EmojiService) Send(request *SendRequest) (*SendResponse, error) {
rsp := &SendResponse{}
return rsp, t.client.Call("emoji", "Send", request, rsp)
}
type FindRequest struct {
// the alias code e.g :beer:
Alias string `json:"alias"`
@@ -85,17 +76,3 @@ type PrintResponse struct {
// text with rendered emojis
Text string `json:"text"`
}
type SendRequest struct {
// the name of the sender from e.g Alice
From string `json:"from"`
// message to send including emoji aliases
Message string `json:"message"`
// phone number to send to (including international dialing code)
To string `json:"to"`
}
type SendResponse struct {
// whether or not it succeeded
Success bool `json:"success"`
}