Code Monkey home page Code Monkey logo

lark-robot-message's Introduction

lark-robot-message

快速搭建一个飞书机器人消息卡片的 HTTP 服务(基础卡片)。

使用示例

# 1.服务运行
[admin@localhost ~]$ ./lark-robot-message/manage.py
 * Serving Flask app 'src' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on all addresses (0.0.0.0)
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://127.0.0.1:8000
 * Running on http://xx.xx.xx.xx:8000 (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 139-674-975


# 2.编写消息请求
[admin@localhost ~]$ vim call.sh
#!/bin/sh

curl --location --request POST 'http://127.0.0.1:8000/api/robot-msg' \
--header 'Authorization: Token xxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "title": "测试标题",
    "content": "测试内容😊: \nPart 01\nPart 02"
}'

#EOF


# 3.服务调用
[admin@localhost ~]$ yum -y install jq

[admin@localhost ~]$ sh call.sh | jq .
{
  "code": 0,
  "msg": "success",
  "data": {
    "email": "[email protected]",
    "title": "测试标题",
    "content": "测试内容😊: \nPart 01\nPart 02"
  }
}

image

lark-robot-message's People

Contributors

pokeyaro avatar

Stargazers

BAI001 avatar H29 avatar  avatar liber avatar

Watchers

 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.