Add support for uploading multiple files#356
Conversation
|
Hello
|
|
Whoops, I forgot to mention that the panics needed to be removed still. I wasn't aware of |
|
waiting for that |
tjhorner
left a comment
There was a problem hiding this comment.
This looks good to me, but what are we going to do about the breaking changes, since the versioning is really weird at the moment?
|
|
||
| // MakeRequest makes a request to a specific endpoint with our token. | ||
| func (bot *BotAPI) MakeRequest(endpoint string, params Params) (APIResponse, error) { | ||
| func (bot *BotAPI) MakeRequest(endpoint string, params Params) (*APIResponse, error) { |
There was a problem hiding this comment.
This smells like a breaking change to me. People running off of master or develop are going to have a bad time.
There was a problem hiding this comment.
Yeah. Not really sure what else to do though, I want to keep consistency through everything and there's already a ton of breaking changes elsewhere so might as well do it now.
go-telegram-bot-api#356 updates the logic to support uploading multiple files but accidentally breaks this.
This allows for uploading multiple files for media groups or thumbnails. It also fixes a longstanding bug with using URLs.
There's a few breaking changes:
UploadFilehas been renamed toUploadFiles, and now takes a[]RequestFileinstead offieldnameandfileNew*UploadandNew*Sharehave been condensed intoNew*APIResponseand errors are returned as pointersI'd love to get feedback on the API changes or what could be done to further improve things.