Server Side Swift with Vapor Post #3 - The Telegram Bot API
Where we talk a lot about "bots", and The Telegram Bot API.
Previous post: Bot Requirements & Diagrams
Overview of a Telegram Update Message
Telegram Update JSON Object
Telegram Message JSON Object
Telegram Chat JSON Object
Telegram User JSON Object
Sample Swift Code
import App
import Vapor
var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env)
let app = Application(env)
defer { app.shutdown() }
try configure(app)
try app.run()
Conclusion
In the next post, we will go over the installation of Swift and/or Vapor.
A special thanks to Essential Developer for being a great resource for learning about Swift, iOS and macOS.
Copyright ©2022 by Brian Manning.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.