From ba7b18c144941c367b77a959181156cc24c6488e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Tue, 22 May 2018 14:57:34 -0500 Subject: [PATCH] Closes #49, with CSS fixes --- .vuepress/scss/pages/_documentation.scss | 4 ++ .vuepress/scss/pages/_page.scss | 28 ++++++++++-- .vuepress/theme/Layout.vue | 24 +++++++++-- open-api/lbry.md | 55 ++++++++++++++++++++++++ open-api/lbrycrd.md | 55 ++++++++++++++++++++++++ 5 files changed, 160 insertions(+), 6 deletions(-) create mode 100644 open-api/lbry.md create mode 100644 open-api/lbrycrd.md diff --git a/.vuepress/scss/pages/_documentation.scss b/.vuepress/scss/pages/_documentation.scss index 20d4cf0..b748cf8 100644 --- a/.vuepress/scss/pages/_documentation.scss +++ b/.vuepress/scss/pages/_documentation.scss @@ -4,6 +4,10 @@ padding-top: 2rem; } + h4 + h2 { + padding-top: 2rem; + } + .blog-post { a { display: inline-block; diff --git a/.vuepress/scss/pages/_page.scss b/.vuepress/scss/pages/_page.scss index 12af828..fe587fe 100644 --- a/.vuepress/scss/pages/_page.scss +++ b/.vuepress/scss/pages/_page.scss @@ -25,15 +25,18 @@ .page__header__title { font-weight: 300; - line-height: 6.5rem; text-shadow: 1px 1px 2px rgba($black, 0.3); @media (min-width: 901px) { font-size: 3rem; + line-height: 6.5rem; } @media (max-width: 900px) { font-size: 2rem; + line-height: 1; + padding-top: 1rem; + padding-bottom: 1rem; } } @@ -165,11 +168,30 @@ pre { margin-bottom: 2rem; padding: 2rem; - background-color: $black; border-radius: 3px; - color: $white; font-size: 1rem; line-height: 1.33; + overflow-x: auto; + overflow-y: hidden; + + &:not([class]), + &.language-text { + background-color: $black; + color: $white; + } + + &.language-yaml { + background-color: #27273f; + color: #ffe066; + + .atrule { + color: #f083ac; + } + + .punctuation { + color: $white; + } + } } table { diff --git a/.vuepress/theme/Layout.vue b/.vuepress/theme/Layout.vue index 50ab8f2..52254fa 100644 --- a/.vuepress/theme/Layout.vue +++ b/.vuepress/theme/Layout.vue @@ -120,10 +120,28 @@

API Specification

All of our APIs, in one place

+

chainquery

+ +

lbry

+ + +

lbrycrd

+ + +

Lighthouse

+

The Front Desk

diff --git a/open-api/lbry.md b/open-api/lbry.md new file mode 100644 index 0000000..9345112 --- /dev/null +++ b/open-api/lbry.md @@ -0,0 +1,55 @@ +--- +title: LBRY OpenAPI Specification +--- + + + +```yaml +openapi: "3.0.0" +info: + version: 1.0.0 + title: LBRY + license: + name: MIT +servers: + - url: http://lbry.swagger.io/v1 +paths: + /blob_announce: + get: + summary: Announce blobs to the DHT + operationId: blobAnnounce + tags: + - blob + parameters: + - name: blob_hash + in: query + description: announce a blob, specified by blob_hash + required: false + schema: + type: string + - name: stream_hash + in: query + description: announce all blobs associated with stream_hash + required: false + schema: + type: string + - name: sd_hash + in: query + description: announce all blobs associated with sd_hash and the sd_hash itself + required: false + schema: + type: string + responses: + true: + description: A paged array of pets + content: + application/json: + schema: + $ref: "#/components/schemas/Blob" + default: + description: unsuccessful announcement + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +``` diff --git a/open-api/lbrycrd.md b/open-api/lbrycrd.md new file mode 100644 index 0000000..80e2651 --- /dev/null +++ b/open-api/lbrycrd.md @@ -0,0 +1,55 @@ +--- +title: LBRYcrd OpenAPI Specification +--- + + + +```yaml +openapi: "3.0.0" +info: + version: 1.0.0 + title: LBRYcrd + license: + name: MIT +servers: + - url: http://lbrycrd.swagger.io/v1 +paths: + /blob_announce: + get: + summary: Announce blobs to the DHT + operationId: blobAnnounce + tags: + - blob + parameters: + - name: blob_hash + in: query + description: announce a blob, specified by blob_hash + required: false + schema: + type: string + - name: stream_hash + in: query + description: announce all blobs associated with stream_hash + required: false + schema: + type: string + - name: sd_hash + in: query + description: announce all blobs associated with sd_hash and the sd_hash itself + required: false + schema: + type: string + responses: + true: + description: A paged array of pets + content: + application/json: + schema: + $ref: "#/components/schemas/Blob" + default: + description: unsuccessful announcement + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +```