Skip to content

Commit

Permalink
[docs] add api reference section (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
sami-alajrami authored Oct 31, 2024
1 parent c23eac4 commit 3302afe
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs.kosli.com/content/api_reference/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: API Reference
bookCollapseSection: true
weight: 610
---
4 changes: 4 additions & 0 deletions docs.kosli.com/content/api_reference/v1/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: API V1
directLink: "/api_v1.html"
---
4 changes: 4 additions & 0 deletions docs.kosli.com/content/api_reference/v2/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: API V2
directLink: "/api_v2.html"
---
2 changes: 1 addition & 1 deletion docs.kosli.com/content/migrations/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Migrations
bookCollapseSection: true
weight: 600
weight: 620
---

# Migrations
10 changes: 8 additions & 2 deletions docs.kosli.com/layouts/partials/menu-filetree.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@
{{ $ancestor := .Page.IsAncestor .CurrentPage }}

{{ if .Page.Params.bookCollapseSection }}
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
<label for="section-{{ md5 .Page }}" class="flex align-center justify-between">
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
{{- partial "docs/title" .Page -}}
</a>
</label>
{{ else if .Page.Params.directLink }}
<label for="section-{{ md5 .Page }}" class="flex align-center justify-between">
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
<a href="{{ .Page.Params.directLink }}" class="{{ if $current }}active{{ end }}">
{{- partial "docs/title" .Page -}}
</a>
</label>
Expand Down
52 changes: 52 additions & 0 deletions docs.kosli.com/static/api_v1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>Kosli API V1</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">

<!--
Redoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}

.menu-content>div:first-child {
background-color: #000d40;
padding: 16px
}
</style>
</head>
<body>
<redoc spec-url='https://app.kosli.com/api/v1/public-swagger.json'
required-props-first=true
theme='{
"sidebar": {
"textColor": "#000",
"backgroundColor": "#f7f9fc"
},
"rightPanel": {
"textColor": "ivory"
},
"typography": {
"fontSize": "16px",
"fontFamily": "ibm plex sans, sans-serif",
"fontWeightRegular": "400",
"headings": {
"fontFamily": "proxima nova, sans-serif",
"fontWeight": "600"
},
"links": {
"color": "#2459D1"
}
}
}'
></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
</body>
</html>
52 changes: 52 additions & 0 deletions docs.kosli.com/static/api_v2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>Kosli API V2</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">

<!--
Redoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}

.menu-content>div:first-child {
background-color: #000d40;
padding: 16px
}
</style>
</head>
<body>
<redoc spec-url='https://app.kosli.com/api/v2/public-swagger.json'
required-props-first=true
theme='{
"sidebar": {
"textColor": "#000",
"backgroundColor": "#f7f9fc"
},
"rightPanel": {
"textColor": "ivory"
},
"typography": {
"fontSize": "16px",
"fontFamily": "ibm plex sans, sans-serif",
"fontWeightRegular": "400",
"headings": {
"fontFamily": "proxima nova, sans-serif",
"fontWeight": "600"
},
"links": {
"color": "#2459D1"
}
}
}'
></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
</body>
</html>

0 comments on commit 3302afe

Please sign in to comment.