Skip to content

Documentation

AWeirdDev edited this page Jan 23, 2023 · 29 revisions

Table Of Contents


linelib.Client

linelib.Client(
  channel_secret: str,
  channel_access_token: str,
  *args, **options: Any
)

Represents a LINE Official Account (Client).

Client - Parameters

parameter type default description
channel_secret str required Channel secret.
channel_access_token str required Channel access token.
**options Any {} See Client Options →

⚙️ Client Options

option type description example
log_level level Sets the logger level of Flask. log_level=logging.ERROR
show_logs bool Show linelib logs? show_logs=False
* Any Unnamed for linelib, only for app.run options. threaded=True

Client - Attributes

  • CS : str - Channel secret.
  • CAT : str - Channel access token.
  • app : Flask - (Running) Flask application. Note that it has been used CORS(app)
  • headers : dict - Headers for requests.
  • loop : Loop- Asyncio event loop.
  • _EVENTS* : dict- Saved event handlers.
  • _VALID_EVENTS* : list - Current valid events.

* - These attributes should not be overwritten or deleted by the user.

Client - Methods

Client.createEvents

def createEvents(
  name: str,
  obj: type
) -> None

Save the provided content to Client._EVENTS.

Client.createEvents - Parameters

parameter type default description
name str required Event name.
obj type required An event object.

Client.emitEvents

def emitEvents(
  name: str,
  *args: Any,
  **kwargs: Any
) -> None

Runs the events inside Client._EVENTS.

Client.emitEvents - Parameters

parameter type default description
name str required The event name.
*args, **kwargs Any (), {} Any arguments to add for the event handlers.

Hello! I am a cute sidebar that makes you to read this whole text with no doubt.

I was born in 1969 and collaborated with Gustavo Fring for my entire life, and my motto is: "Life is a career."

Actually, I have a more important announcement to make besides my profile.

My name is Sustavo Fring, but you can call me Sus.

I am the secondary owner of Los Pollos Hermanos that almost nobody knows.

Gustavo and I created an empire.

I AM THE DANGER.

My name is Walter Hartwell White. I live at-

Clone this wiki locally