2018-07-15 12:05:19 +02:00
|
|
|
extends ../../base
|
2017-12-14 16:23:45 +01:00
|
|
|
include ../mixins
|
|
|
|
|
|
|
|
block meta
|
2018-04-18 11:39:04 +02:00
|
|
|
link(rel="stylesheet" href="/docs/assets/api/endpoints/style.css")
|
2017-12-14 16:23:45 +01:00
|
|
|
|
|
|
|
block main
|
2018-07-15 23:19:19 +02:00
|
|
|
h1= title
|
2017-12-14 16:23:45 +01:00
|
|
|
|
2017-12-16 20:02:30 +01:00
|
|
|
p#url
|
|
|
|
span.method POST
|
|
|
|
span.host
|
|
|
|
= url.host
|
|
|
|
| /
|
|
|
|
span.path= url.path
|
2017-12-14 16:23:45 +01:00
|
|
|
|
2018-07-15 23:19:19 +02:00
|
|
|
if endpoint.desc
|
|
|
|
p#desc= endpoint.desc[lang] || endpoint.desc['ja']
|
2017-12-14 16:23:45 +01:00
|
|
|
|
2018-07-15 23:19:19 +02:00
|
|
|
if endpoint.requireCredential
|
|
|
|
div.ui.info: p= i18n('docs.api.endpoints.require-credential')
|
|
|
|
|
2018-07-16 00:54:08 +02:00
|
|
|
if endpoint.limit
|
2018-07-16 17:46:06 +02:00
|
|
|
div.ui.info.warn
|
|
|
|
p
|
|
|
|
b!= i18n('docs.api.endpoints.has-limit')
|
|
|
|
if endpoint.limit.duration
|
|
|
|
!= i18n('docs.api.endpoints.duration-limit').replace('{duration}', endpoint.limit.duration).replace('{max}', endpoint.limit.max)
|
|
|
|
if endpoint.limit.minInterval
|
|
|
|
!= i18n('docs.api.endpoints.min-interval-limit').replace('{interval}', endpoint.limit.minInterval)
|
2018-07-16 00:54:08 +02:00
|
|
|
|
2018-07-15 23:19:19 +02:00
|
|
|
if params && Object.keys(params).length > 0
|
2018-07-15 20:53:03 +02:00
|
|
|
section
|
|
|
|
h2= i18n('docs.api.endpoints.params')
|
|
|
|
+propTable(params)
|
|
|
|
|
|
|
|
if paramDefs
|
|
|
|
each paramDef in paramDefs
|
|
|
|
section(id= paramDef.name)
|
|
|
|
h3= paramDef.name
|
|
|
|
+propTable(paramDef.params)
|
2018-07-15 23:19:19 +02:00
|
|
|
if params && Object.keys(params).length == 0
|
|
|
|
section
|
|
|
|
h2= i18n('docs.api.endpoints.params')
|
|
|
|
p= i18n('docs.api.endpoints.no-params')
|
2017-12-14 16:23:45 +01:00
|
|
|
|
2017-12-15 21:04:02 +01:00
|
|
|
if res
|
|
|
|
section
|
2018-07-06 05:17:38 +02:00
|
|
|
h2= i18n('docs.api.endpoints.res')
|
2017-12-15 21:04:02 +01:00
|
|
|
+propTable(res)
|
2018-07-07 06:34:42 +02:00
|
|
|
|
|
|
|
if resDefs
|
|
|
|
each resDef in resDefs
|
|
|
|
section(id= resDef.name)
|
|
|
|
h3= resDef.name
|
|
|
|
+propTable(resDef.props)
|