Giter VIP home page Giter VIP logo

mirai-api-http's Introduction

logo
title

Gitter Actions Status

Mirai 是一个在全平台下运行,提供 QQ Android 和 TIM PC 协议支持的高效率机器人框架

这个项目的名字来源于

京都动画作品《境界的彼方》栗山未来(Kuriyama Mirai)

CRYPTON初音未来为代表的创作与活动(Magical Mirai)

图标以及形象由画师DazeCake绘制

mirai-api-http

Mirai HTTP API (console) plugin

Mirai-API-http插件 提供HTTP API供所有语言使用mirai

安装mirai-api-http

使用 Mirai Console Loader 安装mirai-api-http

  • MCL 支持自动更新插件,支持设置插件更新频道等功能

.\mcl --update-package net.mamoe:mirai-api-http --channel stable --type plugin

手动安装mirai-api-http

  1. 运行 Mirai Console 生成plugins文件夹
  2. Releases 下载jar并将其放入plugins文件夹中

开始使用

  1. 编辑config/MiraiApiHttp/setting.yml配置文件 (没有则自行创建)
  2. 启动 Mirai Console
  3. 记录日志中出现的authKey

setting.yml模板

## 该配置为全局配置,对所有Session有效

# 可选,默认值为0.0.0.0
host: '0.0.0.0'

# 可选,默认值为8080
port: 8080          

# 可选,默认由插件第一次启动时随机生成,建议手动指定
authKey: 1234567890  

# 可选,缓存大小,默认4096.缓存过小会导致引用回复与撤回消息失败
cacheSize: 4096

# 可选,是否开启websocket,默认关闭,建议通过Session范围的配置设置
enableWebsocket: false

# 可选,配置CORS跨域,默认为*,即允许所有域名
cors: 
  - '*'

## 消息上报
report:
# 功能总开关
  enable: false
  # 群消息上报
  groupMessage:
    report: false
  # 好友消息上报
  friendMessage:
    report: false
  # 临时消息上报
  tempMessage:
    report: false
  # 事件上报
  eventMessage:
    report: false
  # 上报URL
  destinations: []
  # 上报时的额外Header
  extraHeaders: {}

## 心跳
heartbeat:
  # 功能总开关
  enable: false
  # 启动延迟
  delay: 1000
  # 心跳间隔
  period: 15000
  # 心跳上报URL
  destinations: []
  # 上报时的额外信息
  extraBody: {}
  # 上报时的额外头
  extraHeaders: {}

有关配置的详细信息请参考文档-其他.

调试API

调试API已完成,点我查看

更新日志

点我查看

文档

mirai-api-http's People

Contributors

aruelius avatar asakuramizu avatar copydog avatar dfaofeng avatar doctor-yin avatar hieuzest avatar him188 avatar hoshinotented avatar icebear67 avatar karlatemp avatar kawaiizapic avatar lanyizi avatar liujiahua123123 avatar peratx avatar ryoii avatar u2x1 avatar wyapx avatar yoshino-s avatar yunyoujun 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.