diff options
| author | 2024-07-20 17:22:25 +0300 | |
|---|---|---|
| committer | 2024-07-20 17:22:25 +0300 | |
| commit | c70ffd095a6de5cd5b872796a0d82a8c5afc1511 (patch) | |
| tree | 56183274b05a294e357bad4d06b523472a1c4a4a /src/types/paid_media.zig | |
| download | ukkobot-c70ffd095a6de5cd5b872796a0d82a8c5afc1511.tar.gz ukkobot-c70ffd095a6de5cd5b872796a0d82a8c5afc1511.tar.xz ukkobot-c70ffd095a6de5cd5b872796a0d82a8c5afc1511.zip | |
Initial commit
Diffstat (limited to 'src/types/paid_media.zig')
| -rw-r--r-- | src/types/paid_media.zig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/types/paid_media.zig b/src/types/paid_media.zig new file mode 100644 index 0000000..3b50250 --- /dev/null +++ b/src/types/paid_media.zig | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | const json = @import("../json.zig"); | ||
| 2 | |||
| 3 | const PhotoSize = @import("PhotoSize.zig"); | ||
| 4 | const Video = @import("Video.zig"); | ||
| 5 | |||
| 6 | pub const PaidMedia = union(enum) { | ||
| 7 | preview: struct { | ||
| 8 | width: ?u64 = null, | ||
| 9 | height: ?u64 = null, | ||
| 10 | duration: ?u64 = null, | ||
| 11 | }, | ||
| 12 | photo: struct { | ||
| 13 | photo: []PhotoSize, | ||
| 14 | }, | ||
| 15 | video: struct { | ||
| 16 | video: Video, | ||
| 17 | }, | ||
| 18 | |||
| 19 | pub const jsonParse = json.makeJsonParse(PaidMedia); | ||
| 20 | pub const jsonParseFromValue = json.makeJsonParseFromValue(PaidMedia); | ||
| 21 | }; | ||