Commit Graph

231 Commits

Author SHA1 Message Date
Vlad Lukyanov
977e1d90f3 gofmt 2016-07-04 19:48:20 +05:00
Vlad Lukyanov
6e08411d89 fix. rewrite url.params to map 2016-07-04 19:45:08 +05:00
Vlad Lukyanov
4b79f3ff1b merge with upstream 2016-07-04 15:56:53 +05:00
Ian Byrd
9b14951f8f Merge pull request #53 from zoni/inline-bot-example-fix
Fix inline bot example in README, resolves #52
2016-07-02 14:06:26 +03:00
Nick Groenen
852bebcd6f Fix inline bot example in README
Closes #52
2016-07-02 13:04:42 +02:00
Ian Byrd
1a30b0193a Merge pull request #50 from zoni/inline_queries
Improve support for inline queries, closes #32
2016-07-02 03:17:29 +03:00
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.
2016-06-26 16:33:16 +02:00
Ian Byrd
12182e36dc
Minor documentation fixes, resolves #49 2016-06-26 10:15:11 +03:00
Ian Byrd
15ae62790e Merge pull request #47 from zabawaba99/inline-keyboard-button
Adding support for inline keyboard buttons
2016-06-10 13:24:13 +03:00
Steven Berlanga
4b2c1f976c adding documentation to callback struct 2016-05-25 09:53:01 -04:00
Vlad Lukyanov
0a92c6c68b Added Venue message support by calling SendVenue(recipient Recipient, venue *Venue, options *SendOptions) 2016-05-24 09:43:16 +05:00
Steven Berlanga
72e84f5ab5 Adding support for inline keyboard buttons 2016-04-29 18:20:50 -04:00
Ian Byrd
68ad7fd5dc
Hotfixing the bug introduced by jerks from Telegram:
>Renamed the fields new_chat_participant and left_chat_participant
>of the Message object to new_chat_member and left_chat_member.
via https://core.telegram.org/bots/api#recent-changes
2016-04-13 21:04:51 +03:00
Ian Byrd
4de603f9ee
Silent messages from https://telegram.org/blog/channels-2 2016-03-13 18:06:24 +02:00
Maxim Lebedev
896984e6ce Add param for sends the message silently
Remove duplicate lines in structures, add global parameter, add tips for godoc
2016-03-13 17:20:59 +05:00
Ian Byrd
df37d2d118 Merge pull request #30 from cedricziel/thumbFix
Use correct thumb URL
2016-02-18 22:21:26 +02:00
Cedric Ziel
a8c83b47c7 Use correct thumb URL 2016-02-18 20:45:31 +01:00
Ian Byrd
ce6937b17c
i'm dumb... 2016-01-22 15:03:58 +02:00
Ian Byrd
d181b4fd01
Fixed a wrong code listing 2016-01-22 14:47:41 +02:00
Ian Byrd
061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
2016-01-22 13:38:45 +02:00
Ian Byrd
fc7d7ee8e3
Merging pull request #27 by Romni
- Sending messages to channel
- Expanding Chat.ID size
- New server messages
2015-12-24 12:41:06 +02:00
Ronmi Ren
5a47937cc1 Support new service message types about channel creation and supergroup migration. 2015-12-24 16:52:27 +08:00
Ronmi Ren
143777fbe0 Channel support and change chat_id size
* Chage signature of "Destination()", because we need send username in "chat_id" when
  sending message to channel.
* By telegram API document, chat id is "not exceeding 1e13 by absolute value" which
  needs int64 to store it.
2015-12-24 16:51:42 +08:00
Ian Byrd
4103e705b0
Fixing critical API issue; resolves #26 2015-12-05 11:40:55 +02:00
Ilya Kowalewski
651cd22f62 Tiny code changes 2015-11-16 12:22:37 +02:00
llya Kowalewski
4b7ee3b796 Merge pull request #23 from reddec/feature/close_connection
Fix close connection after usage
2015-11-12 20:06:14 +02:00
RedDec
5f730d77ec Close connection after usage. 2015-11-12 20:59:24 +03:00
llya Kowalewski
ab25fcf6fa Merge pull request #22 from shoonoise/master
Fix README example (send options)
2015-11-03 17:41:19 +02:00
Alexander
bd05f8e4f7 Fix README example 2015-11-03 18:12:22 +03:00
Ilya Kowalewski
72ce8fae88 Fixing #21 issue, introducing Recipient interface 2015-10-17 01:36:07 +03:00
Ilya Kowalewski
74d63a4754 Merging #20 into tucnak:master from aladine:patch-3 2015-10-16 19:36:20 +03:00
Ilya Kowalewski
752af53a8a Pushing sensitive TELEGRAM_SECRET in Travis, praise da FOSS! 2015-10-15 20:15:20 +03:00
Ilya Kowalewski
6e16b55de1 Getting rid of excessive error types, switching to fmt.Errorf 2015-10-15 18:17:09 +03:00
Ilya Kowalewski
613d4d239e Funky travis button added 2015-10-15 17:57:47 +03:00
Ilya Kowalewski
af44d8f63e Travis embedded 2015-10-15 17:56:00 +03:00
llya Kowalewski
62ade911f7 Merge pull request #19 from superhacker777/master
Code bloating fixes, typo away
2015-10-14 09:47:45 +03:00
Anton Volodin
faeff79108 DRY condition fix 2015-10-13 17:42:17 +03:00
Anton Volodin
e38f2bd56c Another code bloat fixes 2015-10-13 17:38:15 +03:00
Anton Volodin
761191f50a Typo fix in ReplyMarkup structure 2015-10-13 17:33:14 +03:00
Anton Volodin
e9e91531ad A little code bloat fix 2015-10-13 17:31:51 +03:00
llya Kowalewski
1601444837 Merge pull request #14 from ejamesc/master
Change API to return error on 500 http status.
2015-10-11 23:34:48 +03:00
Cedric Chin
f7c3d4f9d2 Change API to return error on 500 http status.
- The Telegram API does not return well-formed JSON when there is an 
Internal Server Error. This results in incomprehensible errors.
2015-10-12 00:47:39 +07:00
llya Kowalewski
1492f3688f Merge pull request #10 from aaomidi/master
Update README.md
2015-10-04 13:10:39 +03:00
llya Kowalewski
32efe8ce78 Merge pull request #12 from Ronmi/markdown
Support new API: markdown message.
2015-09-15 21:18:41 +03:00
Ronmi Ren
32d0662cde update documentation 2015-09-15 20:24:34 +08:00
Ronmi Ren
ab11be604a Support new API: markdown message. 2015-09-14 11:18:03 +08:00
Amir Ali Omidi
36ffa89aa6 Update README.md
Fixed the SendAudio documentation
2015-09-01 02:00:13 +04:30
llya Kowalewski
5db9cc7c56 Merge pull request #8 from Ronmi/master
Fix: type in json key `resize_keyboard`
2015-08-25 15:32:04 +03:00
Ronmi Ren
cc123431f8 fix typo in json key 2015-08-24 11:43:57 +08:00
Ilya Kowalewski
0192b0946f go fmt 2015-08-05 20:53:20 +03:00