Commit Graph

19 Commits (a26ba9f0bd194c4e22718db7c17a7717809364c7)

Author SHA1 Message Date
Nash-Well 32b47a49ef
api: implement 6.6, 6.7 features (#655)
* api: implement 6.6-6.7 features
3 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
3 months ago
Demian c46e31dff6 options: remove InlineKeyboardMarkup type 2 years ago
Demian 19e28229ea telebot: remove pointer to the InputMessageContent inside ResultBase 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 a858ff7a15 inline: add thumb_mime_type field to gif and mpeg4 results 4 years ago
demiangetman 3beea1c055 Update inline query result types 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 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 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