From e611e739d7177fbe5ee404e8b77e00bb584721cc Mon Sep 17 00:00:00 2001 From: Jonathan B Date: Wed, 14 Aug 2019 21:39:18 +0200 Subject: Add require --- src/twitch/mappings/user.cr | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/twitch/mappings/user.cr (limited to 'src/twitch/mappings/user.cr') 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 -- cgit v1.2.3