-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BotAPI7.5 #700
BotAPI7.5 #700
Conversation
bot.go
Outdated
@@ -1252,6 +1252,26 @@ func (b *Bot) MyShortDescription(language string) (*BotInfo, error) { | |||
return b.botInfo(language, "getMyShortDescription") | |||
} | |||
|
|||
func (b *Bot) GetStarTransactions(offset, limit int) (*StarTransaction, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method returns an array of Star Transactions. Rewrite resp
struct to return an array of transactions
var resp struct {
Result struct {
Transactions []StarTransaction `json:"transactions"`
}
}
stars.go
Outdated
Receiver TransactionPartner `json:"receiver"` | ||
} | ||
|
||
type StarTransactions struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused struct
stars.go
Outdated
Amount int `json:"amount"` | ||
|
||
// Date the transaction was created in Unix time | ||
Date int `json:"date"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement helper func
stars.go
Outdated
WithdrawalState RevenueWithdrawalState `json:"withdrawal_state,omitempty"` | ||
|
||
// Information about the user | ||
User User `json:"user,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partner *User `json:"user,omitempty"`
stars.go
Outdated
Type string `json:"type"` | ||
|
||
// Date the withdrawal was completed in Unix time | ||
Date int `json:"date,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement helper func
* BotAPI7.5 * bot, stars: refactor
No description provided.