~pixelinc/Slack-RTM

dcc9e848bdb005fa7f15542269f3746abc664f13 — PixeL 7 months ago 3c8933c master
Add user profile
1 files changed, 20 insertions(+), 0 deletions(-)

M src/slack_rtm/mappings/user.cr
M src/slack_rtm/mappings/user.cr => src/slack_rtm/mappings/user.cr +20 -0
@@ 1,10 1,30 @@
module Slack
  struct UserProfile
    include JSON::Serializable

    getter real_name : String?
    getter display_name : String?
    getter status_text : String?
    getter status_emoji : String?
    getter avatar_hash : String?

    # TODO: method or macro or something for this??
    getter image_original : String?
    getter image_24 : String?
    getter image_32 : String?
    getter image_48 : String?
    getter image_72 : String?
    getter image_192 : String?
    getter image_512 : String?
  end

  struct User
    include JSON::Serializable

    getter id : String
    getter name : String
    getter real_name : String?
    getter profile : UserProfile
    getter is_admin : Bool?
    getter is_owner : Bool?
    getter is_bot : Bool