|
|
@ -18,15 +18,23 @@ info:
|
|
|
|
host: localhost:8008
|
|
|
|
host: localhost:8008
|
|
|
|
schemes:
|
|
|
|
schemes:
|
|
|
|
- https
|
|
|
|
- https
|
|
|
|
|
|
|
|
- http
|
|
|
|
basePath: /_matrix/media/%CLIENT_MAJOR_VERSION%
|
|
|
|
basePath: /_matrix/media/%CLIENT_MAJOR_VERSION%
|
|
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
|
|
- "*/*"
|
|
|
|
produces:
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
- application/json
|
|
|
|
- "*/*"
|
|
|
|
- "*/*"
|
|
|
|
|
|
|
|
securityDefinitions:
|
|
|
|
|
|
|
|
$ref: definitions/security.yaml
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
"/upload":
|
|
|
|
"/upload":
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: Upload some content to the content repository.
|
|
|
|
summary: Upload some content to the content repository.
|
|
|
|
produces: ["application/json"]
|
|
|
|
produces: ["application/json"]
|
|
|
|
|
|
|
|
security:
|
|
|
|
|
|
|
|
- accessToken: []
|
|
|
|
parameters:
|
|
|
|
parameters:
|
|
|
|
- in: header
|
|
|
|
- in: header
|
|
|
|
name: Content-Type
|
|
|
|
name: Content-Type
|
|
|
@ -60,6 +68,10 @@ paths:
|
|
|
|
application/json: {
|
|
|
|
application/json: {
|
|
|
|
"content_uri": "mxc://example.com/AQwafuaFswefuhsfAFAgsw"
|
|
|
|
"content_uri": "mxc://example.com/AQwafuaFswefuhsfAFAgsw"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
429:
|
|
|
|
|
|
|
|
description: This request was rate-limited.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
"$ref": "definitions/error.yaml"
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- Media
|
|
|
|
- Media
|
|
|
|
"/download/{serverName}/{mediaId}":
|
|
|
|
"/download/{serverName}/{mediaId}":
|
|
|
@ -93,6 +105,10 @@ paths:
|
|
|
|
type: "string"
|
|
|
|
type: "string"
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: file
|
|
|
|
type: file
|
|
|
|
|
|
|
|
429:
|
|
|
|
|
|
|
|
description: This request was rate-limited.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
"$ref": "definitions/error.yaml"
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- Media
|
|
|
|
- Media
|
|
|
|
"/download/{serverName}/{mediaId}/{fileName}":
|
|
|
|
"/download/{serverName}/{mediaId}/{fileName}":
|
|
|
@ -133,6 +149,10 @@ paths:
|
|
|
|
type: "string"
|
|
|
|
type: "string"
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: file
|
|
|
|
type: file
|
|
|
|
|
|
|
|
429:
|
|
|
|
|
|
|
|
description: This request was rate-limited.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
"$ref": "definitions/error.yaml"
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- Media
|
|
|
|
- Media
|
|
|
|
"/thumbnail/{serverName}/{mediaId}":
|
|
|
|
"/thumbnail/{serverName}/{mediaId}":
|
|
|
@ -184,5 +204,63 @@ paths:
|
|
|
|
enum: ["image/jpeg", "image/png"]
|
|
|
|
enum: ["image/jpeg", "image/png"]
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: file
|
|
|
|
type: file
|
|
|
|
|
|
|
|
429:
|
|
|
|
|
|
|
|
description: This request was rate-limited.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
"$ref": "definitions/error.yaml"
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
- Media
|
|
|
|
|
|
|
|
"/preview_url":
|
|
|
|
|
|
|
|
get:
|
|
|
|
|
|
|
|
summary: "Get information about a URL for a client"
|
|
|
|
|
|
|
|
produces: ["application/json"]
|
|
|
|
|
|
|
|
security:
|
|
|
|
|
|
|
|
- accessToken: []
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
- in: query
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
x-example: "https://matrix.org"
|
|
|
|
|
|
|
|
name: url
|
|
|
|
|
|
|
|
description: "The URL to get a preview of"
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
- in: query
|
|
|
|
|
|
|
|
type: number
|
|
|
|
|
|
|
|
x-example: 1510610716656
|
|
|
|
|
|
|
|
name: ts
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The preferred point in time to return a preview for. The server may
|
|
|
|
|
|
|
|
return a newer version if it does not have the requested version
|
|
|
|
|
|
|
|
available.
|
|
|
|
|
|
|
|
responses:
|
|
|
|
|
|
|
|
200:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The OpenGraph data for the URL, which may be empty. Some values are
|
|
|
|
|
|
|
|
replaced with matrix equivalents if they are provided in the response.
|
|
|
|
|
|
|
|
The differences from the OpenGraph protocol are described here.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
"matrix:image:size":
|
|
|
|
|
|
|
|
type: number
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The byte-size of the image. Omitted if there is no image attached.
|
|
|
|
|
|
|
|
"og:image":
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
An MXC URI to the image. Ommitted if there is no image.
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"og:title": "Matrix Blog Post",
|
|
|
|
|
|
|
|
"og:description": "This is a really cool blog post from matrix.org",
|
|
|
|
|
|
|
|
"og:image": "mxc://example.com/ascERGshawAWawugaAcauga",
|
|
|
|
|
|
|
|
"og:image:type": "image/png",
|
|
|
|
|
|
|
|
"og:image:height": 48,
|
|
|
|
|
|
|
|
"og:image:width": 48,
|
|
|
|
|
|
|
|
"matrix:image:size": 102400
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
429:
|
|
|
|
|
|
|
|
description: This request was rate-limited.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
"$ref": "definitions/error.yaml"
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- Media
|
|
|
|
- Media
|
|
|
|