GithubHelp home page GithubHelp logo

weggin / flask-line-notify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from louis70109/flask-line-notify

0.0 1.0 0.0 59 KB

LINE Notify + Flask 的範例專案

License: MIT License

Dockerfile 4.01% Python 36.90% HTML 59.09%

flask-line-notify's Introduction

Flask-LINE-notify

License: MIT Python Version

前一陣子看到保哥寫了一篇 LINE Notify 的文章,詳細的介紹整個操作流程,這個專案則是去實作整個流程的範例,

同時也是 Lotify 的範例程式,歡迎大家取用試玩。

LINE Notify 註冊

可以參考我之前鐵人賽的文章

設定的 Callback Url 為 http://YOUR_DOMAIN/callback,本地端測試網址就為 http://localhost:5000/callback

一鍵部署

Deploy

按下上面部署按鈕之後需要設定 LINE Notify 所需三個環境變數

本地端測試

cp .env.sample .env
python api.py

或是

cp .env.sample .env
docker-compose up

兩個方法擇一

步驟

LINE Notify 基本設定


初始頁面

開啟瀏覽器後輸入 http://localhost:5000 後就會看到一個輸入按鈕


綁定通知 - 選擇1對1聊天接收


連動完成

這時候 LINE Notify 就會推播一個綁定成功的通知


網頁範例

同時瀏覽器會被導到/notify/check 並帶上 code & state 的資訊


實測內容

路由

  • GET /
    • 使用者點選綁定的畫面
  • GET /callback
    • LINE Notify 的設定以及認證完後的 callback 路由
  • 幫忙發送推播的路由(因為有 CORS 問題所以需要一個 api 來幫忙轉發)
    • POST /notify/send
    • POST /notify/send_sticker
    • POST /notify/send_url
    • POST /notify/send_path
    • POST /notify/revoke

授權

MIT

flask-line-notify's People

Contributors

louis70109 avatar weggin avatar mikeyangyo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.