diff --git a/like/comment and like (one call).bru b/like/comment and like (one call).bru new file mode 100644 index 0000000..d725c55 --- /dev/null +++ b/like/comment and like (one call).bru @@ -0,0 +1,35 @@ +meta { + name: comment and like (one call) + type: http + seq: 7 +} + +post { + url: {{baseUrl}}/interactions/:type/:id + body: json + auth: inherit +} + +params:path { + type: media + id: 27 +} + +body:json { + { + "content": "این مدیتیشن فوق‌العاده بود", + "like": true + } +} + +settings { + encodeUrl: true + timeout: 0 +} + +docs { + type: music | media | playlist. Body fields are all optional but at least one is required: + - content: adds a comment + - like: true (like) / false (unlike) + - toggle_like: true (flip current like state) +} diff --git a/media/get-by-id.bru b/media/get-by-id.bru index 1162a1c..9ecd7cd 100644 --- a/media/get-by-id.bru +++ b/media/get-by-id.bru @@ -11,7 +11,7 @@ get { } params:path { - id: 1 + id: 27 } body:text { @@ -23,4 +23,5 @@ body:text { settings { encodeUrl: true + timeout: 0 } diff --git a/media/get-media.bru b/media/get-media.bru index b92ba4b..6b04084 100644 --- a/media/get-media.bru +++ b/media/get-media.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{baseUrl}}/media/ + url: {{baseUrl}}/media/1 body: none auth: inherit } @@ -13,7 +13,7 @@ get { params:query { ~categories: 1 ~tags: relax,sleep - ~search: + ~search: ~count: 10 } diff --git a/save/toggle.bru b/save/toggle.bru index b2ab079..9017505 100644 --- a/save/toggle.bru +++ b/save/toggle.bru @@ -11,8 +11,9 @@ post { } body:multipart-form { - type: playlist @contentType(music,media,breathing-template) - id: 1 + type: media @contentType(music,media,breathing-template) + id: 27 + ~is_saved: true } settings {