class ShowroomApi::User

This class provides static methods for users

Public Class Methods

detail() click to toggle source

get the detailed info of the logged-in user

@return [Hash]

@example

::ShowroomLive::Api::User.detail
# File lib/showroom_api.rb, line 337
def self.detail
  return send_request("detail",nil)
end
profile(user_id) click to toggle source

get the profile info of the user

@param user_id [String] @return [Hash]

@example

::ShowroomLive::Api::User.send_request(user_id)
# File lib/showroom_api.rb, line 327
def self.profile(user_id)
  return send_request("profile",user_id)
end

Private Class Methods

send_request(cmd,user_id=nil) click to toggle source

performs http request to showroom

@param cmd [String] @param user_id [String] @return [Hash]

# File lib/showroom_api.rb, line 347
def self.send_request(cmd,user_id=nil)
  url="https://www.showroom-live.com/api/user/"
  if user_id.nil? || user_id.to_s.empty?
    ShowroomApi.showroom_live_get_api_data("#{url}#{cmd}")
  else
    ShowroomApi.showroom_live_get_api_data("#{url}#{cmd}?user_id=#{user_id}")
  end
end