{ "info": { "version": "1.0.0", "title": "Gitter Streaming API" }, "channels": { "/": { "publish": { "message": { "oneOf": [ { "$ref": "#/components/messages/chatMessage" }, { "$ref": "#/components/messages/heartbeat" } ] } } } }, "components": { "securitySchemes": { "httpBearerToken": { "scheme": "bearer", "type": "http" } }, "messages": { "heartbeat": { "payload": { "enum": [ "\r\n" ], "type": "string" }, "summary": "Its purpose is to keep the connection alive." }, "chatMessage": { "payload": { "type": "object", "properties": { "gv": { "type": "string", "description": "Stands for \"Gravatar version\" and is used for cache busting." }, "fromUser": { "type": "object", "description": "User that sent the message.", "properties": { "username": { "type": "string", "description": "Gitter/GitHub username." }, "gv": { "type": "string", "description": "Stands for \"Gravatar version\" and is used for cache busting." }, "displayName": { "type": "string", "description": "Gitter/GitHub user real name." }, "avatarUrl": { "type": "string", "description": "User avatar URI.", "format": "uri" }, "url": { "type": "string", "description": "Path to the user on Gitter." }, "avatarUrlSmall": { "type": "string", "description": "User avatar URI (small).", "format": "uri" }, "v": { "type": "number", "description": "Version." }, "avatarUrlMedium": { "type": "string", "description": "User avatar URI (medium).", "format": "uri" }, "id": { "type": "string", "description": "Gitter User ID." } } }, "text": { "type": "string", "description": "Original message in plain-text/markdown." }, "readBy": { "type": "number", "description": "Number of users that have read the message." }, "html": { "type": "string", "description": "HTML formatted message." }, "meta": { "items": {}, "type": "array", "description": "Metadata. This is currently not used for anything." }, "sent": { "type": "string", "description": "ISO formatted date of the message.", "format": "date-time" }, "urls": { "items": { "type": "string", "format": "uri" }, "type": "array", "description": "List of URLs present in the message." }, "v": { "type": "number", "description": "Version." }, "mentions": { "items": { "type": "object", "properties": { "userIds": { "items": { "type": "string" }, "type": "array" }, "userId": { "type": "string" }, "screenName": { "type": "string" } } }, "type": "array", "description": "List of @Mentions in the message." }, "unread": { "type": "boolean", "description": "Boolean that indicates if the current user has read the message." }, "id": { "type": "string", "description": "ID of the message." }, "issues": { "items": { "type": "object", "properties": { "number": { "type": "string" } } }, "type": "array", "description": "List of #Issues referenced in the message." } } }, "summary": "A message represents an individual chat message sent to a room. They are a sub-resource of a room." } } }, "asyncapi": "2.0.0-rc1", "id": "urn:gitter.streaming.api", "servers": [ { "urls": "https://stream.gitter.im/v1/rooms/{roomId}/{resource}", "variables": { "roomId": { "description": "Id of the Gitter room." }, "resource": { "enum": [ "chatMessages", "events" ], "description": "The resource to consume." } }, "protocol": "https", "security": [ { "httpBearerToken": [] } ], "protocolVersion": "1.1" } ] }