Project

bot_delive

0.0
No commit activity in last 3 years
No release in over 3 years
BotDelive is a Push Notification and 2-factor authentication API service that works over the chat bots (Telegram and Messenger).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

 Project Readme

BotDelive

BotDelive is a Push Notification and 2-factor authentication API service that works over the chat bots (Telegram and Messenger).


Requirements

  1. Create an account.
  2. Create an app on the dashboard to get appId and secretKey credentials.

Installation

Add this line to your application's Gemfile:

gem 'bot_delive'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bot_delive

Usage

Let's require the gem first. Don't forget to define "app_id" and "secret_key"

require 'bot_delive'

BotDelive.configure do |config|
  config.app_id = 'test_id'
  config.secret_key = 'test_secret'
end

Verify the "Access Code":

@response = BotDelive.verify(access_code: 'access-code')
if @response.success?
  @response.payload.user_id
end

Send 2-factor authentication request (long polling):

@response = BotDelive.auth(user_id: 'user-id')
if @response.success?
  @response.payload.respond
end

Send Push Notification request:

@response = BotDelive.push(
    user_id: 'user-id',
    message: 'test message from ruby test'
)

if @response.success?
  puts "push notification sent successfully"
end

Documentation

Complete documentation available at: https://botdelive.com/docs

License

The gem is available as open source under the terms of the MIT License.