Sha256: d87b56917d4f85b5f42e4d66d3775248406931fec61a23a472ef5100ca05c9e4

Contents?: true

Size: 1.54 KB

Versions: 2

Compression:

Stored size: 1.54 KB

Contents

require_relative './telegram_on_steroids/configurable'
require_relative './telegram_on_steroids/keyboard'
require_relative './telegram_on_steroids/keyboard/inline_keyboard'
require_relative './telegram_on_steroids/keyboard/paginatable'
require_relative './telegram_on_steroids/keyboard/button'
require_relative './telegram_on_steroids/keyboard/row'
require_relative './telegram_on_steroids/action'
require_relative './telegram_on_steroids/client'
require_relative './telegram_on_steroids/params'
require_relative './telegram_on_steroids/updates'
require_relative './telegram_on_steroids/configuration'
require_relative './telegram_on_steroids/process'
require_relative './telegram_on_steroids/session'
require_relative './telegram_on_steroids/version'
require_relative './telegram_on_steroids/in_memory_store'

module TelegramOnSteroids
  UPDATE_TYPES = %w[message edited_message channel_post edited_channel_post message_reaction message_reaction_count inline_query chosen_inline_request callback_query shipping_query poll poll_answer my_chat_member chat_member chat_join_request chat_boost removed_chat_boost]

  def self.process(params)
    Process.new(params).process
  end

  def self.updates(offset: nil, limit: nil, timeout: 60, allowed_updates: nil)
    params = {}
    params[:offset] = offset if offset
    params[:limit] = limit if limit
    params[:timeout] = timeout if timeout
    params[:allowed_updates] = allowed_updates if allowed_updates

    (@updates = Updates.new(params)).enum
  end

  def self.stop_updates
    @updates && @updates.stop = true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
telegram_on_steroids-0.1.1 lib/telegram_on_steroids.rb
telegram_on_steroids-0.1.0 lib/telegram_on_steroids.rb