Project

linerb

0.0
No commit activity in last 3 years
No release in over 3 years
control LINE application via CLI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.26.2
~> 2.1.4
~> 12.3.3
~> 0.13.0
 Project Readme

Installation

$ gem install linerb

Usage

# Please read example.rb basically README is outdated

# lib/example.rb

# USE -W0 --jit

require 'linerb'

class Client
  client = LineClient.new(auth_token: "", certificate: "")
  client.do_auth_service

  talk_client = client.get_talk_service
  @talk = TalkApi.new(talk_client)

  poll_client = client.get_poll_service
  @poll = PollApi.new(poll_client)

  def self.talk
    @talk
  end

  def self.poll
    @poll
  end
end

class PollRecv
  alias_method :__op_process__, :op_process

  def op_process(op)
    Async do
      if op::type == J0_a_e_a_b_nd::RECEIVE_MESSAGE
        if op::message::toType == J0_a_e_a_b_zc::BOT
          return
        end
        Client.talk.send(:api_sendMessage, text: "text", to: "mid/gid",
                         #Optional you dont need pass this args
                         :contentType => J0_a_e_a_b_c9::NONE)
      end
      if op::type == J0_a_e_a_b_nd::NOTIFIED_INVITE_INTO_CHAT
        gid = op::param1
        Client.talk.send(:api_acceptChatInvitation, chatMid: gid)
        Client.talk.send(:api_sendMessage, text: "text", to: gid)
      end
    end
  end

  private :__op_process__
end

Async do
  Client.poll.send(:api_fetch_operations)
end

gen-rb made by TakagiChanParser

TakagiChanParser

Contact

Discord Group

Twitter

LINE