Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/bruno/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Bruno

Bruno is an OpenSource IDE for exploring and testing APIS ([usebruno/bruno](https://github.com/usebruno/bruno)).

## How to use 🤔

1. Install Bruno from [usebruno.com/downloads](https://www.usebruno.com/downloads).

2. Click on the `Open Collection` option and search for the `bruno/` folder in this repository.

3. Click on the `No Environment` option and select the `development`environment to set the base URL.

4. Register and login as a user and set the `AUTH_TOKEN` environment variable to the token you received:

![Graphic instructions to setup the bruno environment](https://github.com/hawks-atlanta/proxy-python/assets/62714297/bdaecab0-547c-4787-b410-d116419ae5ff)

5. Run the request you want to test.

## Notes 📝

- The feature to upload files via `multipart/form-data` is not supported yet in Bruno. you can use `Insomnia` or `Postman` to test this feature.
18 changes: 18 additions & 0 deletions docs/bruno/account/register.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
meta {
name: register
type: http
seq: 1
}

post {
url: {{API_BASE_URL}}/account/register
body: json
auth: none
}

body:json {
{
"username": "woynert",
"password": "password"
}
}
22 changes: 22 additions & 0 deletions docs/bruno/account/update-password.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: update-password
type: http
seq: 2
}

patch {
url: {{API_BASE_URL}}/account/password
body: json
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:json {
{
"oldPassword": "password",
"newPassword": "secure"
}
}
15 changes: 15 additions & 0 deletions docs/bruno/auth/challenge-and-refresh.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: challenge-and-refresh
type: http
seq: 2
}

post {
url: {{API_BASE_URL}}/auth/refresh
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
18 changes: 18 additions & 0 deletions docs/bruno/auth/login.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
meta {
name: login
type: http
seq: 1
}

post {
url: {{API_BASE_URL}}/auth/login
body: json
auth: none
}

body:json {
{
"username": "woynert",
"password": "password"
}
}
5 changes: 5 additions & 0 deletions docs/bruno/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1",
"name": "Proxy Python",
"type": "collection"
}
6 changes: 6 additions & 0 deletions docs/bruno/environments/development.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vars {
API_BASE_URL: http://127.0.0.1:5000
}
vars:secret [
AUTH_TOKEN
]
22 changes: 22 additions & 0 deletions docs/bruno/files/create-folder-in-folder.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: create-folder-in-folder
type: http
seq: 6
}

post {
url: {{API_BASE_URL}}/folders
body: json
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:json {
{
"directoryName": "nested",
"location": "25d8cec5-f2d4-4b9e-90b9-06c7093bf027"
}
}
22 changes: 22 additions & 0 deletions docs/bruno/files/create-folder-in-root.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: create-folder-in-root
type: http
seq: 2
}

post {
url: {{API_BASE_URL}}/folders
body: json
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:json {
{
"directoryName": "university",
"location": null
}
}
15 changes: 15 additions & 0 deletions docs/bruno/files/download-file.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: download-file
type: http
seq: 9
}

get {
url: {{API_BASE_URL}}/file/download/ac682ad3-e525-49af-a257-2697c80fe15a
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
15 changes: 15 additions & 0 deletions docs/bruno/files/ger-file-status.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: ger-file-status
type: http
seq: 10
}

get {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a/status
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
15 changes: 15 additions & 0 deletions docs/bruno/files/get-file-metadata.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: get-file-metadata
type: http
seq: 11
}

get {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
19 changes: 19 additions & 0 deletions docs/bruno/files/list-files-in-folder.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
meta {
name: list-files-in-folder
type: http
seq: 8
}

get {
url: {{API_BASE_URL}}/file/list?directoryUUID=25d8cec5-f2d4-4b9e-90b9-06c7093bf027
body: none
auth: bearer
}

query {
directoryUUID: 25d8cec5-f2d4-4b9e-90b9-06c7093bf027
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
15 changes: 15 additions & 0 deletions docs/bruno/files/list-files-in-root.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: list-files-in-root
type: http
seq: 4
}

get {
url: {{API_BASE_URL}}/file/list
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
17 changes: 17 additions & 0 deletions docs/bruno/files/move-file-to-folder.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta {
name: move-file-to-folder
type: http
seq: 7
}

patch {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a/move
body: json
auth: none
}

body:json {
{
"targetDirectoryUUID": "25d8cec5-f2d4-4b9e-90b9-06c7093bf027",
}
}
17 changes: 17 additions & 0 deletions docs/bruno/files/move-file-to-root.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta {
name: move-file-to-root
type: http
seq: 3
}

patch {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a/move
body: json
auth: none
}

body:json {
{
"targetDirectoryUUID": null,
}
}
17 changes: 17 additions & 0 deletions docs/bruno/files/rename-file.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta {
name: rename-file
type: http
seq: 12
}

patch {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a/rename
body: json
auth: none
}

body:json {
{
"newName": "renamed"
}
}
22 changes: 22 additions & 0 deletions docs/bruno/files/share-file.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: share-file
type: http
seq: 12
}

post {
url: {{API_BASE_URL}}/file/share
body: json
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:json {
{
"fileUUID": "ac682ad3-e525-49af-a257-2697c80fe15a",
"otherUsername": "miguel"
}
}
15 changes: 15 additions & 0 deletions docs/bruno/files/shared-with-who.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: shared-with-who
type: http
seq: 13
}

get {
url: {{API_BASE_URL}}/file/ac682ad3-e525-49af-a257-2697c80fe15a/shared-with-who
body: none
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}
20 changes: 20 additions & 0 deletions docs/bruno/files/upload-file-in-folder.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
meta {
name: upload-file-in-folder
type: http
seq: 5
}

post {
url: {{API_BASE_URL}}/file/upload
body: multipartForm
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:multipart-form {
file:
location: f693e54f-d285-47e3-833c-fd0943e2e3da
}
20 changes: 20 additions & 0 deletions docs/bruno/files/upload-file-in-root.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
meta {
name: upload-file-in-root
type: http
seq: 1
}

post {
url: {{API_BASE_URL}}/file/upload
body: multipartForm
auth: bearer
}

auth:bearer {
token: {{AUTH_TOKEN}}
}

body:multipart-form {
file:
location:
}