module Chatterbot::Profile

routines for managing your profile

Public Instance Methods

profile_text(p=nil) click to toggle source

get/set the profile description

# File lib/chatterbot/profile.rb, line 9
def profile_text(p=nil)
  return if require_login == false
  if p.nil?
    client.user.description
  else
    data = {
      description: p
    }
    client.update_profile(data)
    p
  end
end
profile_website(w=nil) click to toggle source

get/set the profile URL

# File lib/chatterbot/profile.rb, line 25
def profile_website(w=nil)
  return if require_login == false

  if w.nil?
    client.user.website
  else
    data = {
      url: w
    }
    client.update_profile(data)
    w
  end
end