Conversation
topi314
left a comment
There was a problem hiding this comment.
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
| * `normal` | ||
| * `repeat` | ||
| * `track` |
There was a problem hiding this comment.
this should be a table with descriptions
There was a problem hiding this comment.
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.
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.
if something is a sub header it should be indented
the events are missing in here too
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.
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.
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.
renamed to mode and you should link to the queue mode types here
README.md
Outdated
| { | ||
| "encoded": "...", | ||
| "info": "{}", | ||
| "pluginInfo": "{}", |
README.md
Outdated
| "encoded": "...", | ||
| "info": "{}", | ||
| "pluginInfo": "{}", | ||
| "userData": "{}" |
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.
this should be above the common types
| <details> | ||
| <summary>Example Payload</summary> | ||
|
|
||
| ```json5 | ||
| { | ||
| "type": "normal", | ||
| "tracks": [ | ||
| { | ||
| "encoded":"QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| </details> |
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.
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.
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.
I'm dumb, but I can't figure out what needs to go into field 😅
There was a problem hiding this comment.
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.
this payload doesn't look correct to me
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
this should be under ### Common Types
README.md
Outdated
|
|
||
| --- | ||
|
|
||
| ### Add Queue Track |
There was a problem hiding this comment.
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.
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.