Fix start/count/sort params in documentation

This commit is contained in:
Chocobozzz 2018-07-17 16:37:28 +02:00
parent aa1c3d929f
commit 330eaf1296
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
13 changed files with 1148 additions and 1257 deletions

View File

@ -0,0 +1,7 @@
parameters:
name:
name: name
in: path
required: true
type: string
description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'

View File

@ -0,0 +1,23 @@
parameters:
start:
name: start
in: query
required: false
type: number
description: 'Offset'
count:
name: count
in: query
required: false
type: number
description: 'Number of items'
sort:
name: sort
in: query
required: false
type: string
description: 'Sort column (-createdAt for example)'
responses:
emptySuccess:
description: 'Successful operation'

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
function Traverse(a,b){this.$element=a,this.options=$.extend({},Traverse.defaults,this.$element.data(),b),this._init()}$(function(){var a=$("#sidebar");if(a.length){var b=($("#docs"),a.find("nav"));new Traverse(b,{threshold:10,barOffset:a.position().top});b.on("update.traverse",function(a,c){b.find("section").removeClass("expand");var d=c.parents("section:first");d.length&&d.addClass("expand")});var c=$(".drawer-layout"),d=c.find(".drawer"),e=function(){return d.removeClass("slide-right slide-left"),d.find(".drawer-overlay").remove(),c.removeClass("drawer-open drawer-slide-left-large drawer-slide-right-large"),!1};c.find("[data-drawer-slide]").click(function(a){var b=$(this),f=b.data("drawer-slide");c.addClass("drawer-open"),d.addClass("slide-"+f);var g=$('<a href="#" class="drawer-overlay"></a>');return d.append(g),g.click(e),!1}),c.find("[data-drawer-close]").click(e)}}),Traverse.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"active",deepLinking:!1,barOffset:0},Traverse.prototype._init=function(){var a=this.$element[0].id;this.$targets=$("[data-traverse-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":a,"data-scroll":a,id:a}),this.$active=$(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()},Traverse.prototype.calcPoints=function(){var a=this,b=document.body,c=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,c.clientHeight)),this.docHeight=Math.round(Math.max(b.scrollHeight,b.offsetHeight,c.clientHeight,c.scrollHeight,c.offsetHeight)),this.$targets.each(function(){var b=$(this),c=b.offset().top;b.targetPoint=c,a.points.push(c)})},Traverse.prototype._events=function(){var a=this,b=$("html, body"),c={duration:a.options.animationDuration,easing:a.options.animationEasing};$(window).one("load",function(){a.calcPoints(),a._updateActive(),$(this).resize(function(b){a.reflow()}).scroll(function(b){a._updateActive()})}),this.$element.on("click",'a[href^="#"]',function(d){d.preventDefault();var e=this.getAttribute("href").replace(".","\\."),f=$(e).offset().top-a.options.barOffset;b.stop(!0).animate({scrollTop:f},c)})},Traverse.prototype.reflow=function(){this.calcPoints(),this._updateActive()},Traverse.prototype._updateActive=function(){var a,b=parseInt(window.pageYOffset,10);if(b+this.winHeight===this.docHeight)a=this.points.length-1;else if(b<this.points[0])a=0;else{var c=this.scrollPos<b,d=this,e=this.points.filter(function(a,e){return c?a<=b+d.options.barOffset+d.options.threshold:a-(d.options.barOffset+d.options.threshold)<=b});a=e.length?e.length-1:0}var f=this.$active,g=this.$links.eq(a);if(this.$active.removeClass(this.options.activeClass),this.$active=g.addClass(this.options.activeClass),this.options.deepLinking){var h=this.$active[0].getAttribute("href");window.history.pushState?window.history.pushState(null,null,h):window.location.hash=h}this.scrollPos=b;var i=f[0]!==g[0];i&&this.$element.trigger("update.traverse",[this.$active])}; function Traverse(t,e){this.$element=t,this.options=$.extend({},Traverse.defaults,this.$element.data(),e),this._init()}$(function(){var t=$("#sidebar");if(t.length){$("#docs");var s=t.find("nav");new Traverse(s,{threshold:10,barOffset:t.position().top});s.on("update.traverse",function(t,e){s.find("section").removeClass("expand");var i=e.parents("section:first");i.length&&i.addClass("expand")});var a=$(".drawer-layout"),n=a.find(".drawer"),r=function(){return n.removeClass("slide-right slide-left"),n.find(".drawer-overlay").remove(),a.removeClass("drawer-open drawer-slide-left-large drawer-slide-right-large"),!1};a.find("[data-drawer-slide]").click(function(t){var e=$(this).data("drawer-slide");a.addClass("drawer-open"),n.addClass("slide-"+e);var i=$('<a href="#" class="drawer-overlay"></a>');return n.append(i),i.click(r),!1}),a.find("[data-drawer-close]").click(r)}}),Traverse.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"active",deepLinking:!1,barOffset:0},Traverse.prototype._init=function(){var t=this.$element[0].id;this.$targets=$("[data-traverse-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":t,"data-scroll":t,id:t}),this.$active=$(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()},Traverse.prototype.calcPoints=function(){var i=this,t=document.body,e=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,e.clientHeight)),this.docHeight=Math.round(Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)),this.$targets.each(function(){var t=$(this),e=t.offset().top;t.targetPoint=e,i.points.push(e)})},Traverse.prototype._events=function(){var s=this,a=$("html, body"),n={duration:s.options.animationDuration,easing:s.options.animationEasing};$(window).one("load",function(){s.calcPoints(),s._updateActive(),$(this).resize(function(t){s.reflow()}).scroll(function(t){s._updateActive()})}),this.$element.on("click",'a[href^="#"]',function(t){t.preventDefault();var e=this.getAttribute("href").replace(".","\\."),i=$(e).offset().top-s.options.barOffset;a.stop(!0).animate({scrollTop:i},n)})},Traverse.prototype.reflow=function(){this.calcPoints(),this._updateActive()},Traverse.prototype._updateActive=function(){var t,i=parseInt(window.pageYOffset,10);if(i+this.winHeight===this.docHeight)t=this.points.length-1;else if(i<this.points[0])t=0;else{var s=this.scrollPos<i,a=this,e=this.points.filter(function(t,e){return s?t<=i+a.options.barOffset+a.options.threshold:t-(a.options.barOffset+a.options.threshold)<=i});t=e.length?e.length-1:0}var n=this.$active,r=this.$links.eq(t);if(this.$active.removeClass(this.options.activeClass),this.$active=r.addClass(this.options.activeClass),this.options.deepLinking){var o=this.$active[0].getAttribute("href");window.history.pushState?window.history.pushState(null,null,o):window.location.hash=o}this.scrollPos=i,n[0]!==r[0]&&this.$element.trigger("update.traverse",[this.$active])};

