This commit is contained in:
2026-09-02 11:54:50 +03:30
14 changed files with 285 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
meta {
name: delete announcement
type: http
seq: 6
}
delete {
url: {{baseUrl}}/announcements/:id
body: none
auth: inherit
}
params:path {
id: 1
}
settings {
encodeUrl: true
}
+8
View File
@@ -0,0 +1,8 @@
meta {
name: announcement
seq: 20
}
auth {
mode: inherit
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: get announcements
type: http
seq: 2
}
get {
url: {{baseUrl}}/announcements
body: none
auth: inherit
}
settings {
encodeUrl: true
}
docs {
Admin: all announcements, newest first.
}
+20
View File
@@ -0,0 +1,20 @@
meta {
name: latest announcement
type: http
seq: 1
}
get {
url: {{baseUrl}}/announcements/latest
body: none
auth: inherit
}
settings {
encodeUrl: true
}
docs {
App side: returns the single latest currently-active announcement
(start_date <= now <= end_date; null bounds are open-ended), or null.
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: show announcement
type: http
seq: 4
}
get {
url: {{baseUrl}}/announcements/:id
body: none
auth: inherit
}
params:path {
id: 1
}
settings {
encodeUrl: true
}
+27
View File
@@ -0,0 +1,27 @@
meta {
name: store announcement
type: http
seq: 3
}
post {
url: {{baseUrl}}/announcements
body: multipartForm
auth: inherit
}
body:multipart-form {
title: تخفیف ویژه
description: توضیح اعلان
link: https://example.com
button_text: مشاهده
start_date: 2026-06-24 00:00:00
end_date: 2026-07-24 00:00:00
~image: @file()
~image_id: 1
}
settings {
encodeUrl: true
timeout: 0
}
+31
View File
@@ -0,0 +1,31 @@
meta {
name: update announcement
type: http
seq: 5
}
post {
url: {{baseUrl}}/announcements/:id
body: multipartForm
auth: inherit
}
params:path {
id: 1
}
body:multipart-form {
title: عنوان جدید
description: توضیح جدید
link: https://example.com
button_text: مشاهده
start_date: 2026-06-24 00:00:00
end_date: 2026-07-24 00:00:00
~image: @file()
~image_id: 1
}
settings {
encodeUrl: true
timeout: 0
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: delete version
type: http
seq: 6
}
delete {
url: {{baseUrl}}/versions/:id
body: none
auth: inherit
}
params:path {
id: 1
}
settings {
encodeUrl: true
}
+8
View File
@@ -0,0 +1,8 @@
meta {
name: version
seq: 21
}
auth {
mode: inherit
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: get versions
type: http
seq: 2
}
get {
url: {{baseUrl}}/versions
body: none
auth: inherit
}
settings {
encodeUrl: true
}
docs {
Admin: all versions, highest version_code first.
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: latest version
type: http
seq: 1
}
get {
url: {{baseUrl}}/versions/latest
body: none
auth: inherit
}
settings {
encodeUrl: true
}
docs {
App update check: returns the newest version (highest version_code), or null.
}
+19
View File
@@ -0,0 +1,19 @@
meta {
name: show version
type: http
seq: 4
}
get {
url: {{baseUrl}}/versions/:id
body: none
auth: inherit
}
params:path {
id: 1
}
settings {
encodeUrl: true
}
+27
View File
@@ -0,0 +1,27 @@
meta {
name: store version
type: http
seq: 3
}
post {
url: {{baseUrl}}/versions
body: multipartForm
auth: inherit
}
body:multipart-form {
title: نسخه ۱.۲.۰
description: توضیح تغییرات نسخه
version_name: 1.2.0
version_code: 42
link: https://example.com/app.apk
button_text: به‌روزرسانی
~image: @file()
~image_id: 1
}
settings {
encodeUrl: true
timeout: 0
}
+31
View File
@@ -0,0 +1,31 @@
meta {
name: update version
type: http
seq: 5
}
post {
url: {{baseUrl}}/versions/:id
body: multipartForm
auth: inherit
}
params:path {
id: 1
}
body:multipart-form {
title: نسخه جدید
description: توضیح جدید
version_name: 1.3.0
version_code: 43
link: https://example.com/app.apk
button_text: به‌روزرسانی
~image: @file()
~image_id: 1
}
settings {
encodeUrl: true
timeout: 0
}