diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/openapi.yaml | 18 | ||||
-rw-r--r-- | support/doc/plugins/guide.md | 28 |
2 files changed, 29 insertions, 17 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 99a725ead..76e78fe53 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -716,7 +716,7 @@ paths: | |||
716 | - admin | 716 | - admin |
717 | tags: | 717 | tags: |
718 | - Instance Follows | 718 | - Instance Follows |
719 | summary: Follow a list of servers | 719 | summary: Follow a list of actors (PeerTube instance, channel or account) |
720 | responses: | 720 | responses: |
721 | '204': | 721 | '204': |
722 | description: successful operation | 722 | description: successful operation |
@@ -734,28 +734,32 @@ paths: | |||
734 | type: string | 734 | type: string |
735 | format: hostname | 735 | format: hostname |
736 | uniqueItems: true | 736 | uniqueItems: true |
737 | handles: | ||
738 | type: array | ||
739 | items: | ||
740 | type: string | ||
741 | uniqueItems: true | ||
737 | 742 | ||
738 | '/server/following/{host}': | 743 | '/server/following/{hostOrHandle}': |
739 | delete: | 744 | delete: |
740 | summary: Unfollow a server | 745 | summary: Unfollow an actor (PeerTube instance, channel or account) |
741 | security: | 746 | security: |
742 | - OAuth2: | 747 | - OAuth2: |
743 | - admin | 748 | - admin |
744 | tags: | 749 | tags: |
745 | - Instance Follows | 750 | - Instance Follows |
746 | parameters: | 751 | parameters: |
747 | - name: host | 752 | - name: hostOrHandle |
748 | in: path | 753 | in: path |
749 | required: true | 754 | required: true |
750 | description: The host to unfollow | 755 | description: The hostOrHandle to unfollow |
751 | schema: | 756 | schema: |
752 | type: string | 757 | type: string |
753 | format: hostname | ||
754 | responses: | 758 | responses: |
755 | '204': | 759 | '204': |
756 | description: successful operation | 760 | description: successful operation |
757 | '404': | 761 | '404': |
758 | description: host not found | 762 | description: host or handle not found |
759 | 763 | ||
760 | /users: | 764 | /users: |
761 | post: | 765 | post: |
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 568c0662f..85aaf9f02 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -234,21 +234,29 @@ function register ({ | |||
234 | 234 | ||
235 | #### Update video constants | 235 | #### Update video constants |
236 | 236 | ||
237 | You can add/delete video categories, licences or languages using the appropriate managers: | 237 | You can add/delete video categories, licences or languages using the appropriate constant managers: |
238 | 238 | ||
239 | ```js | 239 | ```js |
240 | function register (...) { | 240 | function register ({ |
241 | videoLanguageManager.addLanguage('al_bhed', 'Al Bhed') | 241 | videoLanguageManager, |
242 | videoLanguageManager.deleteLanguage('fr') | 242 | videoCategoryManager, |
243 | videoLicenceManager, | ||
244 | videoPrivacyManager, | ||
245 | playlistPrivacyManager | ||
246 | }) { | ||
247 | videoLanguageManager.addConstant('al_bhed', 'Al Bhed') | ||
248 | videoLanguageManager.deleteConstant('fr') | ||
243 | 249 | ||
244 | videoCategoryManager.addCategory(42, 'Best category') | 250 | videoCategoryManager.addConstant(42, 'Best category') |
245 | videoCategoryManager.deleteCategory(1) // Music | 251 | videoCategoryManager.deleteConstant(1) // Music |
252 | videoCategoryManager.resetConstants() // Reset to initial categories | ||
253 | videoCategoryManager.getConstants() // Retrieve all category constants | ||
246 | 254 | ||
247 | videoLicenceManager.addLicence(42, 'Best licence') | 255 | videoLicenceManager.addConstant(42, 'Best licence') |
248 | videoLicenceManager.deleteLicence(7) // Public domain | 256 | videoLicenceManager.deleteConstant(7) // Public domain |
249 | 257 | ||
250 | videoPrivacyManager.deletePrivacy(2) // Remove Unlisted video privacy | 258 | videoPrivacyManager.deleteConstant(2) // Remove Unlisted video privacy |
251 | playlistPrivacyManager.deletePlaylistPrivacy(3) // Remove Private video playlist privacy | 259 | playlistPrivacyManager.deleteConstant(3) // Remove Private video playlist privacy |
252 | } | 260 | } |
253 | ``` | 261 | ``` |
254 | 262 | ||