View File

@ -441,7 +441,7 @@ body {
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-weight: normal; font-weight: normal;
line-height: 1.5; line-height: 1.5;
color: #23241f; color: #2d3134;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; } -moz-osx-font-smoothing: grayscale; }
@ -1443,7 +1443,7 @@ cite {
content: "— "; } content: "— "; }
abbr, abbr[title] { abbr, abbr[title] {
border-bottom: 1px dotted #23241f; border-bottom: 1px dotted #2d3134;
cursor: help; cursor: help;
text-decoration: none; } text-decoration: none; }
@ -1456,14 +1456,14 @@ code {
background-color: #e6e6e6; background-color: #e6e6e6;
font-family: Consolas, "Liberation Mono", Courier, monospace; font-family: Consolas, "Liberation Mono", Courier, monospace;
font-weight: normal; font-weight: normal;
color: #23241f; } color: #2d3134; }
kbd { kbd {
margin: 0; margin: 0;
padding: 0.1315789474rem 0.2631578947rem 0; padding: 0.1315789474rem 0.2631578947rem 0;
background-color: #e6e6e6; background-color: #e6e6e6;
font-family: Consolas, "Liberation Mono", Courier, monospace; font-family: Consolas, "Liberation Mono", Courier, monospace;
color: #23241f; } color: #2d3134; }
.subheader { .subheader {
margin-top: 0.2rem; margin-top: 0.2rem;
@ -1624,16 +1624,16 @@ ul.no-bullet, ol.no-bullet {
color: #fefefe; } color: #fefefe; }
.button.success { .button.success {
background-color: #3adb76; background-color: #3adb76;
color: #23241f; } color: #2d3134; }
.button.success:hover, .button.success:focus { .button.success:hover, .button.success:focus {
background-color: #22bb5b; background-color: #22bb5b;
color: #23241f; } color: #2d3134; }
.button.warning { .button.warning {
background-color: #ffae00; background-color: #ffae00;
color: #23241f; } color: #2d3134; }
.button.warning:hover, .button.warning:focus { .button.warning:hover, .button.warning:focus {
background-color: #cc8b00; background-color: #cc8b00;
color: #23241f; } color: #2d3134; }
.button.alert { .button.alert {
background-color: #cc4b37; background-color: #cc4b37;
color: #fefefe; } color: #fefefe; }
@ -1663,13 +1663,13 @@ ul.no-bullet, ol.no-bullet {
cursor: not-allowed; } cursor: not-allowed; }
.button.disabled.success, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success, .button[disabled].success:hover, .button[disabled].success:focus { .button.disabled.success, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success, .button[disabled].success:hover, .button[disabled].success:focus {
background-color: #3adb76; background-color: #3adb76;
color: #23241f; } color: #2d3134; }
.button.disabled.warning, .button[disabled].warning { .button.disabled.warning, .button[disabled].warning {
opacity: 0.25; opacity: 0.25;
cursor: not-allowed; } cursor: not-allowed; }
.button.disabled.warning, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning, .button[disabled].warning:hover, .button[disabled].warning:focus { .button.disabled.warning, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning, .button[disabled].warning:hover, .button[disabled].warning:focus {
background-color: #ffae00; background-color: #ffae00;
color: #23241f; } color: #2d3134; }
.button.disabled.alert, .button[disabled].alert { .button.disabled.alert, .button[disabled].alert {
opacity: 0.25; opacity: 0.25;
cursor: not-allowed; } cursor: not-allowed; }
@ -1846,12 +1846,12 @@ textarea {
border: 1px solid #cacaca; border: 1px solid #cacaca;
border-radius: 0; border-radius: 0;
background-color: #fefefe; background-color: #fefefe;
box-shadow: inset 0 1px 2px rgba(35, 36, 31, 0.1); box-shadow: inset 0 1px 2px rgba(45, 49, 52, 0.1);
font-family: inherit; font-family: inherit;
font-size: 1.0526315789rem; font-size: 1.0526315789rem;
font-weight: normal; font-weight: normal;
line-height: 1.5; line-height: 1.5;
color: #23241f; color: #2d3134;
transition: box-shadow 0.5s, border-color 0.25s ease-in-out; transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
appearance: none; } appearance: none; }
[type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus, [type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus,
@ -1914,7 +1914,7 @@ label {
font-size: 0.9210526316rem; font-size: 0.9210526316rem;
font-weight: normal; font-weight: normal;
line-height: 1.8; line-height: 1.8;
color: #23241f; } color: #2d3134; }
label.middle { label.middle {
margin: 0 0 1.0526315789rem; margin: 0 0 1.0526315789rem;
padding: 0.5921052632rem 0; } padding: 0.5921052632rem 0; }
@ -1923,7 +1923,7 @@ label {
margin-top: -0.5263157895rem; margin-top: -0.5263157895rem;
font-size: 0.8552631579rem; font-size: 0.8552631579rem;
font-style: italic; font-style: italic;
color: #23241f; } color: #2d3134; }
.input-group { .input-group {
display: flex; display: flex;
@ -1946,7 +1946,7 @@ label {
padding: 0 1rem; padding: 0 1rem;
border: 1px solid #cacaca; border: 1px solid #cacaca;
background: #e6e6e6; background: #e6e6e6;
color: #23241f; color: #2d3134;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
@ -2007,7 +2007,7 @@ select {
font-size: 1.0526315789rem; font-size: 1.0526315789rem;
font-weight: normal; font-weight: normal;
line-height: 1.5; line-height: 1.5;
color: #23241f; color: #2d3134;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: rgb%28138, 138, 138%29'></polygon></svg>"); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: rgb%28138, 138, 138%29'></polygon></svg>");
background-origin: content-box; background-origin: content-box;
background-position: right -1.0526315789rem center; background-position: right -1.0526315789rem center;
@ -2170,7 +2170,7 @@ select {
[data-whatinput='mouse'] .close-button { [data-whatinput='mouse'] .close-button {
outline: 0; } outline: 0; }
.close-button:hover, .close-button:focus { .close-button:hover, .close-button:focus {
color: #23241f; } color: #2d3134; }
.close-button.small { .close-button.small {
right: 0.66rem; right: 0.66rem;
top: 0.33em; top: 0.33em;
@ -2200,10 +2200,10 @@ select {
color: #fefefe; } color: #fefefe; }
.label.success { .label.success {
background: #3adb76; background: #3adb76;
color: #23241f; } color: #2d3134; }
.label.warning { .label.warning {
background: #ffae00; background: #ffae00;
color: #23241f; } color: #2d3134; }
.label.alert { .label.alert {
background: #cc4b37; background: #cc4b37;
color: #fefefe; } color: #fefefe; }
@ -2223,10 +2223,10 @@ table {
font-weight: bold; } font-weight: bold; }
thead { thead {
background: #f8f8f8; background: #f8f8f8;
color: #23241f; } color: #2d3134; }
tfoot { tfoot {
background: #f1f1f1; background: #f1f1f1;
color: #23241f; } color: #2d3134; }
thead tr, thead tr,
tfoot tr { tfoot tr {
background: transparent; } background: transparent; }

File diff suppressed because one or more lines are too long

View File

@ -1019,7 +1019,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
#spectacle #sidebar a { #spectacle #sidebar a {
display: block; display: block;
margin: 0 0 0.25rem; margin: 0 0 0.25rem;
color: #46483e; color: #4a5055;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
@ -1053,7 +1053,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
@media print, screen and (min-width: 64em) { @media print, screen and (min-width: 64em) {
#spectacle #docs .example-box { #spectacle #docs .example-box {
display: block; display: block;
background-color: #23241f; background-color: #2d3134;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
@ -1063,7 +1063,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
#spectacle article .no-description { #spectacle article .no-description {
color: #8a8a8a; } color: #8a8a8a; }
#spectacle article dt { #spectacle article dt {
color: #23241f; } color: #2d3134; }
#spectacle article table.table { #spectacle article table.table {
width: 100%; } width: 100%; }
#spectacle article code { #spectacle article code {
@ -1087,7 +1087,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
font-weight: bold; font-weight: bold;
background: transparent; background: transparent;
border: none; border: none;
color: #515448; } color: #535b60; }
#spectacle article h1.doc-title span { #spectacle article h1.doc-title span {
display: none; display: none;
opacity: 0.65; opacity: 0.65;
@ -1123,6 +1123,8 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
border-top: 1px solid #ddd; } border-top: 1px solid #ddd; }
#spectacle article .prop-row .prop-title { #spectacle article .prop-row .prop-title {
font-weight: bold; } font-weight: bold; }
#spectacle article .prop-row .prop-type {
font-weight: 400; }
#spectacle article .prop-row .prop-subtitle { #spectacle article .prop-row .prop-subtitle {
font-weight: 400; font-weight: 400;
font-size: 80%; } font-size: 80%; }
@ -1153,7 +1155,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
padding-left: 2.25rem !important; padding-left: 2.25rem !important;
padding-right: 2.25rem !important; padding-right: 2.25rem !important;
color: #fefefe; color: #fefefe;
background-color: #23241f; } background-color: #2d3134; }
#spectacle article .doc-examples h5 { #spectacle article .doc-examples h5 {
color: #fefefe; color: #fefefe;
font-size: 1rem; font-size: 1rem;
@ -1169,7 +1171,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
display: block; display: block;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
padding: 1.5rem; padding: 1.5rem;
font-family: Consolas,"Liberation Mono",Courier,monospace; font-family: Consolas, "Liberation Mono", Courier, monospace;
font-weight: inherit; font-weight: inherit;
color: inherit; color: inherit;
background-color: transparent; background-color: transparent;
@ -1181,6 +1183,15 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
word-spacing: normal; word-spacing: normal;
white-space: pre-wrap; white-space: pre-wrap;
word-break: normal; } word-break: normal; }
#spectacle article .doc-examples tbody tr:nth-child(even) {
border-bottom: 0;
background-color: #353a3d; }
#spectacle article .doc-examples tbody, #spectacle article .doc-examples tfoot, #spectacle article .doc-examples thead {
color: #FFFFFF;
background-color: #2d3134;
border: 0px; }
#spectacle article .doc-examples thead {
background-color: #2d3134; }
#spectacle article .doc-examples .swagger-response-headers { #spectacle article .doc-examples .swagger-response-headers {
background-color: transparent; background-color: transparent;
border: none; border: none;
@ -1235,7 +1246,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
#spectacle article .definition dl dt { #spectacle article .definition dl dt {
font-weight: normal; } font-weight: normal; }
#spectacle article .definition dl dd { #spectacle article .definition dl dd {
font-weight: lighter; } font-style: italic; }
#spectacle article .definition .json-property-name { #spectacle article .definition .json-property-name {
font-weight: bold; } font-weight: bold; }
#spectacle article .hljs { #spectacle article .hljs {
@ -1245,7 +1256,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
margin-bottom: 1rem; margin-bottom: 1rem;
border: none; } border: none; }
#spectacle .drawer-layout .drawer { #spectacle .drawer-layout .drawer {
box-shadow: 0 0 10px rgba(35, 36, 31, 0.5); box-shadow: 0 0 10px rgba(45, 49, 52, 0.5);
transition: transform 0.5s ease; transition: transform 0.5s ease;
backface-visibility: hidden; } backface-visibility: hidden; }
#spectacle .drawer-layout .drawer.slide-left { #spectacle .drawer-layout .drawer.slide-left {
@ -1283,7 +1294,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
position: fixed; position: fixed;
top: 0.75rem; top: 0.75rem;
right: 0.75rem; right: 0.75rem;
background-color: rgba(35, 36, 31, 0.75); background-color: rgba(45, 49, 52, 0.75);
padding: 0.65rem; padding: 0.65rem;
z-index: 1; z-index: 1;
border-radius: 5px; border-radius: 5px;

File diff suppressed because one or more lines are too long

View File

@ -25,26 +25,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: name - $ref: "accounts.yaml#/parameters/name"
in: path - $ref: "commons.yaml#/parameters/start"
required: true - $ref: "commons.yaml#/parameters/count"
type: string - $ref: "commons.yaml#/parameters/sort"
description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
- name: start
in: query
required: false
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -59,11 +43,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: name - $ref: "accounts.yaml#/parameters/name"
in: path
required: true
type: string
description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -141,22 +121,10 @@ paths:
in: path in: path
required: true required: true
type: string type: string
description: 'The id of the account' description: 'The state of the job'
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: count
in: query
required: false
type: number
description: ''
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -192,21 +160,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -223,21 +179,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -261,7 +205,7 @@ paths:
$ref: '#/definitions/Follow' $ref: '#/definitions/Follow'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/users: /users:
post: post:
security: security:
@ -294,21 +238,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -327,14 +259,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "users.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The user id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
get: get:
security: security:
- OAuth2: [ ] - OAuth2: [ ]
@ -345,11 +273,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "users.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The user id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -365,11 +289,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "users.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The user id '
- in: body - in: body
name: body name: body
required: true required: true
@ -377,7 +297,7 @@ paths:
$ref: '#/definitions/UpdateUser' $ref: '#/definitions/UpdateUser'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/users/me: /users/me:
get: get:
security: security:
@ -412,7 +332,7 @@ paths:
$ref: '#/definitions/UpdateMe' $ref: '#/definitions/UpdateMe'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/users/me/video-quota-used: /users/me/video-quota-used:
get: get:
security: security:
@ -461,21 +381,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -499,7 +407,7 @@ paths:
$ref: '#/definitions/RegisterUser' $ref: '#/definitions/RegisterUser'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/users/me/avatar/pick: /users/me/avatar/pick:
post: post:
security: security:
@ -534,21 +442,9 @@ paths:
required: false required: false
type: number type: number
description: category id of the video description: category id of the video
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -625,21 +521,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -658,70 +542,21 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path - $ref: "videos.yaml#/parameters/thumbnailfile"
required: true - $ref: "videos.yaml#/parameters/previewfile"
type: string - $ref: "videos.yaml#/parameters/category"
description: 'The video id' - $ref: "videos.yaml#/parameters/licence"
- name: thumbnailfile - $ref: "videos.yaml#/parameters/language"
in: formData - $ref: "videos.yaml#/parameters/description"
type: file - $ref: "videos.yaml#/parameters/waitTranscoding"
description: 'Video thumbnail file' - $ref: "videos.yaml#/parameters/support"
- name: previewfile - $ref: "videos.yaml#/parameters/nsfw"
in: formData - $ref: "videos.yaml#/parameters/name"
type: file - $ref: "videos.yaml#/parameters/tags"
description: 'Video preview file' - $ref: "videos.yaml#/parameters/commentsEnabled"
- name: category - $ref: "videos.yaml#/parameters/privacy"
in: formData - $ref: "videos.yaml#/parameters/scheduleUpdate"
type: number
description: 'Video category'
- name: licence
in: formData
type: number
description: 'Video licence'
- name: language
in: formData
type: string
description: 'Video language'
- name: description
in: formData
type: string
description: 'Video description'
- name: waitTranscoding
in: formData
type: boolean
description: 'Whether or not we wait transcoding before publish the video'
- name: support
in: formData
type: string
description: 'Text describing how to support the video uploader'
- name: nsfw
in: formData
type: boolean
description: 'Whether or not this video contains sensitive content'
- name: name
in: formData
type: string
description: 'Video name'
- name: tags
in: formData
type: string[]
description: 'Video tags'
- name: commentsEnabled
in: formData
type: boolean
description: 'Enable or disable comments for this video'
- name: privacy
in: formData
type: string
enum: [Public, Unlisted]
description: 'Video privacy'
- name: scheduleUpdate
in: formData
required: false
description: 'Schedule an update at a specific datetime'
type:
$ref: '#/definitions/ScheduleVideoUpdate'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -735,11 +570,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -755,14 +586,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
"/videos/{id}/description": "/videos/{id}/description":
get: get:
tags: tags:
@ -772,11 +599,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -791,14 +614,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/videos/upload: /videos/upload:
post: post:
security: security:
@ -815,75 +634,25 @@ paths:
type: file type: file
required: true required: true
description: 'Video file' description: 'Video file'
- name: thumbnailfile
in: formData
type: file
required: true
description: 'Video thumbnail file'
- name: previewfile
in: formData
type: file
required: true
description: 'Video preview file'
- name: category
in: formData
type: number
description: 'Video category'
- name: waitTranscoding
in: formData
type: boolean
description: 'Whether or not we wait transcoding before publish the video'
- name: licence
in: formData
type: number
description: 'Video licence'
- name: language
in: formData
type: string
description: 'Video language'
- name: description
in: formData
type: string
description: 'Video description'
- name: support
in: formData
type: string
description: 'Text describing how to support the video uploader'
- name: channelId - name: channelId
in: formData in: formData
required: true required: true
type: number type: number
description: 'Channel id that will contain this video' description: 'Channel id that will contain this video'
- name: nsfw - $ref: "videos.yaml#/parameters/thumbnailfile"
in: formData - $ref: "videos.yaml#/parameters/previewfile"
required: true - $ref: "videos.yaml#/parameters/category"
type: boolean - $ref: "videos.yaml#/parameters/licence"
description: 'Whether or not this video contains sensitive content' - $ref: "videos.yaml#/parameters/language"
- name: name - $ref: "videos.yaml#/parameters/description"
in: formData - $ref: "videos.yaml#/parameters/waitTranscoding"
required: true - $ref: "videos.yaml#/parameters/support"
type: string - $ref: "videos.yaml#/parameters/nsfw"
description: 'Video name' - $ref: "videos.yaml#/parameters/name"
- name: tags - $ref: "videos.yaml#/parameters/tags"
in: formData - $ref: "videos.yaml#/parameters/commentsEnabled"
type: string[] - $ref: "videos.yaml#/parameters/privacy"
description: 'Video tags' - $ref: "videos.yaml#/parameters/scheduleUpdate"
- name: commentsEnabled
in: formData
type: boolean
description: 'Enable or disable comments for this video'
- name: privacy
in: formData
required: true
type:
$ref: '#/definitions/VideoPrivacy'
description: 'Video privacy'
- name: scheduleUpdate
in: formData
required: false
description: 'Schedule an update at a specific datetime'
type:
$ref: '#/definitions/ScheduleVideoUpdate'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -900,21 +669,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -933,15 +690,11 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
"/videos/{videoId}/blacklist": "/videos/{id}/blacklist":
post: post:
security: security:
- OAuth2: [ ] - OAuth2: [ ]
@ -952,14 +705,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
delete: delete:
security: security:
- OAuth2: [ ] - OAuth2: [ ]
@ -970,14 +719,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
/videos/blacklist: /videos/blacklist:
get: get:
security: security:
@ -989,21 +734,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1020,21 +753,9 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: start - $ref: "commons.yaml#/parameters/start"
in: query - $ref: "commons.yaml#/parameters/count"
required: false - $ref: "commons.yaml#/parameters/sort"
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1058,7 +779,7 @@ paths:
$ref: '#/definitions/VideoChannelInput' $ref: '#/definitions/VideoChannelInput'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
"/video-channels/{id}": "/video-channels/{id}":
get: get:
tags: tags:
@ -1068,11 +789,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "video-channels.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video channel id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1088,18 +805,14 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "video-channels.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video channel id '
- in: body - in: body
name: body name: body
schema: schema:
$ref: '#/definitions/VideoChannelInput' $ref: '#/definitions/VideoChannelInput'
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
delete: delete:
security: security:
- OAuth2: [ ] - OAuth2: [ ]
@ -1110,14 +823,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "video-channels.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video channel id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
"/video-channels/{id}/videos": "/video-channels/{id}/videos":
get: get:
tags: tags:
@ -1127,11 +836,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "video-channels.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video channel id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1146,11 +851,7 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: name - $ref: "accounts.yaml#/parameters/name"
in: path
required: true
type: string
description: 'The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for example)'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1158,7 +859,7 @@ paths:
type: array type: array
items: items:
$ref: '#/definitions/VideoChannel' $ref: '#/definitions/VideoChannel'
"/videos/{videoId}/comment-threads": "/videos/{id}/comment-threads":
get: get:
tags: tags:
- VideoComment - VideoComment
@ -1167,26 +868,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path - $ref: "commons.yaml#/parameters/start"
required: true - $ref: "commons.yaml#/parameters/count"
type: string - $ref: "commons.yaml#/parameters/sort"
description: 'The video id '
- name: start
in: query
required: false
type: number
description: 'starting page'
- name: stop
in: query
required: false
type: number
description: 'stopping page'
- name: sort
in: query
required: false
type: number
description: 'sorting'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1202,17 +887,13 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
schema: schema:
$ref: '#/definitions/CommentThreadPostResponse' $ref: '#/definitions/CommentThreadPostResponse'
"/videos/{videoId}/comment-threads/{threadId}": "/videos/{id}/comment-threads/{threadId}":
get: get:
tags: tags:
- VideoComment - VideoComment
@ -1221,22 +902,14 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path - $ref: "video-comments.yaml#/parameters/threadId"
required: true
type: string
description: 'The video id '
- name: threadId
in: path
required: true
type: string
description: 'The thread id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
schema: schema:
$ref: '#/definitions/VideoCommentThreadTree' $ref: '#/definitions/VideoCommentThreadTree'
"/videos/{videoId}/comments/{commentId}": "/videos/{id}/comments/{commentId}":
post: post:
security: security:
- OAuth2: [ ] - OAuth2: [ ]
@ -1247,16 +920,8 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path - $ref: "video-comments.yaml#/parameters/commentId"
required: true
type: string
description: 'The video id '
- name: commentId
in: path
required: true
type: string
description: 'The comment id '
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1272,19 +937,11 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: videoId - $ref: "videos.yaml#/parameters/id"
in: path - $ref: "video-comments.yaml#/parameters/commentId"
required: true
type: string
description: 'The video id '
- name: commentId
in: path
required: true
type: string
description: 'The comment id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
"/videos/{id}/rate": "/videos/{id}/rate":
put: put:
security: security:
@ -1296,14 +953,10 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- name: id - $ref: "videos.yaml#/parameters/id"
in: path
required: true
type: string
description: 'The video id '
responses: responses:
'204': '204':
description: successful operation $ref: "commons.yaml#/responses/emptySuccess"
definitions: definitions:
VideoConstantNumber: VideoConstantNumber:
properties: properties:
@ -1726,12 +1379,3 @@ definitions:
type: string type: string
description: description:
type: string type: string
ScheduleVideoUpdate:
properties:
updateAt:
type: dateTime
description: 'When to update the video'
required: true
privacy:
$ref: '#/definitions/VideoPrivacy'
required: false

View File

@ -0,0 +1,7 @@
parameters:
id:
name: id
in: path
required: true
type: number
description: 'The user id'

View File

@ -0,0 +1,7 @@
parameters:
id:
name: id
in: path
required: true
type: string
description: 'The video channel id or uuid'

View File

@ -0,0 +1,13 @@
parameters:
threadId:
name: threadId
in: path
required: true
type: number
description: 'The thread id (root comment id)'
commentId:
name: threadId
in: path
required: true
type: number
description: 'The comment id'

View File

@ -0,0 +1,87 @@
parameters:
id:
name: id
in: path
required: true
type: string
description: 'The video id or uuid'
thumbnailfile:
name: thumbnailfile
in: formData
type: file
description: 'Video thumbnail file'
previewfile:
name: previewfile
in: formData
type: file
description: 'Video preview file'
category:
name: category
in: formData
type: number
description: 'Video category'
licence:
name: licence
in: formData
type: number
description: 'Video licence'
language:
name: language
in: formData
type: string
description: 'Video language'
description:
name: description
in: formData
type: string
description: 'Video description'
waitTranscoding:
name: waitTranscoding
in: formData
type: boolean
description: 'Whether or not we wait transcoding before publish the video'
support:
name: support
in: formData
type: string
description: 'Text describing how to support the video uploader'
nsfw:
name: nsfw
in: formData
type: boolean
description: 'Whether or not this video contains sensitive content'
name:
name: name
in: formData
type: string
description: 'Video name'
tags:
name: tags
in: formData
type: string[]
description: 'Video tags'
commentsEnabled:
name: commentsEnabled
in: formData
type: boolean
description: 'Enable or disable comments for this video'
privacy:
name: privacy
in: formData
type: string
enum: [Public, Unlisted]
description: 'Video privacy'
scheduleUpdate:
name: scheduleUpdate
in: formData
required: false
description: 'Schedule an update at a specific datetime'
properties:
updateAt:
type: dateTime
description: 'When to update the video'
required: true
privacy:
type: string
enum: [Public, Unlisted]
description: 'Video privacy target'