Skip to content
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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Conversation

Droid00000
Copy link

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.

Copy link
Owner

@topi314 topi314 left a 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).
Copy link
Owner

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
Comment on lines 32 to 34
* `repeat`
* `track`
Copy link
Owner

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated
Comment on lines 44 to 58

```json5
{
"type": "normal",
"tracks": [
{
"encoded": "...",
"info": "{}",
"pluginInfo": "{}",
"userData": "{}"
}
]
}
```
Copy link
Owner

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

@Droid00000
Copy link
Author

Droid00000 commented Feb 3, 2025

Alright, I've added tables and descriptors for types and their custom objects, as well as wrapped the JSON examples in <details>. I wasn't sure if I needed to add examples for every response since most of them are just standard Lavalink objects. But, I can do that as well.

@Droid00000 Droid00000 requested a review from topi314 February 3, 2025 02:13
README.md Outdated
Comment on lines 10 to 23
* [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)
Copy link
Owner

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
Copy link
Owner

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
Comment on lines 52 to 57

| 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. |
Copy link
Owner

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. |
Copy link
Owner

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. |
Copy link
Owner

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": "{}",
Copy link
Owner

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": "{}"
Copy link
Owner

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
Comment on lines 89 to 91

The plugin provides a REST API to add, remove, and update tracks in the queue.
Copy link
Owner

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
Comment on lines 114 to 127
<summary>Example Payload</summary>

```json5
{
"type": "normal",
"tracks": [
{
"encoded":"QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd"
}
]
}
```
</details>
Copy link
Owner

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.
Copy link
Owner

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

@Droid00000
Copy link
Author

Alright, I've tried to make the changes you've asked.

@Droid00000 Droid00000 requested a review from topi314 February 3, 2025 21:26
@topi314
Copy link
Owner

topi314 commented Feb 3, 2025

if you solved something feel free to mark it as resolved

Copy link
Owner

@topi314 topi314 left a 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
Comment on lines 86 to 89
|---------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [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. |
Copy link
Owner

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
Comment on lines 94 to 102
{
[
{
"encoded": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd"
}
]
}
```
Copy link
Owner

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)
Copy link
Owner

@topi314 topi314 Feb 3, 2025

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

Copy link
Author

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?

Copy link
Owner

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

@Droid00000
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants