From 3b14752f2f606763ec6fada5a2f9fdc721617d41 Mon Sep 17 00:00:00 2001 From: AmirmahdiNourkazemi Date: Wed, 20 May 2026 12:22:04 +0330 Subject: [PATCH] feat: add rating --- ratings/folder.bru | 8 ++++++++ ratings/get all ratings.bru | 21 +++++++++++++++++++++ ratings/get ratings of user.bru | 20 ++++++++++++++++++++ ratings/store - update.bru | 25 +++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 ratings/folder.bru create mode 100644 ratings/get all ratings.bru create mode 100644 ratings/get ratings of user.bru create mode 100644 ratings/store - update.bru diff --git a/ratings/folder.bru b/ratings/folder.bru new file mode 100644 index 0000000..7a41c40 --- /dev/null +++ b/ratings/folder.bru @@ -0,0 +1,8 @@ +meta { + name: ratings + seq: 15 +} + +auth { + mode: inherit +} diff --git a/ratings/get all ratings.bru b/ratings/get all ratings.bru new file mode 100644 index 0000000..4ab6a54 --- /dev/null +++ b/ratings/get all ratings.bru @@ -0,0 +1,21 @@ +meta { + name: get all ratings + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/ratings/:type/:id + body: none + auth: inherit +} + +params:path { + type: music + id: 1 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/ratings/get ratings of user.bru b/ratings/get ratings of user.bru new file mode 100644 index 0000000..ccd0fd9 --- /dev/null +++ b/ratings/get ratings of user.bru @@ -0,0 +1,20 @@ +meta { + name: get ratings of user + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/ratings/:music/:id/user + body: none + auth: inherit +} + +params:path { + music: + id: +} + +settings { + encodeUrl: true +} diff --git a/ratings/store - update.bru b/ratings/store - update.bru new file mode 100644 index 0000000..8244690 --- /dev/null +++ b/ratings/store - update.bru @@ -0,0 +1,25 @@ +meta { + name: store | update + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/ratings/:type/:id + body: multipartForm + auth: inherit +} + +params:path { + type: music + id: 1 +} + +body:multipart-form { + stars: 4 +} + +settings { + encodeUrl: true + timeout: 0 +}