-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Documentation #2
base: master
Are you sure you want to change the base?
Conversation
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
> 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
* `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
|
||
```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
* [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
|
||
| 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
|--------|--------|-----------------------------------------| | ||
| 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
"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
|
||
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
README.md
Outdated
<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 |
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
|---------------------------------------------------|-----------------------------------------------------------------------------------------------| | ||
| [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
README.md
Outdated
{ | ||
[ | ||
{ | ||
"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
``` | ||
|
||
**Response:** [Queue Object](#queue-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.
no need to make response bold, you should also add linebreaks here
maybe a better example format would be https://github.com/topi314/LavaLyrics#api
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.
How about having a table for each response?
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.
yes, that's how I usually do it, if a payload is returned by multiple endpoints you can create a common type
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 |
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.