-
Notifications
You must be signed in to change notification settings - Fork 3
Add Documentation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
topi314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not bad for a start, but I prefer to have tables with field descriptions, feel free to link to https://lavalink.dev for common types
README.md
Outdated
| > [!IMPORTANT] | ||
| > This plugin is compatible with Lavalink version four and higher. | ||
|
|
||
| A plugin that adds a queue system for [Lavalink](https://github.com/lavalink-devs/Lavalink). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple queue plugin for LavaLink with a REST API.
README.md
Outdated
| * `normal` | ||
| * `repeat` | ||
| * `track` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a table with descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for my preferred format see: https://github.com/topi314/LavaSrc#playlist-types
README.md
Outdated
| Response: | ||
|
|
||
| ```json5 | ||
| { | ||
| "type": "normal", | ||
| "tracks": [ | ||
| { | ||
| "encoded": "...", | ||
| "info": "{}", | ||
| "pluginInfo": "{}", | ||
| "userData": "{}" | ||
| } | ||
| ] | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
responses should have a table and then a <details> with a json example
Co-authored-by: Toπ <git@topi.wtf>
|
Alright, I've added tables and descriptors for types and their custom objects, as well as wrapped the JSON examples in |
README.md
Outdated
| * [Installation](#installation) | ||
| * [API](#api) | ||
| * [Get Queue](#get-queue) | ||
| * [Update Queue](#update-queue) | ||
| * [Next Queue Track](#next-queue-track) | ||
| * [Previous Queue Track](#previous-queue-track) | ||
| * [Add Queue Track](#add-queue-tracks) | ||
| * [Update Queue Track](#update-queue-tracks) | ||
| * [Get Queue Track](#get-queue-track) | ||
| * [Add Queue Track](#add-queue-track) | ||
| * [Delete Queue Track(s)](#delete-queue-track(s)) | ||
| * [Move Queue Track](#move-queue-track) | ||
| * [Get Queue History](#get-queue-history) | ||
| * [Get Queue History Track](#get-queue-history-track) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if something is a sub header it should be indented
the events are missing in here too
README.md
Outdated
|
|
||
| --- | ||
|
|
||
| ### Queue Types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in 98c97f9 i renamed queue type to queue mode
README.md
Outdated
| ### Common Types | ||
|
|
||
| | Type | Description | | ||
| |-------------------------------------------------------------------------------|-----------------------------------------------------------| | ||
| | [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. | | ||
| | [update_player_track](https://lavalink.dev/api/rest.html#update-player-track) | An update player track that can be sent in API requests. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just link where they are actually used to the lavalink docs
README.md
Outdated
| | Field | Type | Description | | ||
| |--------|--------|-----------------------------------------| | ||
| | type | string | the type of queue. | | ||
| | tracks | array | An array of track objects in the queue. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you should link to the lavalink docs track object https://lavalink.dev/api/rest.html#track
type should be array of [Track](https://lavalink.dev/api/rest.html#track) objects
README.md
Outdated
|
|
||
| | Field | Type | Description | | ||
| |--------|--------|-----------------------------------------| | ||
| | type | string | the type of queue. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to mode and you should link to the queue mode types here
README.md
Outdated
| { | ||
| "encoded": "...", | ||
| "info": "{}", | ||
| "pluginInfo": "{}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pluginInfo isnt a string
README.md
Outdated
| "encoded": "...", | ||
| "info": "{}", | ||
| "pluginInfo": "{}", | ||
| "userData": "{}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
userData isnt a string
README.md
Outdated
| ## API | ||
|
|
||
| The plugin provides a REST API to add, remove, and update tracks in the queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be above the common types
| <details> | ||
| <summary>Example Payload</summary> | ||
|
|
||
| ```json5 | ||
| { | ||
| "type": "normal", | ||
| "tracks": [ | ||
| { | ||
| "encoded":"QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| </details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no table?
README.md
Outdated
|
|
||
| ### Get Queue Track | ||
|
|
||
| Gets a track from the queue at the specified index. Response is a track object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response should be listed below and link to the lavalink docs
|
Alright, I've tried to make the changes you've asked. |
|
if you solved something feel free to mark it as resolved |
topi314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the following structure would fit better:
- Installation
- API
- Common Types
- Endpoints
- ...
- Events
- ...
README.md
Outdated
| | Type | Description | | ||
| |---------------------------------------------------|-----------------------------------------------------------------------------------------------| | ||
| | [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. | | ||
| | update_queue | An array of [update player track](https://lavalink.dev/api/rest#update-player-track) objects. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs a field column
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm dumb, but I can't figure out what needs to go into field 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly
I have no idea what this is supposed to be xd
README.md
Outdated
| ```json5 | ||
| { | ||
| [ | ||
| { | ||
| "encoded": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd" | ||
| } | ||
| ] | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this payload doesn't look correct to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I couldn't figure out how else it wanted the payload. All that worked for me was taking an array of encoded tracks and then converting it directly to JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you showed an object which contains an array, that's not valid json
it shiuld just be an array of objects
|
Update: 👋 I’m still around to work on this. Ideally, I’ll be able to apply your feedback sometime next week. Apologies for the delay |
README.md
Outdated
| ```json5 | ||
| { | ||
| [ | ||
| { | ||
| "encoded": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd" | ||
| } | ||
| ] | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you showed an object which contains an array, that's not valid json
it shiuld just be an array of objects
README.md
Outdated
| | Type | Description | | ||
| |---------------------------------------------------|-----------------------------------------------------------------------------------------------| | ||
| | [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. | | ||
| | update_queue | An array of [update player track](https://lavalink.dev/api/rest#update-player-track) objects. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly
I have no idea what this is supposed to be xd
README.md
Outdated
| * [Update Queue Track](#update-queue-tracks) | ||
| * [Get Queue Track](#get-queue-track) | ||
| * [Add Queue Track](#add-queue-track) | ||
| * [Delete Queue Track(s)](#delete-queue-track(s)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do Delete Queue Tracks, this link doesn't work
README.md
Outdated
|
|
||
| yes, no docs lol. No newline at end of file | ||
| > [!IMPORTANT] | ||
| > This plugin *requires* Lavalink `v4.0.5` or greater |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this plugin actually requires 4.0.6 or greater
README.md
Outdated
| ### Queue Modes | ||
|
|
||
| | Type | Description | | ||
| |-----------------|----------------------------------------------------| | ||
| | `normal` | Tracks will be played in the order they are added. | | ||
| | `repeat_track` | A single track will be repeatedly played. | | ||
| | `repeat_queue` | The queue will repeat once it has ended. | | ||
|
|
||
| --- | ||
|
|
||
| ### Queue Object | ||
|
|
||
| | Field | Type | Description | | ||
| |----------------------|--------------------------------------------------------------------|-----------------------------------------| | ||
| | mode | [string](#queue-modes) | The mode of the queue. | | ||
| | tracks | array of [track](https://lavalink.dev/api/rest.html#track) objects | An array of track objects in the queue. | | ||
|
|
||
| <details> | ||
| <summary>Example Payload</summary> | ||
|
|
||
| ```json | ||
| { | ||
| "type": "normal", | ||
| "tracks": [ | ||
| { | ||
| "encoded": "...", | ||
| "info": {}, | ||
| "pluginInfo": {}, | ||
| "userData": {} | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| </details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be under ### Common Types
README.md
Outdated
|
|
||
| --- | ||
|
|
||
| ### Add Queue Track |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be Set Queue Track or something like that since it replaces the track
README.md
Outdated
|
|
||
| --- | ||
|
|
||
| ## Endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is under ## API this needs to be ### Endpoints
same with the others
Co-authored-by: Toπ <git@topi.wtf>
|
just as a note, if you resolve something please also resolve the conversation |
Summary
So, this is my attempt at documentation. I mainly attempted to reference the docs for LavaSrc and the SponsorBlock plugin. If there's anything that's incorrect, please feel free to let me know. I'll attempt to correct it.