Files
matterbridge/docs/swagger/swagger.json
2018-11-29 03:36:48 +08:00

121 lines
3.3 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "A read/write API for the Matterbridge chat bridge.",
"title": "Matterbridge API",
"contact": {},
"license": {
"name": "Apache 2.0",
"url": "https://github.com/42wim/matterbridge/blob/master/LICENSE"
}
},
"basePath": "/api",
"paths": {
"/message": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Create/Update a message",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/config.Message"
}
}
}
}
},
"/messages": {
"get": {
"produces": [
"application/json"
],
"summary": "Lists messages",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/config.Message"
}
}
}
}
}
},
"/stream": {
"get": {
"produces": [
"application/json"
],
"summary": "Streams realtime messages",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/config.Message"
}
}
}
}
}
},
"definitions": {
"config.Message": {
"type": "object",
"properties": {
"account": {
"type": "string"
},
"avatar": {
"type": "string"
},
"channel": {
"type": "string"
},
"event": {
"type": "string"
},
"extra": {
"type": "object"
},
"gateway": {
"type": "string"
},
"id": {
"type": "string"
},
"protocol": {
"type": "string"
},
"text": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"userid": {
"type": "string"
},
"username": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}