Sha256: de535908eac0f0ed839a2a5609cfa917f7ff9b70783835e3afc5b2286565e360

Contents?: true

Size: 655 Bytes

Versions: 7

Compression:

Stored size: 655 Bytes

Contents

module Chatterbot

  # routines for managing your profile
  module Profile

    #
    # get/set the profile description
    #
    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

    #
    # get/set the profile URL
    #
    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
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chatterbot-2.2.0 lib/chatterbot/profile.rb
chatterbot-2.1.0 lib/chatterbot/profile.rb
chatterbot-2.0.5 lib/chatterbot/profile.rb
chatterbot-2.0.4 lib/chatterbot/profile.rb
chatterbot-2.0.3 lib/chatterbot/profile.rb
chatterbot-2.0.2 lib/chatterbot/profile.rb
chatterbot-2.0.0.pre lib/chatterbot/profile.rb