From 28525c05f2eb6f6f029f3aabdd993060030bac27 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 21 Jul 2024 10:34:53 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Improve=20the=20poll=20endpoint?= =?UTF-8?q?=20naming=20convention=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🎨 Improve the poll endpoint naming convention * 🎨 Change `Endpoint::MESSAGE_POLL` to `protected` --- src/Discord/Endpoint.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Discord/Endpoint.php b/src/Discord/Endpoint.php index 6abe3a9..c465acf 100644 --- a/src/Discord/Endpoint.php +++ b/src/Discord/Endpoint.php @@ -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'; @@ -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';