Skip to content

Conversation

@anfanik
Copy link
Collaborator

@anfanik anfanik commented Dec 8, 2024

This pull request implements the Bot API 8.0 update

@anfanik anfanik mentioned this pull request Dec 8, 2024
@anfanik
Copy link
Collaborator Author

anfanik commented Dec 9, 2024

@pengrad @MartelliEnrico 👀

Copy link
Owner

@pengrad pengrad left a comment

Choose a reason for hiding this comment

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

Apologies for the delay.

This delegated property approach won't work good for Java users as it breaks method chaining.
So we need to write additional fun for every property like in CreateInvoiceLink.

Wouldn't be simpler to just use one line functions?
fun providerToken(providerToken: String) = add("provider_token", providerToken)

@anfanik
Copy link
Collaborator Author

anfanik commented Dec 21, 2024

You're right, chaining in Java is broken 🤔
I thought deligates will simplify model classes and remove a lot of boilerplate code

@anfanik
Copy link
Collaborator Author

anfanik commented Jan 22, 2025

Apologies for the delay.

This delegated property approach won't work good for Java users as it breaks method chaining. So we need to write additional fun for every property like in CreateInvoiceLink.

Wouldn't be simpler to just use one line functions? fun providerToken(providerToken: String) = add("provider_token", providerToken)

@pengrad fixed method chaining: added methods for optional parameters

@pengrad pengrad merged commit 2b05eee into master Jan 26, 2025
1 check passed
@anfanik anfanik deleted the v8.0 branch January 31, 2025 06:53
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