(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const functions = require('firebase-functions'); | |
| const admin = require('firebase-admin'); | |
| admin.initializeApp(); | |
| exports.sendLeaderboardMesssage = functions | |
| .database | |
| .ref('/leaderboard/{position}') | |
| .onUpdate((change) => { | |
| const oldPlayer = change.before.val(); |
| func fetchResultsFromApi() { | |
| struct MyGitHub: Codable { | |
| let name: String? | |
| let location: String? | |
| let followers: Int? | |
| let avatarUrl: URL? | |
| let repos: Int? | |
| private enum CodingKeys: String, CodingKey { |
| let styles: [UIFont.TextStyle] = [ | |
| // iOS 17 | |
| .extraLargeTitle, .extraLargeTitle2, | |
| // iOS 11 | |
| .largeTitle, | |
| // iOS 9 | |
| .title1, .title2, .title3, .callout, | |
| // iOS 7 | |
| .headline, .subheadline, .body, .footnote, .caption1, .caption2, | |
| ] |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.