class Sendbird::Response

Attributes

body[R]
status[R]

Public Class Methods

new(status, body) click to toggle source
# File lib/sendbird/response.rb, line 4
def initialize(status, body)
  @status = status
  @body = JSON[body]
end

Public Instance Methods

error_code() click to toggle source
# File lib/sendbird/response.rb, line 17
def error_code
  if body['error']
    body['code']
  else
    'Not any error to report'
  end
end
error_message() click to toggle source
# File lib/sendbird/response.rb, line 9
def error_message
  if body['error']
    body['message']
  else
    'Not any error to report'
  end
end