Commit Graph

3 Commits (v2)

Author SHA1 Message Date
Ian Byrd 5ba925eaba
Completing inline API, closing #104. 7 years ago
Ian Byrd d8b2ca1983
Fixes lots of complete bollocks that got into the codebase.
- Malformed JSON field tags, OMG fixed
- Making linters happy
- Foursquare_id -> FoursquareID, fuck BC
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