From dbc26b29ee0bf719c98aa8e491376f7e069da042 Mon Sep 17 00:00:00 2001 From: MoPaMo <67760881+MoPaMo@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:00:02 -0300 Subject: [PATCH 1/2] add https://hackclub.com/api/arcade/shop/ --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 98367fcd..d1a5a8c8 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,18 @@ Example Response: } ``` + ### GET `/api/clock/:slackId` Depreciated. Responds with unix timestamp of the expected end time of the current session for the user. + +### GET `https://hackclub.com/api/arcade/shop/` +Get all items from the shop with stock if applicable + +Example Response: +```json +[{“name”:”USB-C Charger”,”smallName”:”(30W)”,”description”:”Small, uses the latest GaN technology, & charges fast - pretty sweet!”,”hours”:6,”imageURL”:”https://cloud-lit9nkas9-hack-club-bot.vercel.app/051t9lfjeuml._ac_sl1500_.png”,”stock”:47} … ] +``` + + From 348ddfab342f91bdd033e0552bf2c018d831fbdf Mon Sep 17 00:00:00 2001 From: MoPaMo <67760881+MoPaMo@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:03:06 -0300 Subject: [PATCH 2/2] Format response block for /shop --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1a5a8c8..3e2ed288 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,17 @@ Get all items from the shop with stock if applicable Example Response: ```json -[{“name”:”USB-C Charger”,”smallName”:”(30W)”,”description”:”Small, uses the latest GaN technology, & charges fast - pretty sweet!”,”hours”:6,”imageURL”:”https://cloud-lit9nkas9-hack-club-bot.vercel.app/051t9lfjeuml._ac_sl1500_.png”,”stock”:47} … ] +[ + { + "name": "USB-C Charger", + "smallName": "(30W)", + "description": "Small, uses the latest GaN technology, & charges fast - pretty sweet!", + "hours": 6, + "imageURL": "https://cloud-lit9nkas9-hack-club-bot.vercel.app/051t9lfjeuml._ac_sl1500_.png", + "stock": 47 + } + // etc +] ```