diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/openapi.yaml | 33 | ||||
-rw-r--r-- | support/doc/tools.md | 20 |
2 files changed, 49 insertions, 4 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 78159f89c..89d440748 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -726,8 +726,7 @@ paths: | |||
726 | type: string | 726 | type: string |
727 | format: binary | 727 | format: binary |
728 | encoding: | 728 | encoding: |
729 | profileImage: | 729 | avatarfile: |
730 | # only accept png/jpeg | ||
731 | contentType: image/png, image/jpeg | 730 | contentType: image/png, image/jpeg |
732 | /videos: | 731 | /videos: |
733 | get: | 732 | get: |
@@ -829,9 +828,11 @@ paths: | |||
829 | thumbnailfile: | 828 | thumbnailfile: |
830 | description: Video thumbnail file | 829 | description: Video thumbnail file |
831 | type: string | 830 | type: string |
831 | format: binary | ||
832 | previewfile: | 832 | previewfile: |
833 | description: Video preview file | 833 | description: Video preview file |
834 | type: string | 834 | type: string |
835 | format: binary | ||
835 | category: | 836 | category: |
836 | description: Video category | 837 | description: Video category |
837 | type: string | 838 | type: string |
@@ -874,6 +875,11 @@ paths: | |||
874 | format: date-time | 875 | format: date-time |
875 | scheduleUpdate: | 876 | scheduleUpdate: |
876 | $ref: '#/components/schemas/VideoScheduledUpdate' | 877 | $ref: '#/components/schemas/VideoScheduledUpdate' |
878 | encoding: | ||
879 | thumbnailfile: | ||
880 | contentType: image/jpeg | ||
881 | previewfile: | ||
882 | contentType: image/jpeg | ||
877 | get: | 883 | get: |
878 | summary: Get a video by its id | 884 | summary: Get a video by its id |
879 | tags: | 885 | tags: |
@@ -1029,9 +1035,11 @@ paths: | |||
1029 | thumbnailfile: | 1035 | thumbnailfile: |
1030 | description: Video thumbnail file | 1036 | description: Video thumbnail file |
1031 | type: string | 1037 | type: string |
1038 | format: binary | ||
1032 | previewfile: | 1039 | previewfile: |
1033 | description: Video preview file | 1040 | description: Video preview file |
1034 | type: string | 1041 | type: string |
1042 | format: binary | ||
1035 | privacy: | 1043 | privacy: |
1036 | $ref: '#/components/schemas/VideoPrivacySet' | 1044 | $ref: '#/components/schemas/VideoPrivacySet' |
1037 | category: | 1045 | category: |
@@ -1080,6 +1088,13 @@ paths: | |||
1080 | - videofile | 1088 | - videofile |
1081 | - channelId | 1089 | - channelId |
1082 | - name | 1090 | - name |
1091 | encoding: | ||
1092 | videofile: | ||
1093 | contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream | ||
1094 | thumbnailfile: | ||
1095 | contentType: image/jpeg | ||
1096 | previewfile: | ||
1097 | contentType: image/jpeg | ||
1083 | x-code-samples: | 1098 | x-code-samples: |
1084 | - lang: Shell | 1099 | - lang: Shell |
1085 | source: | | 1100 | source: | |
@@ -1142,9 +1157,11 @@ paths: | |||
1142 | thumbnailfile: | 1157 | thumbnailfile: |
1143 | description: Video thumbnail file | 1158 | description: Video thumbnail file |
1144 | type: string | 1159 | type: string |
1160 | format: binary | ||
1145 | previewfile: | 1161 | previewfile: |
1146 | description: Video preview file | 1162 | description: Video preview file |
1147 | type: string | 1163 | type: string |
1164 | format: binary | ||
1148 | privacy: | 1165 | privacy: |
1149 | $ref: '#/components/schemas/VideoPrivacySet' | 1166 | $ref: '#/components/schemas/VideoPrivacySet' |
1150 | category: | 1167 | category: |
@@ -1188,6 +1205,13 @@ paths: | |||
1188 | required: | 1205 | required: |
1189 | - channelId | 1206 | - channelId |
1190 | - name | 1207 | - name |
1208 | encoding: | ||
1209 | torrentfile: | ||
1210 | contentType: application/x-bittorrent | ||
1211 | thumbnailfile: | ||
1212 | contentType: image/jpeg | ||
1213 | previewfile: | ||
1214 | contentType: image/jpeg | ||
1191 | /videos/abuse: | 1215 | /videos/abuse: |
1192 | get: | 1216 | get: |
1193 | summary: Get list of reported video abuses | 1217 | summary: Get list of reported video abuses |
@@ -1308,6 +1332,9 @@ paths: | |||
1308 | description: The file to upload. | 1332 | description: The file to upload. |
1309 | type: string | 1333 | type: string |
1310 | format: binary | 1334 | format: binary |
1335 | encoding: | ||
1336 | captionfile: | ||
1337 | contentType: text/vtt, application/x-subrip | ||
1311 | responses: | 1338 | responses: |
1312 | '204': | 1339 | '204': |
1313 | $ref: '#/paths/~1users~1me/put/responses/204' | 1340 | $ref: '#/paths/~1users~1me/put/responses/204' |
@@ -1952,7 +1979,7 @@ components: | |||
1952 | description: 'Video file size in bytes' | 1979 | description: 'Video file size in bytes' |
1953 | torrentUrl: | 1980 | torrentUrl: |
1954 | type: string | 1981 | type: string |
1955 | torrentDownaloadUrl: | 1982 | torrentDownloadUrl: |
1956 | type: string | 1983 | type: string |
1957 | fileUrl: | 1984 | fileUrl: |
1958 | type: string | 1985 | type: string |
diff --git a/support/doc/tools.md b/support/doc/tools.md index cf427ec84..88586bfaa 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -11,6 +11,7 @@ | |||
11 | - [peertube-import-videos.js](#peertube-import-videosjs) | 11 | - [peertube-import-videos.js](#peertube-import-videosjs) |
12 | - [peertube-upload.js](#peertube-uploadjs) | 12 | - [peertube-upload.js](#peertube-uploadjs) |
13 | - [peertube-watch.js](#peertube-watchjs) | 13 | - [peertube-watch.js](#peertube-watchjs) |
14 | - [peertube-plugins.js](#peertube-pluginsjs) | ||
14 | - [Server tools](#server-tools) | 15 | - [Server tools](#server-tools) |
15 | - [parse-log](#parse-log) | 16 | - [parse-log](#parse-log) |
16 | - [create-transcoding-job.js](#create-transcoding-jobjs) | 17 | - [create-transcoding-job.js](#create-transcoding-jobjs) |
@@ -19,6 +20,7 @@ | |||
19 | - [optimize-old-videos.js](#optimize-old-videosjs) | 20 | - [optimize-old-videos.js](#optimize-old-videosjs) |
20 | - [update-host.js](#update-hostjs) | 21 | - [update-host.js](#update-hostjs) |
21 | - [reset-password.js](#reset-passwordjs) | 22 | - [reset-password.js](#reset-passwordjs) |
23 | - [plugin install/uninstall](#plugin-installuninstall) | ||
22 | - [REPL (Read Eval Print Loop)](#repl-read-eval-print-loop) | 24 | - [REPL (Read Eval Print Loop)](#repl-read-eval-print-loop) |
23 | - [.help](#help) | 25 | - [.help](#help) |
24 | - [Lodash example](#lodash-example) | 26 | - [Lodash example](#lodash-example) |
@@ -182,6 +184,22 @@ It provides support for different players: | |||
182 | - chromecast | 184 | - chromecast |
183 | 185 | ||
184 | 186 | ||
187 | #### peertube-plugins.js | ||
188 | |||
189 | Install/update/uninstall or list local or NPM PeerTube plugins: | ||
190 | |||
191 | ``` | ||
192 | $ cd ${CLONE} | ||
193 | $ node dist/server/tools/peertube-plugins.js --help | ||
194 | $ node dist/server/tools/peertube-plugins.js list --help | ||
195 | $ node dist/server/tools/peertube-plugins.js install --help | ||
196 | $ node dist/server/tools/peertube-plugins.js update --help | ||
197 | $ node dist/server/tools/peertube-plugins.js uninstall --help | ||
198 | |||
199 | $ node dist/server/tools/peertube-plugins.js install --path /my/plugin/path | ||
200 | $ node dist/server/tools/peertube-plugins.js install --npm-name peertube-theme-example | ||
201 | ``` | ||
202 | |||
185 | ## Server tools | 203 | ## Server tools |
186 | 204 | ||
187 | These scripts should be run on the server, in `peertube-latest` directory. | 205 | These scripts should be run on the server, in `peertube-latest` directory. |
@@ -262,7 +280,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
262 | The difference with `peertube plugins` CLI is that these scripts can be used even if PeerTube is not running. | 280 | The difference with `peertube plugins` CLI is that these scripts can be used even if PeerTube is not running. |
263 | If PeerTube is running, you need to restart it for the changes to take effect (whereas with `peertube plugins` CLI, plugins/themes are dynamically loaded on the server). | 281 | If PeerTube is running, you need to restart it for the changes to take effect (whereas with `peertube plugins` CLI, plugins/themes are dynamically loaded on the server). |
264 | 282 | ||
265 | To install a plugin or a theme from the disk: | 283 | To install/update a plugin or a theme from the disk: |
266 | 284 | ||
267 | ``` | 285 | ``` |
268 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run npm run plugin:install -- --plugin-path /local/plugin/path | 286 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run npm run plugin:install -- --plugin-path /local/plugin/path |