class SlackbotFrd::SlackMethods::UsersInfo
Attributes
response[R]
Public Class Methods
info(token:, user_id:)
click to toggle source
# File lib/slackbot_frd/slack_methods/users_info.rb, line 12 def self.info(token:, user_id:) UsersInfo.new(token: token, user_id: user_id).connect.info end
new(token:, user_id:)
click to toggle source
# File lib/slackbot_frd/slack_methods/users_info.rb, line 16 def initialize(token:, user_id:) @token = token @user_id = user_id end
Public Instance Methods
connect()
click to toggle source
# File lib/slackbot_frd/slack_methods/users_info.rb, line 21 def connect @response = JSON.parse(self.class.post('', :body => { token: @token, user: @user_id } ).body) ValidateSlack.response(@response) self end
info()
click to toggle source
# File lib/slackbot_frd/slack_methods/users_info.rb, line 27 def info @response["user"] end