Modify how descriptions are shown. Add profile API descriptions.

pull/977/head
Kegan Dougal 10 years ago
parent 862f5a3a53
commit ba6ce16509

@ -21,6 +21,9 @@ paths:
"/profile/{userId}/displayname": "/profile/{userId}/displayname":
put: put:
summary: Set the user's display name. summary: Set the user's display name.
description: |-
This API sets the given user's display name. You must have permission to
set this user's display name, e.g. you need to have their ``access_token``.
security: security:
- accessToken: [] - accessToken: []
parameters: parameters:
@ -84,6 +87,9 @@ paths:
"/profile/{userId}/avatar_url": "/profile/{userId}/avatar_url":
put: put:
summary: Set the user's avatar URL. summary: Set the user's avatar URL.
description: |-
This API sets the given user's avatar URL. You must have permission to
set this user's avatar URL, e.g. you need to have their ``access_token``.
security: security:
- accessToken: [] - accessToken: []
parameters: parameters:

@ -2,8 +2,10 @@
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}} {{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
{{endpoint.desc | wrap(80)}} {{endpoint.desc | wrap(80)}}
{{":Rate-limited: Yes." if endpoint.rate_limited else "" }} {{":Rate-limited: Yes." if endpoint.rate_limited else "" }}
{{":Requires auth: Yes." if endpoint.requires_auth else "" }} {{":Requires auth: Yes." if endpoint.requires_auth else "" }}
Request format: Request format:
================== ================= =========== =============================== ================== ================= =========== ===============================

@ -106,7 +106,7 @@ class MatrixUnits(Units):
single_api = api["paths"][path][method] single_api = api["paths"][path][method]
endpoint = { endpoint = {
"title": single_api.get("summary", ""), "title": single_api.get("summary", ""),
"desc": single_api.get("description", ""), "desc": single_api.get("description", single_api.get("summary", "")),
"method": method.upper(), "method": method.upper(),
"path": path, "path": path,
"requires_auth": "security" in single_api, "requires_auth": "security" in single_api,

Loading…
Cancel
Save