-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
100 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 12 additions & 1 deletion
13
Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCreated.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
// Swift Telegram SDK - Telegram Bot Swift SDK. | ||
|
||
/** | ||
This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. | ||
This object represents a service message about the creation of a scheduled giveaway. | ||
SeeAlso Telegram Bot API Reference: | ||
[GiveawayCreated](https://core.telegram.org/bots/api#giveawaycreated) | ||
**/ | ||
public final class TGGiveawayCreated: Codable { | ||
|
||
/// Custom keys for coding/decoding `GiveawayCreated` struct | ||
public enum CodingKeys: String, CodingKey { | ||
case prizeStarCount = "prize_star_count" | ||
} | ||
|
||
/// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only | ||
public var prizeStarCount: Int? | ||
|
||
public init (prizeStarCount: Int? = nil) { | ||
self.prizeStarCount = prizeStarCount | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGPaidMediaPurchased.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Swift Telegram SDK - Telegram Bot Swift SDK. | ||
|
||
/** | ||
This object contains information about a paid media purchase. | ||
SeeAlso Telegram Bot API Reference: | ||
[PaidMediaPurchased](https://core.telegram.org/bots/api#paidmediapurchased) | ||
**/ | ||
public final class TGPaidMediaPurchased: Codable { | ||
|
||
/// Custom keys for coding/decoding `PaidMediaPurchased` struct | ||
public enum CodingKeys: String, CodingKey { | ||
case from = "from" | ||
case paidMediaPayload = "paid_media_payload" | ||
} | ||
|
||
/// User who purchased the media | ||
public var from: TGUser | ||
|
||
/// Bot-specified paid media payload | ||
public var paidMediaPayload: String | ||
|
||
public init (from: TGUser, paidMediaPayload: String) { | ||
self.from = from | ||
self.paidMediaPayload = paidMediaPayload | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.