Skip to content

Commit 32b8f25

Browse files
committed
Updating endpoints and tooling around them.
1 parent 7a70dd0 commit 32b8f25

File tree

5 files changed

+194
-136
lines changed

5 files changed

+194
-136
lines changed

Codemash.postman_collection.json

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"info": {
3-
"name": "Codemash",
43
"_postman_id": "79d9618c-e999-d611-fe4c-19d0c1522626",
5-
"description": "",
4+
"name": "Codemash",
65
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
76
},
87
"item": [
@@ -11,28 +10,25 @@
1110
"request": {
1211
"method": "GET",
1312
"header": [],
14-
"body": {},
13+
"body": {
14+
"mode": "raw",
15+
"raw": ""
16+
},
1517
"url": {
16-
"raw": "https://speakers.codemash.org/api/SessionsData?type=json",
17-
"protocol": "https",
18+
"raw": "http://localhost:8181/api/v2/mqm7pgek/view/sessions",
19+
"protocol": "http",
1820
"host": [
19-
"speakers",
20-
"codemash",
21-
"org"
21+
"localhost"
2222
],
23+
"port": "8181",
2324
"path": [
2425
"api",
25-
"SessionsData"
26-
],
27-
"query": [
28-
{
29-
"key": "type",
30-
"value": "json",
31-
"equals": true
32-
}
26+
"v2",
27+
"mqm7pgek",
28+
"view",
29+
"sessions"
3330
]
34-
},
35-
"description": ""
31+
}
3632
},
3733
"response": []
3834
},
@@ -41,28 +37,25 @@
4137
"request": {
4238
"method": "GET",
4339
"header": [],
44-
"body": {},
40+
"body": {
41+
"mode": "raw",
42+
"raw": ""
43+
},
4544
"url": {
46-
"raw": "https://speakers.codemash.org/api/SpeakersData?type=json",
47-
"protocol": "https",
45+
"raw": "http://localhost:8181/api/v2/mqm7pgek/view/speakers",
46+
"protocol": "http",
4847
"host": [
49-
"speakers",
50-
"codemash",
51-
"org"
48+
"localhost"
5249
],
50+
"port": "8181",
5351
"path": [
5452
"api",
55-
"SpeakersData"
56-
],
57-
"query": [
58-
{
59-
"key": "type",
60-
"value": "json",
61-
"equals": true
62-
}
53+
"v2",
54+
"mqm7pgek",
55+
"view",
56+
"speakers"
6357
]
64-
},
65-
"description": ""
58+
}
6659
},
6760
"response": []
6861
}

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ let loadExpectation = (jsonFile) => {
1212

1313
var app = express();
1414

15-
app.get('/api/SpeakersData', function(req, res) {
15+
app.get('/api/v2/mqm7pgek/view/speakers', function(req, res) {
1616
var data = loadExpectation('/speakers.json');
1717
console.log(data);
1818
res.json(data);
1919
});
2020

21-
app.get('/api/SessionsData', function(req, res) {
21+
app.get('/api/v2/mqm7pgek/view/sessions', function(req, res) {
2222
var data = loadExpectation('/sessions.json');
2323
console.log(data);
2424
res.json(data);

sessions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
curl -X GET \
4-
'https://speakers.codemash.org/api/SessionsData?type=json' \
4+
'http://localhost:8181/api/v2/mqm7pgek/view/sessions' \
55
-H 'cache-control: no-cache'

speakers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
curl -X GET \
4-
'https://speakers.codemash.org/api/SpeakersData?type=json' \
4+
'http://localhost:8181/api/v2/mqm7pgek/view/speakers' \
55
-H 'cache-control: no-cache'

0 commit comments

Comments
 (0)