Browse Source

Add error type to API types

main
Sam 5 years ago
parent
commit
881d8cbde1
  1. 7
      types.go

7
types.go

@ -24,6 +24,7 @@ type ChatAPI struct { @@ -24,6 +24,7 @@ type ChatAPI struct {
Notification *notification `json:"notification"`
Result *result `json:"result,omitempty"`
Pagination *pagination `json:"pagination"`
Error *Error `json:"error"`
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
}
type sender struct {
@ -245,6 +246,7 @@ type WalletAPI struct { @@ -245,6 +246,7 @@ type WalletAPI struct {
Method string `json:"method,omitempty"`
Params *wParams `json:"params,omitempty"`
Result *wResult `json:"result,omitempty"`
Error *Error `json:"error"`
}
type wOptions struct {
Name string `json:"name"`
@ -313,6 +315,7 @@ type TeamAPI struct { @@ -313,6 +315,7 @@ type TeamAPI struct {
Method string `json:"method,omitempty"`
Params *tParams `json:"params,omitempty"`
Result *tResult `json:"result,omitempty"`
Error *Error `json:"error"`
}
type emails struct {
Email string `json:"email"`
@ -375,6 +378,10 @@ type tOptions struct { @@ -375,6 +378,10 @@ type tOptions struct {
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"`

Loading…
Cancel
Save