feat: add sub category api

This commit is contained in:
2026-05-21 15:19:04 +03:30
parent b1dfd144fb
commit 7b237f1a13
25 changed files with 133 additions and 28 deletions
@@ -1,7 +1,7 @@
meta {
name: Create category
type: http
seq: 6
seq: 14
}
post {
@@ -1,7 +1,7 @@
meta {
name: delete category
type: http
seq: 13
seq: 16
}
delete {
+8
View File
@@ -0,0 +1,8 @@
meta {
name: category
seq: 1
}
auth {
mode: inherit
}
@@ -1,11 +1,11 @@
meta {
name: music-categories
type: http
seq: 2
seq: 3
}
get {
url: {{baseUrl}}/music-categories
url: {{baseUrl}}/music-categories/1
body: none
auth: inherit
}
@@ -1,7 +1,7 @@
meta {
name: update category
type: http
seq: 12
seq: 11
}
put {
@@ -1,7 +1,7 @@
meta {
name: Get music by playlist
type: http
seq: 3
seq: 1
}
get {
@@ -1,7 +1,7 @@
meta {
name: Remove Music from Playlist
type: http
seq: 10
seq: 1
}
delete {
@@ -1,7 +1,7 @@
meta {
name: add music to playlist
type: http
seq: 9
seq: 1
}
post {
@@ -1,7 +1,7 @@
meta {
name: delete music
type: http
seq: 2
seq: 1
}
delete {
+8
View File
@@ -0,0 +1,8 @@
meta {
name: music
seq: 4
}
auth {
mode: inherit
}
@@ -1,11 +1,11 @@
meta {
name: gat all or specific music
type: http
seq: 2
seq: 11
}
get {
url: {{baseUrl}}/music/1
url: {{baseUrl}}/music/
body: none
auth: inherit
}
@@ -1,7 +1,7 @@
meta {
name: update music
type: http
seq: 5
seq: 2
}
put {
@@ -1,7 +1,7 @@
meta {
name: update order music
type: http
seq: 11
seq: 1
}
post {
@@ -1,7 +1,7 @@
meta {
name: upload music
type: http
seq: 7
seq: 1
}
post {
@@ -13,8 +13,8 @@ post {
body:multipart-form {
title: Ocean Waves
artist: Nature Sounds
file: @file(C:\Users\vada\Downloads\یک لیوان چای.mp3)
playlist_id: 1
file: @file(C:\Users\nourk\Downloads\Telegram Desktop\Lektion 1.1.mp4)
playlist_id: 2
~type: public
~duration:
~image_id:
@@ -1,11 +1,11 @@
meta {
name: Get all playlists | Get playlist with all its music
type: http
seq: 3
seq: 1
}
get {
url: {{baseUrl}}/music-playlists
url: {{baseUrl}}/music-playlists/
body: none
auth: inherit
}
@@ -1,18 +1,19 @@
meta {
name: create playlist
type: http
seq: 8
seq: 7
}
post {
url: {{baseUrl}}/music-playlists?category_id=4&name=motivate
url: {{baseUrl}}/music-playlists?category_id=1&subcategory_id=1&name=انگیزشی هایپ 2
body: none
auth: inherit
}
params:query {
category_id: 4
name: motivate
category_id: 1
subcategory_id: 1
name: انگیزشی هایپ 2
~description: Music for deep sleep
}
@@ -1,7 +1,7 @@
meta {
name: delete playlist
type: http
seq: 14
seq: 10
}
delete {
@@ -16,4 +16,5 @@ params:path {
settings {
encodeUrl: true
timeout: 0
}
+8
View File
@@ -0,0 +1,8 @@
meta {
name: playlist
seq: 3
}
auth {
mode: inherit
}
@@ -1,7 +1,7 @@
meta {
name: update playlist
type: http
seq: 15
seq: 12
}
put {
+8
View File
@@ -0,0 +1,8 @@
meta {
name: sub-category
seq: 2
}
auth {
mode: inherit
}
+16
View File
@@ -0,0 +1,16 @@
meta {
name: get sub category
type: http
seq: 1
}
get {
url: {{baseUrl}}/music-subcategories
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
+25
View File
@@ -0,0 +1,25 @@
meta {
name: store sub category
type: http
seq: 2
}
post {
url: {{baseUrl}}/music-subcategories
body: multipartForm
auth: inherit
}
body:multipart-form {
category_id: 1
name: انگیزشی 1
~description:
~image_id:
~order:
~is_active:
}
settings {
encodeUrl: true
timeout: 0
}
@@ -0,0 +1,30 @@
meta {
name: update sub-category
type: http
seq: 3
}
put {
url: {{baseUrl}}/music-subcategories/:id
body: json
auth: inherit
}
params:path {
id: 1
}
body:json {
{
"name":"انگیزشی 1"
}
}
body:multipart-form {
name: انگیزشی 2
}
settings {
encodeUrl: true
timeout: 0
}