Skip to content

Commit

Permalink
🎨 Improve the poll endpoint naming convention (#30)
Browse files Browse the repository at this point in the history
* 🎨 Improve the poll endpoint naming convention

* 🎨 Change `Endpoint::MESSAGE_POLL` to `protected`
  • Loading branch information
Log1x authored Jul 21, 2024
1 parent db3e4cb commit 28525c0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Discord/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ class Endpoint
public const CHANNEL_THREADS_ARCHIVED_PRIVATE = self::CHANNEL_THREADS.'/archived/private';
// GET
public const CHANNEL_THREADS_ARCHIVED_PRIVATE_ME = self::CHANNEL.'/users/@me/threads/archived/private';
// GET
public const CHANNEL_POLLS = self::CHANNEL.'/polls';
// GET
public const CHANNEL_POLL = self::CHANNEL.'/polls/:message_id';
// GET
public const CHANNEL_POLL_ANSWERS = self::CHANNEL_POLL.'/answers/:answer_id';
// POST
public const CHANNEL_POLL_EXPIRE = self::CHANNEL_POLL.'/expire';

// GET, PATCH, DELETE
public const THREAD = 'channels/:thread_id';
Expand All @@ -107,6 +99,13 @@ class Endpoint
// DELETE
public const USER_MESSAGE_REACTION = self::CHANNEL.'/messages/:message_id/reactions/:emoji/:user_id';

// GET
protected const MESSAGE_POLL = self::CHANNEL.'/polls/:message_id';
// GET
public const MESSAGE_POLL_ANSWER = self::MESSAGE_POLL.'/answers/:answer_id';
// POST
public const MESSAGE_POLL_EXPIRE = self::MESSAGE_POLL.'/expire';

// GET, POST
public const CHANNEL_WEBHOOKS = self::CHANNEL.'/webhooks';

Expand Down

0 comments on commit 28525c0

Please sign in to comment.