Commit Graph

28 Commits (a26ba9f0bd194c4e22718db7c17a7717809364c7)

Author SHA1 Message Date
Nash-Well 32b47a49ef
api: implement 6.6, 6.7 features (#655)
* api: implement 6.6-6.7 features
4 months ago
Reza Alipour 9c4cc7713e
inline: add game result support (#648)
* feat: add game to the list of inline query results

* fix: documentation and naming
4 months ago
Mikhail e6590d806a MarshalJSON should produce unique result ID
Result variable inside for-loop actually have the same address on each iteration, so we need to take address in underlying slice.
7 months ago
Demian cee9ad2ddd telebot: refactor web apps 2 years ago
Mikhail Borovikov 2c2e8dcff1 Added AnswerWebApp for using in a Handle method 2 years ago
Demian be2933a4fa all: use errors from the standard library 2 years ago
Demian c46e31dff6 options: remove InlineKeyboardMarkup type 2 years ago
Demian f61d30b66b telebot: satisfy Editable for Callback and InlineResult, remove InlineID from Message 3 years ago
Demian fb7de291df telebot: rename ChosenInlineResult to the InlineResult 3 years ago
demget bd0bb74d13 Merge pull request #408 from DiscoreMe/develop
api: support 5.2
3 years ago
Demian 061d8ab4ba inline: enable ability to use default parse mode 3 years ago
Demian 5a1a187e87 telebot: clarify and fix all naming issues 4 years ago
Demian 16e74b8025 payments: complete shipping API 4 years ago
Demian 5c1986f5b5 telebot: a lot of refactor and clean-ups 4 years ago
demiangetman 05a04f8830 Add setters for ResultBase 5 years ago
Ian Byrd bda24d8650 Possibly breaking some builds, but inline message IDs won't work
otherwise.
7 years ago
Ian Byrd 77d1ba9eb1 Inline mode fix. 7 years ago
Ian Byrd 5ba925eaba
Completing inline API, closing #104. 7 years ago
Ian Byrd 612ab345bd Improved inline API. TODO proper result types. 7 years ago
Ian Byrd 0f1d521167
Cleanup, documentation, bikeshedding. 7 years ago
Ian Byrd 7c002850b1
Typo infereIQR -> inferIQR. 8 years ago
Ian Byrd acbbb524dc
Documentation for newly introduced methods. 8 years ago
Ian Byrd a6c1dce4e0
Replace IQR*.MarshalJSON with InlineQueryResultBase, fixes #75.
This commit gets rid of multiple redundant copies of MarhsalJSON()
method present for all existing IQR. It does so by introducing a
new struct called InlineQueryResultBase, which takes care of new
Type (for JSON) and existing duplicated ID field.

InlineQueryResults is a new helper wrapper for []IQR slices. It
implements MarshalJSON, which makes sure IQR.ID and IQR.Type are
set properly (by computing a hash and infering IQR type).
8 years ago
Ian Byrd e0d2195801
Partial refactoring of internals.
- GetChat and LeaveChat handle error descriptions
- Documentation fix for Result type
- Wrapping structs for IQRs go inside marshal funcs.
8 years ago
Nick Groenen 46992b037b Improve support for inline queries
These changes make it possible to set custom options when responding to
inline queries, as described on
https://core.telegram.org/bots/api#answerinlinequery.

It also includes all the (non-cached) inline result types as described
at https://core.telegram.org/bots/api#inlinequeryresult.

Some remarks:
* The internals of sendCommand have changed. It now expects a
  JSON-serializable object. Instead of doing GET requests with
  URL-encoded query parameters it now POSTS JSON directly.
* Because of the above, sendFile() has changed as well. It now expects a
* `map[string]string` which it will internally convert to URL encoded
  form values.
* Respond has been deprecated in favor of the new AnswerInlineQuery
  function. It is only kept for backward compatibility.
* A dependency on https://github.com/mitchellh/hashstructure has been
  introduced in order to generate automatic IDs for inline results.
8 years ago
Ian Byrd 12182e36dc
Minor documentation fixes, resolves #49 8 years ago
Ian Byrd ce6937b17c
i'm dumb... 9 years ago
Ian Byrd 061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
9 years ago