🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

lita-vkontakte

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lita-vkontakte

bundlerRubyGems.org
Version
1.1.0
Version published
Maintainers
1
Created
Source

Lita::Adapters::Vkontakte

Gem Version Build Status Coverage Status

VKontakte adapter for the Lita chat bot.

Usage

At first, see the documentation for Lita: https://docs.lita.io/

Installation

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

gem 'lita-vkontakte', '~> 1.1.0'

Preparation

Go to https://vk.com/editapp?act=create and create standalone application. Then go to application settings page and look at application ID and secure key.

Open terminal and type the following command (replace $LITA_VK_APP_ID with your application ID):

$ lita-vkontakte $LITA_VK_APP_ID

You will see a link. Open it in browser where you are authorized in VKontakte as your future chat bot's user. You will be redirected to some address. We need a parameter access_token from this URL.

Configuration

Required attributes

  • app_id (String) - An ID of your application
  • app_secret (String) - A secure key of your application
  • access_token (String) - An acces token from URL

Example

This is an example lita_config.rb file:

Lita.configure do |config|
  config.robot.name = 'Lita'
  config.robot.mention_name = 'lita'

  config.robot.adapter = :vkontakte

  config.adapters.vkontakte.app_id     = '2849670'
  config.adapters.vkontakte.app_secret = 'EtgJI2yFJ0GYzgDLSS8e'
  config.adapters.vkontakte.access_token  = '51jeIbjmmxJvKo7TTaW0Ext4cx6ajonDIbEkSjFofh7boyxH27JcjKXMODwZTaOxLA1bQbRyY0CEUM2TrXGK6'
end

FAQs

Package last updated on 29 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts