mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-03-02 22:57:11 -05:00
More documentation about hooks #2851
Labels
No labels
Component: Accessibility
Component: Administration
Component: Auth
Component: CLI
Component: Channels
Component: Chapters
Component: Comments
Component: Custom Markdown
Component: Docker 🐳
Component: Documentation 📚
Component: Email
Component: Embed
Component: Federation 🎡
Component: Import/Export
Component: Live
Component: Metadata
Component: Mobile
Component: Moderation :godmode:
Component: Notifications
Component: Object storage
Component: Observability
Component: PeerTube Plugin 📦
Component: Player ⏯️
Component: Playlist
Component: Recommendation
Component: Redundancy
Component: Registration
Component: Runners
Component: SEO
Component: Search
Component: Security
Component: Stats
Component: Studio
Component: Studio
Component: Subscriptions
Component: Subtitles 💬
Component: Transcoding
Component: Upload
Component: Video Import
Component: i18n 🔡
Priority: High
Priority: Low
Priority: Roadmap
Status: Blocked ✋
Status: In Progress 🔜
Status: To Reproduce
Status: Waiting for answer
Template not filled
Type: Bug 🐛
Type: Discussion 💭
Type: Discussion 💭
Type: Duplicate ➿
Type: Feature Request ✨
Type: Maintenance 👷♀️
Type: Performance
Type: Question
UI
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PeerTube#2851
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kontrollanten on GitHub (Nov 4, 2020).
It'd be good with more details regarding when different hooks are triggered and which arguments are sent to the callback. Below is my proposed assumptions, correct me if I'm wrong. If I'm correct and it's welcome I'll create a PR to extend the documentation.
action:api.video.updated
Triggered when a video is updated via the REST API (i.e. transcoding doesn't count as an update). The callback is called with a VideoModel describing current and previous data.
action:api.video.uploaded
Triggered when a upload is completed. It doesn't get triggered upon imports.
@rigelk commented on GitHub (Nov 6, 2020):
@kontrollanten yes, it would be nice to have that as part of the documentation. However it means being able to pull from the code to generate it automatically, à la OpenAPI like we do for the API documentation. Otherwise it would quickly become out of date/become an extra maintainance burden.
@kontrollanten commented on GitHub (Nov 9, 2020):
It sounds sound. How is that generated? I guess some annotation should be added in the source code?
@rigelk commented on GitHub (Nov 9, 2020):
@kontrollanten I don't know of any library that does that yet, unfortunately.
@kontrollanten commented on GitHub (Nov 9, 2020):
Ah, I thought that you already used a library for that. I've used ESDoc before which I think is okay. The documentation is done with annotations connected to the code. I can do a PR with ESDoc and you'll see how it works.
Edit: I found that ESDoc haven't been updated for 3 years. So I guess JSDoc is a better option.
@rigelk commented on GitHub (Nov 9, 2020):
@kontrollanten just so you know, we don't have time to dedicate to this right now (next year certainly!), but if you are willing to go for a small POC with either library (or maybe TypeDoc? they claim to be able to generate html or json, which would be easier for integration in existing docs 🤔) and can integrate the generated doc in our existing documentation, why not 🙂