Changelog History
Page 2
-
v1.2.0
August 18, 2019 -
v1.1.0
April 15, 2019 -
v0.16.1 Changes
April 16, 2017- ๐ Bugfix: POST data length was calculated incorrectly resulting in getFile returning HTTP error 400 "invalid file_id".
-
v0.16.0 Changes
April 03, 2017- ๐ง Switch to IBM's version of SwiftyJSON for Linux compatibility.
-
v0.15.0 Changes
April 03, 2017๐ Memory leak fixed.
๐ Callback_query bug fixed.
๐ Message editing requests generation fixed.
๐ Better error reporting.
๐ Move back to original SwiftyJSON.
-
v0.14.0 Changes
February 17, 2017๐ง Library rewritten to use libcurl because Foundation's URLSession is not working reliably on Linux yet.
โ File attachments are now supported (via InputFile). Check testSendPhoto() test in RequestTests.swift for an example.
-
v0.13.0 Changes
December 04, 2016- โก๏ธ Update to Bot API 2.3.1.
-
v0.12.0 Changes
December 03, 2016๐ง Linux port, thanks to Andrea de Marco who fixed most of the bugs!
โก๏ธ Telegram API updated to most recent one.
-
v0.11.0 Changes
August 30, 2016- โก๏ธ Updated to 2016-08-26 Swift toolchain.
-
v0.10.0 Changes
July 03, 2016โ Added
Examples/shopster-bot
: a sample bot which maintains a shopping list using sqlite3 database. GRDB library is used for working with database. This bot allows creating shared shopping lists in group chats.๐ Callback query data used in InlineButtons can now be parsed similarly to plaintext commands using arguments scanner. Simply call
context.args.scanWord()
to fetch a word from callback data and so on.Router path
.callback_query
now accepts nil:callback_query(data: nil)
. Pass nil to match any data, then parse it in handler using arguments scanner.๐ Router now supports context-sensitive user properties. Pass them to
process
method:
var properties = [String: AnyObject]() properties["myField"] = myValue try router.process(update: update, properties: properties)
And use them in handlers:
func myHandler(context: Context) -> Bool { let myValue = context.properties["myField"] as? MyValueType // ... }
Or make a
Context
category for easier access to your properties, for example:extension Context { var session: Session { return properties["session"] as! Session } }
โ Added
scanInt64()
to arguments scanner.readToken("filename or env var")
is nowreadToken(from: "filename or env var")