Add bruno files
This commit is contained in:
15
Bruno/Seed/Post operations/Get all posts.bru
Normal file
15
Bruno/Seed/Post operations/Get all posts.bru
Normal file
@@ -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
|
||||
}
|
||||
15
Bruno/Seed/Post operations/Get file 1.bru
Normal file
15
Bruno/Seed/Post operations/Get file 1.bru
Normal file
@@ -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
|
||||
}
|
||||
15
Bruno/Seed/Post operations/Get file 2.bru
Normal file
15
Bruno/Seed/Post operations/Get file 2.bru
Normal file
@@ -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
|
||||
}
|
||||
11
Bruno/Seed/Post operations/Get post by id of 1 again.bru
Normal file
11
Bruno/Seed/Post operations/Get post by id of 1 again.bru
Normal file
@@ -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
|
||||
}
|
||||
11
Bruno/Seed/Post operations/Get post by id of 1.bru
Normal file
11
Bruno/Seed/Post operations/Get post by id of 1.bru
Normal file
@@ -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
|
||||
}
|
||||
26
Bruno/Seed/Post operations/Post 1/Create a post.bru
Normal file
26
Bruno/Seed/Post operations/Post 1/Create a post.bru
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
21
Bruno/Seed/Post operations/Post 1/Create comment 1.bru
Normal file
21
Bruno/Seed/Post operations/Post 1/Create comment 1.bru
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
21
Bruno/Seed/Post operations/Post 1/Create comment 2.bru
Normal file
21
Bruno/Seed/Post operations/Post 1/Create comment 2.bru
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
21
Bruno/Seed/Post operations/Post 1/Create comment 3.bru
Normal file
21
Bruno/Seed/Post operations/Post 1/Create comment 3.bru
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
15
Bruno/Seed/Post operations/Post 1/Delete post comment.bru
Normal file
15
Bruno/Seed/Post operations/Post 1/Delete post comment.bru
Normal file
@@ -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}}
|
||||
}
|
||||
15
Bruno/Seed/Post operations/Post 1/Get all comments.bru
Normal file
15
Bruno/Seed/Post operations/Post 1/Get all comments.bru
Normal file
@@ -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
|
||||
}
|
||||
11
Bruno/Seed/Post operations/Post 1/Get specific comment.bru
Normal file
11
Bruno/Seed/Post operations/Post 1/Get specific comment.bru
Normal file
@@ -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
|
||||
}
|
||||
@@ -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?"
|
||||
}
|
||||
}
|
||||
23
Bruno/Seed/Post operations/Post 1/Upload a file.bru
Normal file
23
Bruno/Seed/Post operations/Post 1/Upload a file.bru
Normal file
@@ -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
|
||||
}
|
||||
8
Bruno/Seed/Post operations/Post 1/folder.bru
Normal file
8
Bruno/Seed/Post operations/Post 1/folder.bru
Normal file
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: Post 1
|
||||
seq: 7
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
26
Bruno/Seed/Post operations/Post 2/Create a post.bru
Normal file
26
Bruno/Seed/Post operations/Post 2/Create a post.bru
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
23
Bruno/Seed/Post operations/Post 2/Upload a file.bru
Normal file
23
Bruno/Seed/Post operations/Post 2/Upload a file.bru
Normal file
@@ -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
|
||||
}
|
||||
8
Bruno/Seed/Post operations/Post 2/folder.bru
Normal file
8
Bruno/Seed/Post operations/Post 2/folder.bru
Normal file
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: Post 2
|
||||
seq: 8
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
22
Bruno/Seed/Post operations/Update post 1.bru
Normal file
22
Bruno/Seed/Post operations/Update post 1.bru
Normal file
@@ -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"]
|
||||
}
|
||||
}
|
||||
8
Bruno/Seed/Post operations/folder.bru
Normal file
8
Bruno/Seed/Post operations/folder.bru
Normal file
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: Post operations
|
||||
seq: 5
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
Reference in New Issue
Block a user