Added more API examples
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
component API(types []string)
|
||||
h1 API
|
||||
|
||||
table
|
||||
//- thead
|
||||
//- tr
|
||||
//- th Table
|
||||
tbody
|
||||
each typeName in types
|
||||
tr
|
||||
td= typeName
|
||||
td
|
||||
a(href="/api/" + strings.ToLower(typeName) + "/")= "/api/" + strings.ToLower(typeName) + "/"
|
||||
.api-docs-page
|
||||
h1 API
|
||||
|
||||
table
|
||||
//- thead
|
||||
//- tr
|
||||
//- th Table
|
||||
tbody
|
||||
each typeName in types
|
||||
tr
|
||||
td= typeName
|
||||
td
|
||||
a(href="/api/" + strings.ToLower(typeName) + "/")= "/api/" + strings.ToLower(typeName) + "/"
|
@ -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
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
.api-docs-page
|
||||
h1,
|
||||
h2
|
||||
h2,
|
||||
p
|
||||
text-align left
|
||||
|
||||
table
|
||||
|
Reference in New Issue
Block a user