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

Decide what kind of API we want for inline query result #182

Open
knsd opened this issue Oct 21, 2019 · 0 comments
Open

Decide what kind of API we want for inline query result #182

knsd opened this issue Oct 21, 2019 · 0 comments

Comments

@knsd
Copy link
Member

knsd commented Oct 21, 2019

We have both public fields for all structs and a builder for InlineQueryResultArticle right now. I think it be much better to use only builder because telegram can add new fields to types and it would break user code eventually.

  • Maybe InlineQueryResult* builders should take self by value, like InlineKeyboardButton, I'm not sure.
  • Maybe we should change CanAnswerInlineQuery and AnswerInlineQuery API, something like this:
query.answer_inline()
    .add(InlineQueryResultMpeg4Gif::new("unique-id1", "http://example.com/mpeg.mp4"))
    .add(InlineQueryResultMpeg4Gif::new("unique-id2", "http://example.com/mpeg2.mp4"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants