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-weight: normal;
line-height: 1.5;
color: #23241f;
color: #2d3134;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
@ -1443,7 +1443,7 @@ cite {
content: "— "; }
abbr, abbr[title] {
border-bottom: 1px dotted #23241f;
border-bottom: 1px dotted #2d3134;
cursor: help;
text-decoration: none; }
@ -1456,14 +1456,14 @@ code {
background-color: #e6e6e6;
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-weight: normal;
color: #23241f; }
color: #2d3134; }
kbd {
margin: 0;
padding: 0.1315789474rem 0.2631578947rem 0;
background-color: #e6e6e6;
font-family: Consolas, "Liberation Mono", Courier, monospace;
color: #23241f; }
color: #2d3134; }
.subheader {
margin-top: 0.2rem;
@ -1624,16 +1624,16 @@ ul.no-bullet, ol.no-bullet {
color: #fefefe; }
.button.success {
background-color: #3adb76;
color: #23241f; }
color: #2d3134; }
.button.success:hover, .button.success:focus {
background-color: #22bb5b;
color: #23241f; }
color: #2d3134; }
.button.warning {
background-color: #ffae00;
color: #23241f; }
color: #2d3134; }
.button.warning:hover, .button.warning:focus {
background-color: #cc8b00;
color: #23241f; }
color: #2d3134; }
.button.alert {
background-color: #cc4b37;
color: #fefefe; }
@ -1663,13 +1663,13 @@ ul.no-bullet, ol.no-bullet {
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 {
background-color: #3adb76;
color: #23241f; }
color: #2d3134; }
.button.disabled.warning, .button[disabled].warning {
opacity: 0.25;
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 {
background-color: #ffae00;
color: #23241f; }
color: #2d3134; }
.button.disabled.alert, .button[disabled].alert {
opacity: 0.25;
cursor: not-allowed; }
@ -1846,12 +1846,12 @@ textarea {
border: 1px solid #cacaca;
border-radius: 0;
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-size: 1.0526315789rem;
font-weight: normal;
line-height: 1.5;
color: #23241f;
color: #2d3134;
transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
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,
@ -1914,7 +1914,7 @@ label {
font-size: 0.9210526316rem;
font-weight: normal;
line-height: 1.8;
color: #23241f; }
color: #2d3134; }
label.middle {
margin: 0 0 1.0526315789rem;
padding: 0.5921052632rem 0; }
@ -1923,7 +1923,7 @@ label {
margin-top: -0.5263157895rem;
font-size: 0.8552631579rem;
font-style: italic;
color: #23241f; }
color: #2d3134; }
.input-group {
display: flex;
@ -1946,7 +1946,7 @@ label {
padding: 0 1rem;
border: 1px solid #cacaca;
background: #e6e6e6;
color: #23241f;
color: #2d3134;
text-align: center;
white-space: nowrap;
display: flex;
@ -2007,7 +2007,7 @@ select {
font-size: 1.0526315789rem;
font-weight: normal;
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-origin: content-box;
background-position: right -1.0526315789rem center;
@ -2170,7 +2170,7 @@ select {
[data-whatinput='mouse'] .close-button {
outline: 0; }
.close-button:hover, .close-button:focus {
color: #23241f; }
color: #2d3134; }
.close-button.small {
right: 0.66rem;
top: 0.33em;
@ -2200,10 +2200,10 @@ select {
color: #fefefe; }
.label.success {
background: #3adb76;
color: #23241f; }
color: #2d3134; }
.label.warning {
background: #ffae00;
color: #23241f; }
color: #2d3134; }
.label.alert {
background: #cc4b37;
color: #fefefe; }
@ -2223,10 +2223,10 @@ table {
font-weight: bold; }
thead {
background: #f8f8f8;
color: #23241f; }
color: #2d3134; }
tfoot {
background: #f1f1f1;
color: #23241f; }
color: #2d3134; }
thead tr,
tfoot tr {
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 {
display: block;
margin: 0 0 0.25rem;
color: #46483e;
color: #4a5055;
white-space: nowrap;
overflow: hidden;
-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) {
#spectacle #docs .example-box {
display: block;
background-color: #23241f;
background-color: #2d3134;
position: absolute;
right: 0;
top: 0;
@ -1063,7 +1063,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
#spectacle article .no-description {
color: #8a8a8a; }
#spectacle article dt {
color: #23241f; }
color: #2d3134; }
#spectacle article table.table {
width: 100%; }
#spectacle article code {
@ -1087,7 +1087,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
font-weight: bold;
background: transparent;
border: none;
color: #515448; }
color: #535b60; }
#spectacle article h1.doc-title span {
display: none;
opacity: 0.65;
@ -1123,6 +1123,8 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
border-top: 1px solid #ddd; }
#spectacle article .prop-row .prop-title {
font-weight: bold; }
#spectacle article .prop-row .prop-type {
font-weight: 400; }
#spectacle article .prop-row .prop-subtitle {
font-weight: 400;
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-right: 2.25rem !important;
color: #fefefe;
background-color: #23241f; }
background-color: #2d3134; }
#spectacle article .doc-examples h5 {
color: #fefefe;
font-size: 1rem;
@ -1169,7 +1171,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
display: block;
margin-bottom: 1.5rem;
padding: 1.5rem;
font-family: Consolas,"Liberation Mono",Courier,monospace;
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-weight: inherit;
color: inherit;
background-color: transparent;
@ -1181,6 +1183,15 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
word-spacing: normal;
white-space: pre-wrap;
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 {
background-color: transparent;
border: none;
@ -1235,7 +1246,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
#spectacle article .definition dl dt {
font-weight: normal; }
#spectacle article .definition dl dd {
font-weight: lighter; }
font-style: italic; }
#spectacle article .definition .json-property-name {
font-weight: bold; }
#spectacle article .hljs {
@ -1245,7 +1256,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
margin-bottom: 1rem;
border: none; }
#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;
backface-visibility: hidden; }
#spectacle .drawer-layout .drawer.slide-left {
@ -1283,7 +1294,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
position: fixed;
top: 0.75rem;
right: 0.75rem;
background-color: rgba(35, 36, 31, 0.75);
background-color: rgba(45, 49, 52, 0.75);
padding: 0.65rem;
z-index: 1;
border-radius: 5px;

File diff suppressed because one or more lines are too long

View File

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

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'