Project

lita-glip

0.0
No commit activity in last 3 years
No release in over 3 years
A Glip adapter for Lita.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 3.4.2, ~> 3
>= 0.6.3, ~> 0
~> 12
>= 3.0.0, ~> 3
>= 0.9.2, ~> 0

Runtime

>= 0.0.5, ~> 0
>= 4.4.3, ~> 4
>= 1.12.1, ~> 1
 Project Readme

Lita Glip Adapter

Gem Version Build Status Coverage Status Dependency Status Codacy Badge Code Climate Scrutinizer Code Quality Downloads Docs License

Stack Overflow Chat

lita-glip is an adapter for Lita that allows you to use the robot with Glip.

Installation

Add lita-glip to your Lita instance's Gemfile:

gem "lita-glip"

Configuration

The Lita adapter does not support the Glip interactive bot provisioning process yet. This is because the process requires a publicly accessible OAuth redirect URL and it appears this is supported only for handlers and not adapters at the moment. To configure Lita, do the following:

  • Use a stand-in bot to get permanent bot access token to use in the Lita config like glipbot_auth
  • Use username/password credentials for a user extension. This is deprecated and not recommended but can be easier than setting up a stand-in bot.

Direct

Lita.configure do |config|
  config.robot.adapter = :glip

  # Glip app info
  config.adapters.glip.app_key = 'my_app_key'
  config.adapters.glip.app_secret = 'my_app_secret'
  config.adapters.glip.server_url = 'https://platform.devtest.ringcentral.com'
  config.adapters.glip.token = {"access_token":"DEADBEEF","token_type":"bearer","expiry":"2085-11-06T01:35:52.873185841-08:00"}
end

Dotenv

Using LitaDotenv you can use the following:

require 'lita_dotenv'

Lita.configure do |config|
  config = LitaDotenv.new(config).config
end

In your .env file:

LITA_ROBOT_ADAPTER__TYPESYM=glip

LITA_ADAPTERS_GLIP_appKey=my_app_key
LITA_ADAPTERS_GLIP_appSecret=my_app_secret
LITA_ADAPTERS_GLIP_serverUrl=https://platform.devtest.ringcentral.com
LITA_ADAPTERS_GLIP_TOKEN={"access_token":"DEADBEEF","token_type":"bearer","expiry":"2085-11-06T01:35:52.873185841-08:00"}

Username/Password Approach

Use the following in your Lita Config and .env file to configure the bot using a user extension:

Lita Config

  config.adapters.glip.username = '16505550100'
  config.adapters.glip.extension = '101'
  config.adapters.glip.password = 'my_password'

.env. file:

LITA_ADAPTERS_GLIP_USERNAME=16505550100
LITA_ADAPTERS_GLIP_EXTENSION=101
LITA_ADAPTERS_GLIP_PASSWORD=my_password

API documentation

The API documentation, useful for plugin authors, can be found for the latest gem release on RubyDoc.info.

To Do

  1. User address book lookup.

Change Log

See CHANGELOG.md

Links

Project Repo

Lita

Contributing

  1. Fork it ( http://github.com/ringcentral-ruby/lita-glip/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Lita Glip Adapter is available under the MIT license. See LICENSE.md for details.

Lita Glip Adapter © 2016-2017 by John Wang