summaryrefslogtreecommitdiff
path: root/src/twitch/mappings
diff options
context:
space:
mode:
authorJonathan B <greenbigfrog@gmail.com>2019-08-14 21:39:18 +0200
committerJonathan B <greenbigfrog@gmail.com>2019-08-14 21:39:18 +0200
commite611e739d7177fbe5ee404e8b77e00bb584721cc (patch)
treebfad16f083ebe289fd7fc2e9dae842150e61fa98 /src/twitch/mappings
parent99b3d7287bd0ac36ee82129ad38bd88c5b5af625 (diff)
downloadtwitcr-e611e739d7177fbe5ee404e8b77e00bb584721cc.tar.gz
twitcr-e611e739d7177fbe5ee404e8b77e00bb584721cc.zip
Add require
Diffstat (limited to 'src/twitch/mappings')
-rw-r--r--src/twitch/mappings/converters.cr3
-rw-r--r--src/twitch/mappings/user.cr21
2 files changed, 0 insertions, 24 deletions
diff --git a/src/twitch/mappings/converters.cr b/src/twitch/mappings/converters.cr
deleted file mode 100644
index d9b57e9..0000000
--- a/src/twitch/mappings/converters.cr
+++ /dev/null
@@ -1,3 +0,0 @@
-module Twitcr
- TIME_FORMAT = Time::Format.new("%FT%TZ")
-end
diff --git a/src/twitch/mappings/user.cr b/src/twitch/mappings/user.cr
deleted file mode 100644
index 6ddd08b..0000000
--- a/src/twitch/mappings/user.cr
+++ /dev/null
@@ -1,21 +0,0 @@
-require "./converters"
-
-module Twitcr
- struct UserList
- JSON.mapping({data: Array(User)})
- end
-
- struct User
- JSON.mapping({
- id: {type: UInt64, converter: ID::Converter},
- login: String,
- display_name: String,
- })
- end
-end
-
-module ID::Converter
- def self.from_json(value : JSON::PullParser) : UInt64
- UInt64.new(value.read_string)
- end
-end