Added more API examples

This commit is contained in:
2018-03-28 01:59:14 +02:00
parent c5de0c6d6f
commit bf6a28faca
9 changed files with 69 additions and 43 deletions

View File

@ -1,17 +1,17 @@
component APIDocs(t reflect.Type, examples []string, fields []*utils.APIField)
.api-docs-page
h1= "API: " + t.Name()
h1= t.Name()
h2 Examples
if len(examples) == 0
p.no-data No examples have been added to this type yet.
p.no-data No examples available yet.
else
.buttons
each example in examples
a.button(href="https://notify.moe" + example, target="_blank")
a.button(href=example, target="_blank")
Icon("external-link")
span= example
span= strings.TrimPrefix(example, "/api")
h2 Fields