2018-09-16 02:36:04 +03:00
|
|
|
package icq
|
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
Response struct {
|
|
|
|
StatusCode int `json:"statusCode"`
|
|
|
|
StatusText string `json:"statusText"`
|
|
|
|
RequestId string `json:"requestId"`
|
|
|
|
Data *MessageResponse `json:"data"`
|
|
|
|
} `json:"response"`
|
|
|
|
}
|
2018-12-22 19:53:28 +03:00
|
|
|
|
2018-12-21 00:37:34 +03:00
|
|
|
type ParseType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ParseURL ParseType = "url"
|
|
|
|
ParseFilesharing = "filesharing"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Message struct {
|
|
|
|
To string
|
|
|
|
Text string
|
|
|
|
Mentions []string
|
|
|
|
Parse []ParseType
|
|
|
|
}
|
2018-09-16 02:36:04 +03:00
|
|
|
|
|
|
|
type MessageResponse struct {
|
|
|
|
SubCode struct {
|
|
|
|
Error int `json:"error"`
|
|
|
|
} `json:"subCode"`
|
|
|
|
MessageID string `json:"msgId"`
|
|
|
|
HistoryMessageID int64 `json:"histMsgId"`
|
|
|
|
State string `json:"state"`
|
|
|
|
}
|
2018-09-16 03:13:04 +03:00
|
|
|
|
2018-12-21 00:37:34 +03:00
|
|
|
type FileResponse struct {
|
|
|
|
StaticUrl string `json:"static_url"`
|
|
|
|
MimeType string `json:"mime"`
|
|
|
|
SnapID string `json:"snapId"`
|
|
|
|
TtlID string `json:"ttl_id"`
|
|
|
|
IsPreviewable int `json:"is_previewable"`
|
|
|
|
FileID string `json:"fileid"`
|
|
|
|
FileSize int `json:"filesize"`
|
|
|
|
FileName string `json:"filename"`
|
|
|
|
ContentID string `json:"content_id"`
|
|
|
|
}
|
|
|
|
|
2018-09-16 03:13:04 +03:00
|
|
|
type WebhookRequest struct {
|
|
|
|
Token string `json:"aimsid"`
|
|
|
|
Updates []Update `json:"update"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Update struct {
|
|
|
|
Update struct {
|
|
|
|
Chat Chat `json:"chat"`
|
|
|
|
Date int `json:"date"`
|
|
|
|
From User `json:"from"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
} `json:"update"`
|
|
|
|
UpdateID int `json:"update_id"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Chat struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type User struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
LanguageCode string `json:"language_code"`
|
|
|
|
}
|
2018-12-22 19:53:28 +03:00
|
|
|
|
|
|
|
type Buddy struct {
|
|
|
|
AimID string `json:"aimId"`
|
|
|
|
DisplayID string `json:"displayId"`
|
|
|
|
FriendlyName string `json:"friendly"`
|
|
|
|
State string `json:"state"`
|
|
|
|
UserType string `json:"userType"`
|
|
|
|
UserAgreement []string `json:"userAgreement"`
|
|
|
|
Nick string `json:"nick"`
|
|
|
|
GlobalFlags int `json:"globalFlags"`
|
|
|
|
BuddyIcon string `json:"buddyIcon"`
|
|
|
|
}
|