Server Side Swift with Vapor Post #3 - The Telegram Bot API

Brian Manning published on
2 min, 229 words

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 Update JSON Object

Telegram Update JSON Object

Telegram Message JSON Object

Telegram Message JSON Object

Telegram Chat JSON Object

Telegram Chat JSON Object

Telegram User 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.

Previous post

A special thanks to Essential Developer for being a great resource for learning about Swift, iOS and macOS.

Copyright ©2022 by Brian Manning.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.