|
|
|
@ -28,12 +28,14 @@ type ChatAPI struct {
@@ -28,12 +28,14 @@ type ChatAPI struct {
|
|
|
|
|
Error *Error `json:"error"` |
|
|
|
|
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type sender struct { |
|
|
|
|
UID string `json:"uid"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
|
DeviceID string `json:"device_id"` |
|
|
|
|
DeviceName string `json:"device_name"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type addedtoteam struct { |
|
|
|
|
Team string `json:"team"` |
|
|
|
|
Adder string `json:"adder"` |
|
|
|
@ -43,9 +45,11 @@ type addedtoteam struct {
@@ -43,9 +45,11 @@ type addedtoteam struct {
|
|
|
|
|
Writers []string `json:"writers"` |
|
|
|
|
Readers []string `json:"readers"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type bulkaddtoconv struct { |
|
|
|
|
Usernames []string `json:"usernames"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type commits struct { |
|
|
|
|
CommitHash string `json:"commitHash"` |
|
|
|
|
Message string `json:"message"` |
|
|
|
@ -53,12 +57,14 @@ type commits struct {
@@ -53,12 +57,14 @@ type commits struct {
|
|
|
|
|
AuthorEmail string `json:"authorEmail"` |
|
|
|
|
Ctime int `json:"ctime"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type refs struct { |
|
|
|
|
RefName string `json:"refName"` |
|
|
|
|
Commits []commits `json:"commits"` |
|
|
|
|
MoreCommitsAvailable bool `json:"moreCommitsAvailable"` |
|
|
|
|
IsDelete bool `json:"isDelete"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type gitpush struct { |
|
|
|
|
Team string `json:"team"` |
|
|
|
|
Pusher string `json:"pusher"` |
|
|
|
@ -68,36 +74,44 @@ type gitpush struct {
@@ -68,36 +74,44 @@ type gitpush struct {
|
|
|
|
|
PushType int `json:"pushType"` |
|
|
|
|
PreviousRepoName string `json:"previousRepoName"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type system struct { |
|
|
|
|
SystemType int `json:"systemType"` |
|
|
|
|
Addedtoteam addedtoteam `json:"addedtoteam"` |
|
|
|
|
Bulkaddtoconv bulkaddtoconv `json:"bulkaddtoconv"` |
|
|
|
|
Gitpush gitpush `json:"gitpush"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type paymentsResult struct { |
|
|
|
|
ResultTyp int `json:"resultTyp"` |
|
|
|
|
Sent string `json:"sent"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type payments struct { |
|
|
|
|
Username string `json:"username"` |
|
|
|
|
PaymentText string `json:"paymentText"` |
|
|
|
|
Result paymentsResult `json:"result"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type userMentions struct { |
|
|
|
|
Text string `json:"text"` |
|
|
|
|
UID string `json:"uid"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type teamMentions struct { |
|
|
|
|
Name string `json:"name"` |
|
|
|
|
Channel string `json:"channel"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type reaction struct { |
|
|
|
|
M int `json:"m"` |
|
|
|
|
B string `json:"b"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type delete struct { |
|
|
|
|
MessageIDs []int `json:"messageIDs"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type edit struct { |
|
|
|
|
MessageID int `json:"messageID"` |
|
|
|
|
Body string `json:"body"` |
|
|
|
@ -105,12 +119,14 @@ type edit struct {
@@ -105,12 +119,14 @@ type edit struct {
|
|
|
|
|
UserMentions []userMentions `json:"userMentions"` |
|
|
|
|
TeamMentions []teamMentions `json:"teamMentions"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type text struct { |
|
|
|
|
Body string `json:"body"` |
|
|
|
|
Payments []payments `json:"payments"` |
|
|
|
|
UserMentions []userMentions `json:"userMentions"` |
|
|
|
|
TeamMentions []teamMentions `json:"teamMentions"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type flip struct { |
|
|
|
|
Text string `json:"text"` |
|
|
|
|
GameID string `json:"game_id"` |
|
|
|
@ -118,6 +134,7 @@ type flip struct {
@@ -118,6 +134,7 @@ type flip struct {
|
|
|
|
|
UserMentions interface{} `json:"user_mentions"` |
|
|
|
|
TeamMentions interface{} `json:"team_mentions"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type content struct { |
|
|
|
|
Type string `json:"type"` |
|
|
|
|
Delete delete `json:"delete"` |
|
|
|
@ -126,8 +143,10 @@ type content struct {
@@ -126,8 +143,10 @@ type content struct {
|
|
|
|
|
System system `json:"system"` |
|
|
|
|
Text text `json:"text"` |
|
|
|
|
SendPayment SendPayment `json:"send_payment"` |
|
|
|
|
RequestPayment RequestPayment `json:"request_payment"` |
|
|
|
|
Flip flip `json:"flip"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type msg struct { |
|
|
|
|
ID int `json:"id"` |
|
|
|
|
ConversationID string `json:"conversation_id"` |
|
|
|
@ -143,6 +162,7 @@ type msg struct {
@@ -143,6 +162,7 @@ type msg struct {
|
|
|
|
|
HasPairwiseMacs bool `json:"has_pairwise_macs"` |
|
|
|
|
ChannelMention string `json:"channel_mention"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type summary struct { |
|
|
|
|
ID string `json:"id"` |
|
|
|
|
TxID string `json:"txID"` |
|
|
|
@ -181,6 +201,7 @@ type summary struct {
@@ -181,6 +201,7 @@ type summary struct {
|
|
|
|
|
FromAirdrop bool `json:"fromAirdrop"` |
|
|
|
|
IsInflation bool `json:"isInflation"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type details struct { |
|
|
|
|
PublicNote string `json:"publicNote"` |
|
|
|
|
PublicNoteType string `json:"publicNoteType"` |
|
|
|
@ -188,6 +209,7 @@ type details struct {
@@ -188,6 +209,7 @@ type details struct {
|
|
|
|
|
FeeChargedDescription string `json:"feeChargedDescription"` |
|
|
|
|
PathIntermediate interface{} `json:"pathIntermediate"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type notification struct { |
|
|
|
|
Summary summary `json:"summary"` |
|
|
|
|
Details details `json:"details"` |
|
|
|
@ -201,9 +223,11 @@ type Channel struct {
@@ -201,9 +223,11 @@ type Channel struct {
|
|
|
|
|
TopicType string `json:"topic_type,omitempty"` |
|
|
|
|
TopicName string `json:"topic_name,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type message struct { |
|
|
|
|
Body string `json:"body"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type options struct { |
|
|
|
|
Channel Channel `json:"channel"` |
|
|
|
|
MessageID int `json:"message_id"` |
|
|
|
@ -220,6 +244,7 @@ type options struct {
@@ -220,6 +244,7 @@ type options struct {
|
|
|
|
|
type params struct { |
|
|
|
|
Options options `json:"options"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type pagination struct { |
|
|
|
|
Next string `json:"next"` |
|
|
|
|
Previous string `json:"previous"` |
|
|
|
@ -227,6 +252,7 @@ type pagination struct {
@@ -227,6 +252,7 @@ type pagination struct {
|
|
|
|
|
Last bool `json:"last,omitempty"` |
|
|
|
|
ForceFirstPage bool `json:"forceFirstPage,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type participants struct { |
|
|
|
|
UID string `json:"uid"` |
|
|
|
|
DeviceID string `json:"deviceID"` |
|
|
|
@ -235,18 +261,22 @@ type participants struct {
@@ -235,18 +261,22 @@ type participants struct {
|
|
|
|
|
Commitment string `json:"commitment"` |
|
|
|
|
Reveal string `json:"reveal"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type dupreg struct { |
|
|
|
|
User string `json:"user"` |
|
|
|
|
Device string `json:"device"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type errorInfo struct { |
|
|
|
|
Typ int `json:"typ"` |
|
|
|
|
Dupreg dupreg `json:"dupreg"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type resultInfo struct { |
|
|
|
|
Typ int `json:"typ"` |
|
|
|
|
Coin bool `json:"coin"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type flipStatus struct { |
|
|
|
|
GameID string `json:"gameID"` |
|
|
|
|
Phase int `json:"phase"` |
|
|
|
@ -258,6 +288,7 @@ type flipStatus struct {
@@ -258,6 +288,7 @@ type flipStatus struct {
|
|
|
|
|
ResultInfo *resultInfo `json:"resultInfo"` |
|
|
|
|
ErrorInfo *errorInfo `json:"errorInfo"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type result struct { |
|
|
|
|
Messages []messages `json:"messages,omitempty"` |
|
|
|
|
Pagination pagination `json:"pagination"` |
|
|
|
@ -269,15 +300,18 @@ type result struct {
@@ -269,15 +300,18 @@ type result struct {
|
|
|
|
|
Status flipStatus `json:"status,omitempty"` |
|
|
|
|
IdentifyFailures interface{} `json:"identifyFailures,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type messages struct { |
|
|
|
|
Msg msg `json:"msg,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type rateLimits struct { |
|
|
|
|
Tank string `json:"tank,omitempty"` |
|
|
|
|
Capacity int `json:"capacity,omitempty"` |
|
|
|
|
Reset int `json:"reset,omitempty"` |
|
|
|
|
Gas int `json:"gas,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type conversation struct { |
|
|
|
|
ID string `json:"id"` |
|
|
|
|
Channel Channel `json:"channel"` |
|
|
|
@ -286,10 +320,16 @@ type conversation struct {
@@ -286,10 +320,16 @@ type conversation struct {
|
|
|
|
|
ActiveAtMs int64 `json:"active_at_ms"` |
|
|
|
|
MemberStatus string `json:"member_status"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type SendPayment struct { |
|
|
|
|
PaymentID string `json:"paymentID"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type RequestPayment struct { |
|
|
|
|
RequestID string `json:"requestID"` |
|
|
|
|
Note string `json:"note"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// WalletAPI holds data for sending to API
|
|
|
|
|
type WalletAPI struct { |
|
|
|
|
Method string `json:"method,omitempty"` |
|
|
|
@ -297,13 +337,16 @@ type WalletAPI struct {
@@ -297,13 +337,16 @@ type WalletAPI struct {
|
|
|
|
|
Result *wResult `json:"result,omitempty"` |
|
|
|
|
Error *Error `json:"error"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type wOptions struct { |
|
|
|
|
Name string `json:"name"` |
|
|
|
|
Txid string `json:"txid"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type wParams struct { |
|
|
|
|
Options wOptions `json:"options"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type asset struct { |
|
|
|
|
Type string `json:"type"` |
|
|
|
|
Code string `json:"code"` |
|
|
|
@ -313,6 +356,7 @@ type asset struct {
@@ -313,6 +356,7 @@ type asset struct {
|
|
|
|
|
Desc string `json:"desc"` |
|
|
|
|
InfoURL string `json:"infoUrl"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type sourceAsset struct { |
|
|
|
|
Type string `json:"type"` |
|
|
|
|
Code string `json:"code"` |
|
|
|
@ -323,15 +367,18 @@ type sourceAsset struct {
@@ -323,15 +367,18 @@ type sourceAsset struct {
|
|
|
|
|
InfoURL string `json:"infoUrl"` |
|
|
|
|
InfoURLText string `json:"infoUrlText"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type balance struct { |
|
|
|
|
Asset asset `json:"asset"` |
|
|
|
|
Amount string `json:"amount"` |
|
|
|
|
Limit string `json:"limit"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type exchangeRate struct { |
|
|
|
|
Currency string `json:"currency"` |
|
|
|
|
Rate string `json:"rate"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type wResult struct { |
|
|
|
|
AccountID string `json:"accountID"` |
|
|
|
|
IsPrimary bool `json:"isPrimary"` |
|
|
|
@ -366,22 +413,27 @@ type TeamAPI struct {
@@ -366,22 +413,27 @@ type TeamAPI struct {
|
|
|
|
|
Result *tResult `json:"result,omitempty"` |
|
|
|
|
Error *Error `json:"error"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type emails struct { |
|
|
|
|
Email string `json:"email"` |
|
|
|
|
Role string `json:"role"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type usernames struct { |
|
|
|
|
Username string `json:"username"` |
|
|
|
|
Role string `json:"role"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type user struct { |
|
|
|
|
UID string `json:"uid"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type uv struct { |
|
|
|
|
UID string `json:"uid"` |
|
|
|
|
EldestSeqno int `json:"eldestSeqno"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type owners struct { |
|
|
|
|
Uv uv `json:"uv"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
@ -389,6 +441,7 @@ type owners struct {
@@ -389,6 +441,7 @@ type owners struct {
|
|
|
|
|
NeedsPUK bool `json:"needsPUK"` |
|
|
|
|
Status int `json:"status"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type admins struct { |
|
|
|
|
Uv uv `json:"uv"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
@ -396,6 +449,7 @@ type admins struct {
@@ -396,6 +449,7 @@ type admins struct {
|
|
|
|
|
NeedsPUK bool `json:"needsPUK"` |
|
|
|
|
Status int `json:"status"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type readers struct { |
|
|
|
|
Uv uv `json:"uv"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
@ -403,35 +457,43 @@ type readers struct {
@@ -403,35 +457,43 @@ type readers struct {
|
|
|
|
|
NeedsPUK bool `json:"needsPUK"` |
|
|
|
|
Status int `json:"status"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type members struct { |
|
|
|
|
Owners []owners `json:"owners"` |
|
|
|
|
Admins []admins `json:"admins"` |
|
|
|
|
Writers []interface{} `json:"writers"` |
|
|
|
|
Readers []readers `json:"readers"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type annotatedActiveInvites struct { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type settings struct { |
|
|
|
|
Open bool `json:"open"` |
|
|
|
|
JoinAs int `json:"joinAs"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type showcase struct { |
|
|
|
|
IsShowcased bool `json:"is_showcased"` |
|
|
|
|
AnyMemberShowcase bool `json:"any_member_showcase"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type tOptions struct { |
|
|
|
|
Team string `json:"team"` |
|
|
|
|
Emails []emails `json:"emails"` |
|
|
|
|
Usernames []usernames `json:"usernames"` |
|
|
|
|
Username string `json:"username"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type tParams struct { |
|
|
|
|
Options tOptions `json:"options"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type Error struct { |
|
|
|
|
Code int `json:"code"` |
|
|
|
|
Message string `json:"message"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type tResult struct { |
|
|
|
|
ChatSent bool `json:"chatSent"` |
|
|
|
|
CreatorAdded bool `json:"creatorAdded"` |
|
|
|
|