import os

from linebot import LineBotApi, WebhookParser
from linebot.models import MessageEvent, TextMessage, TextSendMessage


channel_access_token = os.getenv("LINE_CHANNEL_ACCESS_TOKEN", None)


def send_text_message(reply_token, text):
    line_bot_api = LineBotApi(channel_access_token)
    line_bot_api.reply_message(reply_token, TextSendMessage(text=text))

    return "OK"


def send_image_url(user_id, img):
    message=img
    line_bot_api = LineBotApi(channel_access_token)
    line_bot_api.push_message(user_id,message)
"""
def send_button_message(id, text, buttons):
    pass
"""
def push_message(push_token,text):
    line_bot_api = LineBotApi(channel_access_token)
    line_bot_api.push_message(push_token,TextSendMessage(text=text))
