Skip to content

Commit 881b266

Browse files
committed
Add postman collection
1 parent cebdb8e commit 881b266

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ Fetch a gopher by ID
3333
GET /gophers/{gopher_id}
3434
```
3535

36+
Add a gopher
37+
38+
```
39+
POST /gophers
40+
```
41+
42+
Modify a gopher
43+
```
44+
PUT /gophers/{gopher_id}
45+
```
46+
47+
Remove a gopher
48+
```
49+
DELETE /gophers/{gopher_id}
50+
```
51+
52+
You can import the Postman collection into `api/GopherApi.postman_collection`
53+
3654
## Contributing
3755
If you think that you can improve with new endpoints, and functionallities the API feel free to contribute with this project with fork this repo and send your Pull Request.
3856

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"info": {
3+
"_postman_id": "358a0a2e-a86c-47db-926f-e4ebcdc0587d",
4+
"name": "GopherApi",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "Fetch All Gophers",
10+
"request": {
11+
"method": "GET",
12+
"header": [],
13+
"url": {
14+
"raw": "http://localhost:8080/gophers",
15+
"protocol": "http",
16+
"host": [
17+
"localhost"
18+
],
19+
"port": "8080",
20+
"path": [
21+
"gophers"
22+
]
23+
}
24+
},
25+
"response": []
26+
},
27+
{
28+
"name": "Fetch Gopher by ID",
29+
"request": {
30+
"method": "GET",
31+
"header": [],
32+
"url": {
33+
"raw": "http://localhost:8080/gophers/01D3XZ7CN92AKS9HAPSZ4D5DP9",
34+
"protocol": "http",
35+
"host": [
36+
"localhost"
37+
],
38+
"port": "8080",
39+
"path": [
40+
"gophers",
41+
"01D3XZ7CN92AKS9HAPSZ4D5DP9"
42+
]
43+
}
44+
},
45+
"response": []
46+
},
47+
{
48+
"name": "Add Gopher",
49+
"request": {
50+
"method": "POST",
51+
"header": [
52+
{
53+
"key": "Content-Type",
54+
"name": "Content-Type",
55+
"value": "application/json",
56+
"type": "text"
57+
}
58+
],
59+
"body": {
60+
"mode": "raw",
61+
"raw": "{\n\t\"ID\": \"01DCBP0R0MSNZY975ZQF1DCQCH\",\n \"name\": \"Eustaqio\",\n \"image\": \"https://storage.googleapis.com/gopherizeme.appspot.com/gophers/f73f25d73c06cc81c482821391a85c4b7dd34ba5.png\",\n \"age\": 99\n}"
62+
},
63+
"url": {
64+
"raw": "http://localhost:8080/gophers",
65+
"protocol": "http",
66+
"host": [
67+
"localhost"
68+
],
69+
"port": "8080",
70+
"path": [
71+
"gophers"
72+
]
73+
}
74+
},
75+
"response": []
76+
},
77+
{
78+
"name": "Modify Gopher",
79+
"request": {
80+
"method": "PUT",
81+
"header": [
82+
{
83+
"key": "Content-Type",
84+
"name": "Content-Type",
85+
"value": "application/json",
86+
"type": "text"
87+
}
88+
],
89+
"body": {
90+
"mode": "raw",
91+
"raw": "{\n \"name\": \"Eustaqio\",\n \"image\": \"https://storage.googleapis.com/gopherizeme.appspot.com/gophers/f73f25d73c06cc81c482821391a85c4b7dd34ba5.png\",\n \"age\": 99\n}"
92+
},
93+
"url": {
94+
"raw": "http://localhost:8080/gophers/01D3XZ89NFJZ9QT2DHVD462AC2",
95+
"protocol": "http",
96+
"host": [
97+
"localhost"
98+
],
99+
"port": "8080",
100+
"path": [
101+
"gophers",
102+
"01D3XZ89NFJZ9QT2DHVD462AC2"
103+
]
104+
}
105+
},
106+
"response": []
107+
},
108+
{
109+
"name": "Delete Gopher",
110+
"request": {
111+
"method": "DELETE",
112+
"header": [
113+
{
114+
"key": "Content-Type",
115+
"name": "Content-Type",
116+
"value": "application/json",
117+
"type": "text"
118+
}
119+
],
120+
"url": {
121+
"raw": "http://localhost:8080/gophers/01D3XZ89NFJZ9QT2DHVD462AC2",
122+
"protocol": "http",
123+
"host": [
124+
"localhost"
125+
],
126+
"port": "8080",
127+
"path": [
128+
"gophers",
129+
"01D3XZ89NFJZ9QT2DHVD462AC2"
130+
]
131+
}
132+
},
133+
"response": []
134+
}
135+
]
136+
}

0 commit comments

Comments
 (0)