Telegram-bot-sdk: getWebhookUpdates returning one Update object

Created on 2 Jun 2016  路  3Comments  路  Source: irazasyed/telegram-bot-sdk

Please recheck documentation, i getting directly one object.

The function returns an array of Update objects.
https://telegram-bot-sdk.readme.io/docs/webhook-updates

Most helpful comment

All 3 comments

True. I also stumbled upon that.

I'm voting for either
a) return a Update[] with a single Update in it to make it consistent with getUpdates()
or
b) rename it getWebhookUpdate, continue to return a single Update and update the docs

Sidenote:
With Powered by Laravel Collection API for Response Objects., why not do the same here and return a Collection of Updates?

Yeah, I'm aware of this.

It'll be renamed and the old method will be deprecated.

@sloothword Update object is already a collection and since it simply returns only 1 update, there is no point of returning a collection of them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BehroozBvk picture BehroozBvk  路  5Comments

khalilst picture khalilst  路  3Comments

chaskayu picture chaskayu  路  4Comments

wlinh picture wlinh  路  3Comments

behnamazimi picture behnamazimi  路  3Comments