Skip to content
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

Merged
merged 2 commits into from
Aug 9, 2024
Merged

BotAPI7.5 #700

merged 2 commits into from
Aug 9, 2024

Conversation

Apolisk
Copy link
Contributor

@Apolisk Apolisk commented Jun 21, 2024

No description provided.

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) {
Copy link
Contributor

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 {
Copy link
Contributor

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"`
Copy link
Contributor

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"`
Copy link
Contributor

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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement helper func

@demget demget added this to the v3.4 milestone Jun 25, 2024
@demget demget changed the base branch from v3 to v3.4 July 11, 2024 13:16
@demget demget merged commit c0f26a7 into tucnak:v3.4 Aug 9, 2024
1 check passed
demget pushed a commit that referenced this pull request Aug 9, 2024
* BotAPI7.5

* bot, stars: refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants