Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6d42a230d1 | |||
7166300503 |
@ -82,6 +82,7 @@ func (c *Client) IndexDirectMessages(ctx context.Context, otherUserID string, re
|
||||
query.Add("since_id", req.SinceID.String())
|
||||
}
|
||||
}
|
||||
httpReq.URL.RawQuery = query.Encode()
|
||||
|
||||
var resp IndexDirectMessagesResponse
|
||||
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
||||
@ -127,7 +128,7 @@ func (c *Client) CreateDirectMessage(ctx context.Context, m *Message) (*Message,
|
||||
}
|
||||
|
||||
var resp struct {
|
||||
*Message `json:"message"`
|
||||
*Message `json:"direct_message"`
|
||||
}
|
||||
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
||||
if err != nil {
|
||||
|
21
json.go
21
json.go
@ -146,15 +146,18 @@ const (
|
||||
|
||||
// Attachment is a GroupMe message attachment, returned in JSON API responses
|
||||
type Attachment struct {
|
||||
Type attachmentType `json:"type,omitempty"`
|
||||
Loci [][]int `json:"loci,omitempty"`
|
||||
UserIDs []ID `json:"user_ids,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Latitude string `json:"lat,omitempty"`
|
||||
Longitude string `json:"lng,omitempty"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
Charmap [][]int `json:"charmap,omitempty"`
|
||||
Type attachmentType `json:"type,omitempty"`
|
||||
Loci [][]int `json:"loci,omitempty"`
|
||||
UserIDs []ID `json:"user_ids,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
FileID string `json:"file_id,omitempty"`
|
||||
VideoPreviewURL string `json:"preview_url,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Latitude string `json:"lat,omitempty"`
|
||||
Longitude string `json:"lng,omitempty"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
Charmap [][]int `json:"charmap,omitempty"`
|
||||
ReplyID ID `json:"reply_id,omitempty"`
|
||||
}
|
||||
|
||||
func (a *Attachment) String() string {
|
||||
|
Reference in New Issue
Block a user