Planga Ruby Wrapper:

Planga Planga Docs Gem

Installation

Global installation: gem install planga or, for installation in a single project, add

gem 'planga', '~> 0.6.0'

to your Gemfile.

Example usage

require 'planga'

planga = Planga.new(
        # These stay the same for all chats:
        :public_api_id => "b5fc4092f05c70445fb758caac5027ca",
        :private_api_key => "ePxoM3OTkW1z6j84JDurqw",
        # These change based on the current user:
        :conversation_id => "general",
        :current_user_id => "1234",
        :current_user_name => "Bob",
    )

snippet = planga.chat_snippet()

For more information on what the different fields mean, see the main Planga.io documentation (until more detailed Ruby-specific documentation has been written).

For a guide that goes into a little bit more details, see Building Live Chat Between Users in a Rails application using Planga.io

Requirements:

  • Ruby >= 2.4.1
  • The Planga gem

Steps to build and Deploy a new version of the gem:

(This is only interesting if you want to make a fork of this Gem)

  • run gem build planga.gemspec
  • run gem push planga-n.n.n.gem