diff --git a/Bruno/Endpoints/Auth/Login as normal.bru b/Bruno/Endpoints/Auth/Login as normal.bru new file mode 100644 index 0000000..bd20487 --- /dev/null +++ b/Bruno/Endpoints/Auth/Login as normal.bru @@ -0,0 +1,23 @@ +meta { + name: Login as normal + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/auth/login + body: json + auth: inherit +} + +body:json { + { + "email": "dominykas@svetikas.lt", + "password": "LabaiSlaptas123@" + } +} + +vars:post-response { + accessToken: res.body.accessToken + refreshToken: res.body.refreshToken +} diff --git a/Bruno/Endpoints/Auth/Refresh token.bru b/Bruno/Endpoints/Auth/Refresh token.bru new file mode 100644 index 0000000..d6a39a3 --- /dev/null +++ b/Bruno/Endpoints/Auth/Refresh token.bru @@ -0,0 +1,22 @@ +meta { + name: Refresh token + type: http + seq: 3 +} + +post { + url: {{baseUrl}}/api/auth/refresh + body: json + auth: none +} + +body:json { + { + "refreshToken": "{{refreshToken}}" + } +} + +vars:post-response { + accessToken: res.body.accessToken + refreshToken: res.body.refreshToken +} diff --git a/Bruno/Endpoints/Auth/Register normal user.bru b/Bruno/Endpoints/Auth/Register normal user.bru new file mode 100644 index 0000000..60e1870 --- /dev/null +++ b/Bruno/Endpoints/Auth/Register normal user.bru @@ -0,0 +1,19 @@ +meta { + name: Register normal user + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/auth/register + body: json + auth: inherit +} + +body:json { + { + "userName": "Dominykas", + "email": "dominykas@svetikas.lt", + "password": "LabaiSlaptas123@" + } +} diff --git a/Bruno/Endpoints/Auth/folder.bru b/Bruno/Endpoints/Auth/folder.bru new file mode 100644 index 0000000..8bd64ee --- /dev/null +++ b/Bruno/Endpoints/Auth/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Auth + seq: 1 +} + +auth { + mode: inherit +} diff --git a/Bruno/Endpoints/Posts/Comments/Create a post comment.bru b/Bruno/Endpoints/Posts/Comments/Create a post comment.bru new file mode 100644 index 0000000..f3a515b --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/Create a post comment.bru @@ -0,0 +1,21 @@ +meta { + name: Create a post comment + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/posts/1/comments + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "Where'd you find this? Ignore that this is the same author btw" + } +} diff --git a/Bruno/Endpoints/Posts/Comments/Delete post comment.bru b/Bruno/Endpoints/Posts/Comments/Delete post comment.bru new file mode 100644 index 0000000..8e7f11d --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/Delete post comment.bru @@ -0,0 +1,15 @@ +meta { + name: Delete post comment + type: http + seq: 5 +} + +delete { + url: {{baseUrl}}/api/posts/1/comments/1 + body: none + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} diff --git a/Bruno/Endpoints/Posts/Comments/Get all post comments.bru b/Bruno/Endpoints/Posts/Comments/Get all post comments.bru new file mode 100644 index 0000000..6570cb3 --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/Get all post comments.bru @@ -0,0 +1,15 @@ +meta { + name: Get all post comments + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/api/posts/1/comments + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Endpoints/Posts/Comments/Get specific post comment.bru b/Bruno/Endpoints/Posts/Comments/Get specific post comment.bru new file mode 100644 index 0000000..0f839be --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/Get specific post comment.bru @@ -0,0 +1,11 @@ +meta { + name: Get specific post comment + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/posts/1/comments/1 + body: none + auth: inherit +} diff --git a/Bruno/Endpoints/Posts/Comments/Update specific post comment.bru b/Bruno/Endpoints/Posts/Comments/Update specific post comment.bru new file mode 100644 index 0000000..44f4d7b --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/Update specific post comment.bru @@ -0,0 +1,21 @@ +meta { + name: Update specific post comment + type: http + seq: 4 +} + +patch { + url: {{baseUrl}}/api/posts/1/comments/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "What did the previous one say? No one will know" + } +} diff --git a/Bruno/Endpoints/Posts/Comments/folder.bru b/Bruno/Endpoints/Posts/Comments/folder.bru new file mode 100644 index 0000000..218f5bf --- /dev/null +++ b/Bruno/Endpoints/Posts/Comments/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Comments + seq: 8 +} + +auth { + mode: inherit +} diff --git a/Bruno/Endpoints/Posts/Create a post.bru b/Bruno/Endpoints/Posts/Create a post.bru new file mode 100644 index 0000000..26d93cf --- /dev/null +++ b/Bruno/Endpoints/Posts/Create a post.bru @@ -0,0 +1,26 @@ +meta { + name: Create a post + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/posts + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "title": "TheoTown logo", + "Description": "Some text...", + "tags": [], + "filename": "super image.png", + "fileMimeType": "image/png", + "fileSize": 642261 + } +} diff --git a/Bruno/Endpoints/Posts/Delete post 1.bru b/Bruno/Endpoints/Posts/Delete post 1.bru new file mode 100644 index 0000000..36f15e9 --- /dev/null +++ b/Bruno/Endpoints/Posts/Delete post 1.bru @@ -0,0 +1,15 @@ +meta { + name: Delete post 1 + type: http + seq: 6 +} + +delete { + url: {{baseUrl}}/api/posts/1 + body: none + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} diff --git a/Bruno/Endpoints/Posts/Get all posts.bru b/Bruno/Endpoints/Posts/Get all posts.bru new file mode 100644 index 0000000..c559f38 --- /dev/null +++ b/Bruno/Endpoints/Posts/Get all posts.bru @@ -0,0 +1,15 @@ +meta { + name: Get all posts + type: http + seq: 4 +} + +get { + url: {{baseUrl}}/api/posts + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Endpoints/Posts/Get file.bru b/Bruno/Endpoints/Posts/Get file.bru new file mode 100644 index 0000000..dd786ed --- /dev/null +++ b/Bruno/Endpoints/Posts/Get file.bru @@ -0,0 +1,15 @@ +meta { + name: Get file + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/posts/1/files/1 + body: none + auth: inherit +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Endpoints/Posts/Get post by id of 1.bru b/Bruno/Endpoints/Posts/Get post by id of 1.bru new file mode 100644 index 0000000..b81756e --- /dev/null +++ b/Bruno/Endpoints/Posts/Get post by id of 1.bru @@ -0,0 +1,11 @@ +meta { + name: Get post by id of 1 + type: http + seq: 5 +} + +get { + url: {{baseUrl}}/api/posts/1 + body: none + auth: inherit +} diff --git a/Bruno/Endpoints/Posts/Update post 1.bru b/Bruno/Endpoints/Posts/Update post 1.bru new file mode 100644 index 0000000..c451fe5 --- /dev/null +++ b/Bruno/Endpoints/Posts/Update post 1.bru @@ -0,0 +1,22 @@ +meta { + name: Update post 1 + type: http + seq: 7 +} + +patch { + url: {{baseUrl}}/api/posts/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "description": "Pakeistas tekstas", + "tags": ["high-res"] + } +} diff --git a/Bruno/Endpoints/Posts/Upload file.bru b/Bruno/Endpoints/Posts/Upload file.bru new file mode 100644 index 0000000..853e6b1 --- /dev/null +++ b/Bruno/Endpoints/Posts/Upload file.bru @@ -0,0 +1,23 @@ +meta { + name: Upload file + type: http + seq: 2 +} + +patch { + url: {{baseUrl}}/api/posts/1/files/1 + body: file + auth: inherit +} + +headers { + Content-Range: bytes 0-642260/642261 +} + +body:file { + file: @file(/home/dominykas/Desktop/icon.png) @contentType(image/png) +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Endpoints/Posts/folder.bru b/Bruno/Endpoints/Posts/folder.bru new file mode 100644 index 0000000..e218b39 --- /dev/null +++ b/Bruno/Endpoints/Posts/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Posts + seq: 3 +} + +auth { + mode: inherit +} diff --git a/Bruno/Endpoints/Tags/Create a tag.bru b/Bruno/Endpoints/Tags/Create a tag.bru new file mode 100644 index 0000000..a728d37 --- /dev/null +++ b/Bruno/Endpoints/Tags/Create a tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create a tag + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "high-res" + } +} diff --git a/Bruno/Endpoints/Tags/Delete a tag.bru b/Bruno/Endpoints/Tags/Delete a tag.bru new file mode 100644 index 0000000..ca90036 --- /dev/null +++ b/Bruno/Endpoints/Tags/Delete a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Delete a tag + type: http + seq: 4 +} + +delete { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: high-res +} diff --git a/Bruno/Endpoints/Tags/Get a tag.bru b/Bruno/Endpoints/Tags/Get a tag.bru new file mode 100644 index 0000000..e5648de --- /dev/null +++ b/Bruno/Endpoints/Tags/Get a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Get a tag + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: high-res +} diff --git a/Bruno/Endpoints/Tags/Get all tags.bru b/Bruno/Endpoints/Tags/Get all tags.bru new file mode 100644 index 0000000..6afba41 --- /dev/null +++ b/Bruno/Endpoints/Tags/Get all tags.bru @@ -0,0 +1,15 @@ +meta { + name: Get all tags + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/api/tags + body: none + auth: inherit +} + +params:query { + ~pageNumber: +} diff --git a/Bruno/Endpoints/Tags/Update a tag.bru b/Bruno/Endpoints/Tags/Update a tag.bru new file mode 100644 index 0000000..96351f7 --- /dev/null +++ b/Bruno/Endpoints/Tags/Update a tag.bru @@ -0,0 +1,19 @@ +meta { + name: Update a tag + type: http + seq: 5 +} + +patch { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:query { + ~tagType: +} + +params:path { + name: high-res +} diff --git a/Bruno/Endpoints/Tags/folder.bru b/Bruno/Endpoints/Tags/folder.bru new file mode 100644 index 0000000..416fe1a --- /dev/null +++ b/Bruno/Endpoints/Tags/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Tags + seq: 2 +} + +auth { + mode: inherit +} diff --git a/Bruno/Endpoints/folder.bru b/Bruno/Endpoints/folder.bru new file mode 100644 index 0000000..ce8aae2 --- /dev/null +++ b/Bruno/Endpoints/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Endpoints + seq: 2 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/Create accounts/Login as normal.bru b/Bruno/Seed/Create accounts/Login as normal.bru new file mode 100644 index 0000000..bd20487 --- /dev/null +++ b/Bruno/Seed/Create accounts/Login as normal.bru @@ -0,0 +1,23 @@ +meta { + name: Login as normal + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/auth/login + body: json + auth: inherit +} + +body:json { + { + "email": "dominykas@svetikas.lt", + "password": "LabaiSlaptas123@" + } +} + +vars:post-response { + accessToken: res.body.accessToken + refreshToken: res.body.refreshToken +} diff --git a/Bruno/Seed/Create accounts/Register normal user.bru b/Bruno/Seed/Create accounts/Register normal user.bru new file mode 100644 index 0000000..60e1870 --- /dev/null +++ b/Bruno/Seed/Create accounts/Register normal user.bru @@ -0,0 +1,19 @@ +meta { + name: Register normal user + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/auth/register + body: json + auth: inherit +} + +body:json { + { + "userName": "Dominykas", + "email": "dominykas@svetikas.lt", + "password": "LabaiSlaptas123@" + } +} diff --git a/Bruno/Seed/Create accounts/folder.bru b/Bruno/Seed/Create accounts/folder.bru new file mode 100644 index 0000000..e6f6299 --- /dev/null +++ b/Bruno/Seed/Create accounts/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Create accounts + seq: 1 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/Post operations/Get all posts.bru b/Bruno/Seed/Post operations/Get all posts.bru new file mode 100644 index 0000000..6086f99 --- /dev/null +++ b/Bruno/Seed/Post operations/Get all posts.bru @@ -0,0 +1,15 @@ +meta { + name: Get all posts + type: http + seq: 1 +} + +get { + url: {{baseUrl}}/api/posts + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Seed/Post operations/Get file 1.bru b/Bruno/Seed/Post operations/Get file 1.bru new file mode 100644 index 0000000..6cabdce --- /dev/null +++ b/Bruno/Seed/Post operations/Get file 1.bru @@ -0,0 +1,15 @@ +meta { + name: Get file 1 + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/posts/1/files/1 + body: none + auth: inherit +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Seed/Post operations/Get file 2.bru b/Bruno/Seed/Post operations/Get file 2.bru new file mode 100644 index 0000000..de1227b --- /dev/null +++ b/Bruno/Seed/Post operations/Get file 2.bru @@ -0,0 +1,15 @@ +meta { + name: Get file 2 + type: http + seq: 4 +} + +get { + url: {{baseUrl}}/api/posts/2/files/2 + body: none + auth: inherit +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Seed/Post operations/Get post by id of 1 again.bru b/Bruno/Seed/Post operations/Get post by id of 1 again.bru new file mode 100644 index 0000000..1b7b98c --- /dev/null +++ b/Bruno/Seed/Post operations/Get post by id of 1 again.bru @@ -0,0 +1,11 @@ +meta { + name: Get post by id of 1 again + type: http + seq: 6 +} + +get { + url: {{baseUrl}}/api/posts/1 + body: none + auth: inherit +} diff --git a/Bruno/Seed/Post operations/Get post by id of 1.bru b/Bruno/Seed/Post operations/Get post by id of 1.bru new file mode 100644 index 0000000..c25f144 --- /dev/null +++ b/Bruno/Seed/Post operations/Get post by id of 1.bru @@ -0,0 +1,11 @@ +meta { + name: Get post by id of 1 + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/api/posts/1 + body: none + auth: inherit +} diff --git a/Bruno/Seed/Post operations/Post 1/Create a post.bru b/Bruno/Seed/Post operations/Post 1/Create a post.bru new file mode 100644 index 0000000..26d93cf --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Create a post.bru @@ -0,0 +1,26 @@ +meta { + name: Create a post + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/posts + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "title": "TheoTown logo", + "Description": "Some text...", + "tags": [], + "filename": "super image.png", + "fileMimeType": "image/png", + "fileSize": 642261 + } +} diff --git a/Bruno/Seed/Post operations/Post 1/Create comment 1.bru b/Bruno/Seed/Post operations/Post 1/Create comment 1.bru new file mode 100644 index 0000000..dcac0ad --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Create comment 1.bru @@ -0,0 +1,21 @@ +meta { + name: Create comment 1 + type: http + seq: 4 +} + +post { + url: {{baseUrl}}/api/posts/1/comments + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "Brilliant" + } +} diff --git a/Bruno/Seed/Post operations/Post 1/Create comment 2.bru b/Bruno/Seed/Post operations/Post 1/Create comment 2.bru new file mode 100644 index 0000000..a30f83a --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Create comment 2.bru @@ -0,0 +1,21 @@ +meta { + name: Create comment 2 + type: http + seq: 5 +} + +post { + url: {{baseUrl}}/api/posts/1/comments + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "I like this" + } +} diff --git a/Bruno/Seed/Post operations/Post 1/Create comment 3.bru b/Bruno/Seed/Post operations/Post 1/Create comment 3.bru new file mode 100644 index 0000000..4866ccb --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Create comment 3.bru @@ -0,0 +1,21 @@ +meta { + name: Create comment 3 + type: http + seq: 6 +} + +post { + url: {{baseUrl}}/api/posts/1/comments + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "Where did you get this? Ignore that this is the same user" + } +} diff --git a/Bruno/Seed/Post operations/Post 1/Delete post comment.bru b/Bruno/Seed/Post operations/Post 1/Delete post comment.bru new file mode 100644 index 0000000..38e457d --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Delete post comment.bru @@ -0,0 +1,15 @@ +meta { + name: Delete post comment + type: http + seq: 10 +} + +delete { + url: {{baseUrl}}/api/posts/1/comments/3 + body: none + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} diff --git a/Bruno/Seed/Post operations/Post 1/Get all comments.bru b/Bruno/Seed/Post operations/Post 1/Get all comments.bru new file mode 100644 index 0000000..4778aa9 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Get all comments.bru @@ -0,0 +1,15 @@ +meta { + name: Get all comments + type: http + seq: 8 +} + +get { + url: {{baseUrl}}/api/posts/1/comments + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Seed/Post operations/Post 1/Get specific comment.bru b/Bruno/Seed/Post operations/Post 1/Get specific comment.bru new file mode 100644 index 0000000..88d915f --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Get specific comment.bru @@ -0,0 +1,11 @@ +meta { + name: Get specific comment + type: http + seq: 7 +} + +get { + url: {{baseUrl}}/api/posts/1/comments/1 + body: none + auth: inherit +} diff --git a/Bruno/Seed/Post operations/Post 1/Update specific comment.bru b/Bruno/Seed/Post operations/Post 1/Update specific comment.bru new file mode 100644 index 0000000..7cade59 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Update specific comment.bru @@ -0,0 +1,21 @@ +meta { + name: Update specific comment + type: http + seq: 9 +} + +patch { + url: {{baseUrl}}/api/posts/1/comments/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "Do you know what used to be here?" + } +} diff --git a/Bruno/Seed/Post operations/Post 1/Upload a file.bru b/Bruno/Seed/Post operations/Post 1/Upload a file.bru new file mode 100644 index 0000000..b46fbe0 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/Upload a file.bru @@ -0,0 +1,23 @@ +meta { + name: Upload a file + type: http + seq: 3 +} + +patch { + url: {{baseUrl}}/api/posts/1/files/1 + body: file + auth: inherit +} + +headers { + Content-Range: bytes 0-642260/642261 +} + +body:file { + file: @file(/home/dominykas/Desktop/icon.png) @contentType(image/png) +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Seed/Post operations/Post 1/folder.bru b/Bruno/Seed/Post operations/Post 1/folder.bru new file mode 100644 index 0000000..070c449 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 1/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Post 1 + seq: 7 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/Post operations/Post 2/Create a post.bru b/Bruno/Seed/Post operations/Post 2/Create a post.bru new file mode 100644 index 0000000..672fd35 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 2/Create a post.bru @@ -0,0 +1,26 @@ +meta { + name: Create a post + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/posts + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "title": "Tvarkaraštis", + "Description": "Kitas tekstas...", + "tags": [], + "filename": "doesnt really matter.png", + "fileMimeType": "image/png", + "fileSize": 1410533 + } +} diff --git a/Bruno/Seed/Post operations/Post 2/Upload a file.bru b/Bruno/Seed/Post operations/Post 2/Upload a file.bru new file mode 100644 index 0000000..58a8819 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 2/Upload a file.bru @@ -0,0 +1,23 @@ +meta { + name: Upload a file + type: http + seq: 3 +} + +patch { + url: {{baseUrl}}/api/posts/2/files/2 + body: file + auth: inherit +} + +headers { + Content-Range: bytes 0-1410532/1410533 +} + +body:file { + file: @file(/home/dominykas/Desktop/image.png) @contentType(image/png) +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Seed/Post operations/Post 2/folder.bru b/Bruno/Seed/Post operations/Post 2/folder.bru new file mode 100644 index 0000000..75c6836 --- /dev/null +++ b/Bruno/Seed/Post operations/Post 2/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Post 2 + seq: 8 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/Post operations/Update post 1.bru b/Bruno/Seed/Post operations/Update post 1.bru new file mode 100644 index 0000000..f96f80d --- /dev/null +++ b/Bruno/Seed/Post operations/Update post 1.bru @@ -0,0 +1,22 @@ +meta { + name: Update post 1 + type: http + seq: 5 +} + +patch { + url: {{baseUrl}}/api/posts/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "description": "Tekstas pakeistas", + "tags": ["high-res"] + } +} diff --git a/Bruno/Seed/Post operations/folder.bru b/Bruno/Seed/Post operations/folder.bru new file mode 100644 index 0000000..97096fd --- /dev/null +++ b/Bruno/Seed/Post operations/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Post operations + seq: 5 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/Tag operations/Create 'delete-me' tag.bru b/Bruno/Seed/Tag operations/Create 'delete-me' tag.bru new file mode 100644 index 0000000..1147bec --- /dev/null +++ b/Bruno/Seed/Tag operations/Create 'delete-me' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'delete-me' tag + type: http + seq: 3 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "delete-me" + } +} diff --git a/Bruno/Seed/Tag operations/Create 'high-res' tag.bru b/Bruno/Seed/Tag operations/Create 'high-res' tag.bru new file mode 100644 index 0000000..a842713 --- /dev/null +++ b/Bruno/Seed/Tag operations/Create 'high-res' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'high-res' tag + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "high-res" + } +} diff --git a/Bruno/Seed/Tag operations/Create 'theotown' tag.bru b/Bruno/Seed/Tag operations/Create 'theotown' tag.bru new file mode 100644 index 0000000..1e493ee --- /dev/null +++ b/Bruno/Seed/Tag operations/Create 'theotown' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'theotown' tag + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "theotown" + } +} diff --git a/Bruno/Seed/Tag operations/Delete a tag.bru b/Bruno/Seed/Tag operations/Delete a tag.bru new file mode 100644 index 0000000..e68495f --- /dev/null +++ b/Bruno/Seed/Tag operations/Delete a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Delete a tag + type: http + seq: 7 +} + +delete { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: delete-me +} diff --git a/Bruno/Seed/Tag operations/Get a tag.bru b/Bruno/Seed/Tag operations/Get a tag.bru new file mode 100644 index 0000000..5111132 --- /dev/null +++ b/Bruno/Seed/Tag operations/Get a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Get a tag + type: http + seq: 5 +} + +get { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: high-res +} diff --git a/Bruno/Seed/Tag operations/Get all tags.bru b/Bruno/Seed/Tag operations/Get all tags.bru new file mode 100644 index 0000000..296c582 --- /dev/null +++ b/Bruno/Seed/Tag operations/Get all tags.bru @@ -0,0 +1,15 @@ +meta { + name: Get all tags + type: http + seq: 4 +} + +get { + url: {{baseUrl}}/api/tags + body: none + auth: inherit +} + +params:query { + ~pageNumber: +} diff --git a/Bruno/Seed/Tag operations/Update a tag.bru b/Bruno/Seed/Tag operations/Update a tag.bru new file mode 100644 index 0000000..8b03553 --- /dev/null +++ b/Bruno/Seed/Tag operations/Update a tag.bru @@ -0,0 +1,21 @@ +meta { + name: Update a tag + type: http + seq: 6 +} + +patch { + url: {{baseUrl}}/api/tags/:name + body: json + auth: inherit +} + +params:path { + name: theotown +} + +body:json { + { + "type": "General" + } +} diff --git a/Bruno/Seed/Tag operations/folder.bru b/Bruno/Seed/Tag operations/folder.bru new file mode 100644 index 0000000..1ec0177 --- /dev/null +++ b/Bruno/Seed/Tag operations/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Tag operations + seq: 2 +} + +auth { + mode: inherit +} diff --git a/Bruno/Seed/folder.bru b/Bruno/Seed/folder.bru new file mode 100644 index 0000000..a2189ed --- /dev/null +++ b/Bruno/Seed/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Seed + seq: 3 +} + +auth { + mode: inherit +} diff --git a/Bruno/Testing/Authenticate/Login.bru b/Bruno/Testing/Authenticate/Login.bru new file mode 100644 index 0000000..8472bb4 --- /dev/null +++ b/Bruno/Testing/Authenticate/Login.bru @@ -0,0 +1,23 @@ +meta { + name: Login + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/auth/login + body: json + auth: inherit +} + +body:json { + { + "email": "dominykas@svetikas.lt", + "password": "LabaiSlaptas123@" + } +} + +vars:post-response { + accessToken: res.body.accessToken + refreshToken: res.body.refreshToken +} diff --git a/Bruno/Testing/Authenticate/folder.bru b/Bruno/Testing/Authenticate/folder.bru new file mode 100644 index 0000000..e965e15 --- /dev/null +++ b/Bruno/Testing/Authenticate/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Authenticate + seq: 1 +} + +auth { + mode: inherit +} diff --git a/Bruno/Testing/Comments/Create a post comment.bru b/Bruno/Testing/Comments/Create a post comment.bru new file mode 100644 index 0000000..d32a80d --- /dev/null +++ b/Bruno/Testing/Comments/Create a post comment.bru @@ -0,0 +1,21 @@ +meta { + name: Create a post comment + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/posts/1/comments + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "Gansu" + } +} diff --git a/Bruno/Testing/Comments/Delete post comment.bru b/Bruno/Testing/Comments/Delete post comment.bru new file mode 100644 index 0000000..8e7f11d --- /dev/null +++ b/Bruno/Testing/Comments/Delete post comment.bru @@ -0,0 +1,15 @@ +meta { + name: Delete post comment + type: http + seq: 5 +} + +delete { + url: {{baseUrl}}/api/posts/1/comments/1 + body: none + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} diff --git a/Bruno/Testing/Comments/Get all post comments.bru b/Bruno/Testing/Comments/Get all post comments.bru new file mode 100644 index 0000000..6570cb3 --- /dev/null +++ b/Bruno/Testing/Comments/Get all post comments.bru @@ -0,0 +1,15 @@ +meta { + name: Get all post comments + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/api/posts/1/comments + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Testing/Comments/Get specific post comment.bru b/Bruno/Testing/Comments/Get specific post comment.bru new file mode 100644 index 0000000..0f839be --- /dev/null +++ b/Bruno/Testing/Comments/Get specific post comment.bru @@ -0,0 +1,11 @@ +meta { + name: Get specific post comment + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/posts/1/comments/1 + body: none + auth: inherit +} diff --git a/Bruno/Testing/Comments/Update specific post comment.bru b/Bruno/Testing/Comments/Update specific post comment.bru new file mode 100644 index 0000000..9fc5094 --- /dev/null +++ b/Bruno/Testing/Comments/Update specific post comment.bru @@ -0,0 +1,21 @@ +meta { + name: Update specific post comment + type: http + seq: 4 +} + +patch { + url: {{baseUrl}}/api/posts/1/comments/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "text": "other value" + } +} diff --git a/Bruno/Testing/Comments/folder.bru b/Bruno/Testing/Comments/folder.bru new file mode 100644 index 0000000..a0ef9b0 --- /dev/null +++ b/Bruno/Testing/Comments/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Comments + seq: 4 +} + +auth { + mode: inherit +} diff --git a/Bruno/Testing/Create tags/Create 'delete-me' tag.bru b/Bruno/Testing/Create tags/Create 'delete-me' tag.bru new file mode 100644 index 0000000..1147bec --- /dev/null +++ b/Bruno/Testing/Create tags/Create 'delete-me' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'delete-me' tag + type: http + seq: 3 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "delete-me" + } +} diff --git a/Bruno/Testing/Create tags/Create 'high-res' tag.bru b/Bruno/Testing/Create tags/Create 'high-res' tag.bru new file mode 100644 index 0000000..a842713 --- /dev/null +++ b/Bruno/Testing/Create tags/Create 'high-res' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'high-res' tag + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "high-res" + } +} diff --git a/Bruno/Testing/Create tags/Create 'theotown' tag.bru b/Bruno/Testing/Create tags/Create 'theotown' tag.bru new file mode 100644 index 0000000..1e493ee --- /dev/null +++ b/Bruno/Testing/Create tags/Create 'theotown' tag.bru @@ -0,0 +1,18 @@ +meta { + name: Create 'theotown' tag + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/tags + body: json + auth: inherit +} + +body:json { + { + "type": "General", + "name": "theotown" + } +} diff --git a/Bruno/Testing/Create tags/Delete a tag.bru b/Bruno/Testing/Create tags/Delete a tag.bru new file mode 100644 index 0000000..e68495f --- /dev/null +++ b/Bruno/Testing/Create tags/Delete a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Delete a tag + type: http + seq: 7 +} + +delete { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: delete-me +} diff --git a/Bruno/Testing/Create tags/Get a tag.bru b/Bruno/Testing/Create tags/Get a tag.bru new file mode 100644 index 0000000..5111132 --- /dev/null +++ b/Bruno/Testing/Create tags/Get a tag.bru @@ -0,0 +1,15 @@ +meta { + name: Get a tag + type: http + seq: 5 +} + +get { + url: {{baseUrl}}/api/tags/:name + body: none + auth: inherit +} + +params:path { + name: high-res +} diff --git a/Bruno/Testing/Create tags/Get all tags.bru b/Bruno/Testing/Create tags/Get all tags.bru new file mode 100644 index 0000000..296c582 --- /dev/null +++ b/Bruno/Testing/Create tags/Get all tags.bru @@ -0,0 +1,15 @@ +meta { + name: Get all tags + type: http + seq: 4 +} + +get { + url: {{baseUrl}}/api/tags + body: none + auth: inherit +} + +params:query { + ~pageNumber: +} diff --git a/Bruno/Testing/Create tags/Update a tag.bru b/Bruno/Testing/Create tags/Update a tag.bru new file mode 100644 index 0000000..8b03553 --- /dev/null +++ b/Bruno/Testing/Create tags/Update a tag.bru @@ -0,0 +1,21 @@ +meta { + name: Update a tag + type: http + seq: 6 +} + +patch { + url: {{baseUrl}}/api/tags/:name + body: json + auth: inherit +} + +params:path { + name: theotown +} + +body:json { + { + "type": "General" + } +} diff --git a/Bruno/Testing/Create tags/folder.bru b/Bruno/Testing/Create tags/folder.bru new file mode 100644 index 0000000..8108c4a --- /dev/null +++ b/Bruno/Testing/Create tags/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Create tags + seq: 2 +} + +auth { + mode: inherit +} diff --git a/Bruno/Testing/Posts/Create a post copy.bru b/Bruno/Testing/Posts/Create a post copy.bru new file mode 100644 index 0000000..ee40c37 --- /dev/null +++ b/Bruno/Testing/Posts/Create a post copy.bru @@ -0,0 +1,26 @@ +meta { + name: Create a post copy + type: http + seq: 4 +} + +post { + url: {{baseUrl}}/api/posts + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "title": "TheoTown logo", + "Description": "Some text...", + "tags": [], + "filename": "super image.png", + "fileMimeType": "image/png", + "fileSize": 642261 + } +} diff --git a/Bruno/Testing/Posts/Delete post 1.bru b/Bruno/Testing/Posts/Delete post 1.bru new file mode 100644 index 0000000..cd7c7a0 --- /dev/null +++ b/Bruno/Testing/Posts/Delete post 1.bru @@ -0,0 +1,15 @@ +meta { + name: Delete post 1 + type: http + seq: 7 +} + +delete { + url: {{baseUrl}}/api/posts/1 + body: none + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} diff --git a/Bruno/Testing/Posts/Get all posts via query excluded.bru b/Bruno/Testing/Posts/Get all posts via query excluded.bru new file mode 100644 index 0000000..b4571c5 --- /dev/null +++ b/Bruno/Testing/Posts/Get all posts via query excluded.bru @@ -0,0 +1,16 @@ +meta { + name: Get all posts via query excluded + type: http + seq: 3 +} + +get { + url: {{baseUrl}}/api/posts?query=-high-res + body: none + auth: inherit +} + +params:query { + query: -high-res + ~pageNumber: 1 +} diff --git a/Bruno/Testing/Posts/Get all posts via query include.bru b/Bruno/Testing/Posts/Get all posts via query include.bru new file mode 100644 index 0000000..f0125b4 --- /dev/null +++ b/Bruno/Testing/Posts/Get all posts via query include.bru @@ -0,0 +1,16 @@ +meta { + name: Get all posts via query include + type: http + seq: 2 +} + +get { + url: {{baseUrl}}/api/posts?query=%2Bhigh-res + body: none + auth: inherit +} + +params:query { + query: %2Bhigh-res + ~pageNumber: 1 +} diff --git a/Bruno/Testing/Posts/Get all posts.bru b/Bruno/Testing/Posts/Get all posts.bru new file mode 100644 index 0000000..6086f99 --- /dev/null +++ b/Bruno/Testing/Posts/Get all posts.bru @@ -0,0 +1,15 @@ +meta { + name: Get all posts + type: http + seq: 1 +} + +get { + url: {{baseUrl}}/api/posts + body: none + auth: inherit +} + +params:query { + ~pageNumber: 1 +} diff --git a/Bruno/Testing/Posts/Get post by id of 1.bru b/Bruno/Testing/Posts/Get post by id of 1.bru new file mode 100644 index 0000000..ac652ad --- /dev/null +++ b/Bruno/Testing/Posts/Get post by id of 1.bru @@ -0,0 +1,11 @@ +meta { + name: Get post by id of 1 + type: http + seq: 6 +} + +get { + url: {{baseUrl}}/api/posts/1 + body: none + auth: inherit +} diff --git a/Bruno/Testing/Posts/Update post 1.bru b/Bruno/Testing/Posts/Update post 1.bru new file mode 100644 index 0000000..156a573 --- /dev/null +++ b/Bruno/Testing/Posts/Update post 1.bru @@ -0,0 +1,23 @@ +meta { + name: Update post 1 + type: http + seq: 8 +} + +patch { + url: {{baseUrl}}/api/posts/1 + body: json + auth: bearer +} + +auth:bearer { + token: {{accessToken}} +} + +body:json { + { + "title": "Labas", + "description": "kitas tekstas", + "tags": ["high-res"] + } +} diff --git a/Bruno/Testing/Posts/Upload file copy.bru b/Bruno/Testing/Posts/Upload file copy.bru new file mode 100644 index 0000000..3d1729f --- /dev/null +++ b/Bruno/Testing/Posts/Upload file copy.bru @@ -0,0 +1,23 @@ +meta { + name: Upload file copy + type: http + seq: 5 +} + +patch { + url: {{baseUrl}}/api/posts/2/files/2 + body: file + auth: inherit +} + +headers { + Content-Range: bytes 0-642260/642261 +} + +body:file { + file: @file(/home/dominykas/Desktop/icon.png) @contentType(image/png) +} + +settings { + encodeUrl: true +} diff --git a/Bruno/Testing/Posts/folder.bru b/Bruno/Testing/Posts/folder.bru new file mode 100644 index 0000000..e218b39 --- /dev/null +++ b/Bruno/Testing/Posts/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Posts + seq: 3 +} + +auth { + mode: inherit +} diff --git a/Bruno/Testing/folder.bru b/Bruno/Testing/folder.bru new file mode 100644 index 0000000..ba96e6d --- /dev/null +++ b/Bruno/Testing/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Testing + seq: 4 +} + +auth { + mode: inherit +} diff --git a/Bruno/bruno.json b/Bruno/bruno.json new file mode 100644 index 0000000..1a625b5 --- /dev/null +++ b/Bruno/bruno.json @@ -0,0 +1,9 @@ +{ + "version": "1", + "name": "t120b165", + "type": "collection", + "ignore": [ + "node_modules", + ".git" + ] +} \ No newline at end of file diff --git a/Bruno/collection.bru b/Bruno/collection.bru new file mode 100644 index 0000000..f7f3c81 --- /dev/null +++ b/Bruno/collection.bru @@ -0,0 +1,12 @@ +meta { + name: My Title +} + +auth { + mode: none +} + +vars:pre-request { + baseUrl: http://localhost:5259 + ~baseUrl: http://localhost:8080 +} diff --git a/Bruno/environments/Environment 1.bru b/Bruno/environments/Environment 1.bru new file mode 100644 index 0000000..7ae6064 --- /dev/null +++ b/Bruno/environments/Environment 1.bru @@ -0,0 +1,3 @@ +vars { + baseUrl: http://localhost:5259 +}