Skip to content

Commit 014ddc6

Browse files
committed
added new postman files
1 parent d6d3cc7 commit 014ddc6

7 files changed

+173
-5
lines changed

CustomScript.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
(function () {
2+
3+
build_moves = function (moves) {
4+
5+
let game = [];
6+
7+
let previous_move = { "one": " ", "two": " ", "three": " ", "four": " ", "five": " ", "six": " ", "seven": " ", "eight": " ", "nine": " " };
8+
9+
for (let i = 0; i < moves.length; i++) {
10+
11+
let player = moves[i].player === 1 ? 'X' : 'O';
12+
13+
let this_move = {
14+
"one": moves[i].square === 0 ? player : previous_move.one,
15+
"two": moves[i].square === 1 ? player : previous_move.two,
16+
"three": moves[i].square === 2 ? player : previous_move.three,
17+
"four": moves[i].square === 3 ? player : previous_move.four,
18+
"five": moves[i].square === 4 ? player : previous_move.five,
19+
"six": moves[i].square === 5 ? player : previous_move.six,
20+
"seven": moves[i].square === 6 ? player : previous_move.seven,
21+
"eight": moves[i].square === 7 ? player : previous_move.eight,
22+
"nine": moves[i].square === 8 ? player : previous_move.nine
23+
};
24+
previous_move = this_move;
25+
game.push(this_move);
26+
}
27+
28+
return game;
29+
};
30+
31+
let tmplt = `
32+
<style>
33+
td.btm-rt {
34+
border-right: 2px solid blue;
35+
border-bottom: 2px solid blue;
36+
}
37+
td.btm {
38+
border-bottom: 2px solid blue;
39+
}
40+
td.lf-rt {
41+
border-right: 2px solid blue;
42+
border-left: 2px solid blue;
43+
}
44+
td {
45+
padding: 10px;
46+
width: 2em;
47+
height: 2em;
48+
font-size:2em;
49+
text-align:center;
50+
vertical-align: center;
51+
}
52+
</style>
53+
{{#each response}}
54+
<table>
55+
<tr><td class="btm-rt">{{one}}</td><td class="btm-rt">{{two}}</td><td class="btm">{{three}}</td></tr>
56+
<tr><td class="btm-rt">{{four}}</td><td class="btm-rt">{{five}}</td><td class="btm">{{six}}</td></tr>
57+
<tr><td>{{seven}}</td><td class="lf-rt">{{eight}}</td><td>{{nine}}</td></tr>
58+
</table>
59+
<br />
60+
{{/each}}`;
61+
62+
return { BuildMoves: build_moves, Template: tmplt };
63+
64+
})();

Database.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- Script Date: 10/6/2019 3:14 PM - ErikEJ.SqlCeScripting version 3.5.2.81
1+
-- Script Date: 10/8/2019 8:16 PM - ErikEJ.SqlCeScripting version 3.5.2.81
22
-- Database information:
33
-- Database: C:\ProgramData\PostmanDeliversData\GameDB.sqlite3
44
-- ServerVersion: 3.27.2
5-
-- DatabaseSize: 32 KB
5+
-- DatabaseSize: 36 KB
66
-- Created: 10/5/2019 4:02 PM
77

88
-- User Table information:

Postman Delivers.postman_globals.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "fc928a99-20c9-48d7-8cdf-ac3771e515f2",
3+
"values": [
4+
{
5+
"key": "game_visualizer",
6+
"value": "(function () {\n\n build_moves = function (moves) {\n\n let game = [];\n\n let previous_move = { \"one\": \" \", \"two\": \" \", \"three\": \" \", \"four\": \" \", \"five\": \" \", \"six\": \" \", \"seven\": \" \", \"eight\": \" \", \"nine\": \" \" };\n\n for (let i = 0; i < moves.length; i++) {\n\n let player = moves[i].player === 1 ? 'X' : 'O';\n\n let this_move = {\n \"one\": moves[i].square === 0 ? player : previous_move.one,\n \"two\": moves[i].square === 1 ? player : previous_move.two,\n \"three\": moves[i].square === 2 ? player : previous_move.three,\n \"four\": moves[i].square === 3 ? player : previous_move.four,\n \"five\": moves[i].square === 4 ? player : previous_move.five,\n \"six\": moves[i].square === 5 ? player : previous_move.six,\n \"seven\": moves[i].square === 6 ? player : previous_move.seven,\n \"eight\": moves[i].square === 7 ? player : previous_move.eight,\n \"nine\": moves[i].square === 8 ? player : previous_move.nine\n };\n previous_move = this_move;\n game.push(this_move);\n }\n\n return game;\n };\n\n let tmplt = `\n <style>\n td.btm-rt {\n border-right: 2px solid blue;\n border-bottom: 2px solid blue;\n }\n td.btm {\n border-bottom: 2px solid blue;\n }\n td.lf-rt {\n border-right: 2px solid blue;\n border-left: 2px solid blue;\n }\n td {\n padding: 10px; \n width: 2em; \n height: 2em;\n font-size:2em;\n text-align:center;\n vertical-align: center;\n }\n </style>\n {{#each response}}\n <table>\n <tr><td class=\"btm-rt\">{{one}}</td><td class=\"btm-rt\">{{two}}</td><td class=\"btm\">{{three}}</td></tr>\n <tr><td class=\"btm-rt\">{{four}}</td><td class=\"btm-rt\">{{five}}</td><td class=\"btm\">{{six}}</td></tr>\n <tr><td>{{seven}}</td><td class=\"lf-rt\">{{eight}}</td><td>{{nine}}</td></tr>\n </table>\n <br />\n {{/each}}`;\n\n return { BuildMoves: build_moves, Template: tmplt };\n\n})();",
7+
"enabled": true
8+
}
9+
],
10+
"name": "Postman Delivers Globals",
11+
"_postman_variable_scope": "globals",
12+
"_postman_exported_at": "2019-10-09T00:13:36.571Z",
13+
"_postman_exported_using": "Postman/7.8.0"
14+
}

PostmanDelivers.sln

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TikTakToe.Engine.Tests", "T
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C2E67A42-FE57-4B29-831D-376F569A87E8}"
1111
ProjectSection(SolutionItems) = preProject
12+
CustomScript.js = CustomScript.js
1213
Database.sql = Database.sql
13-
Postman Delivers.postman_collection.json = Postman Delivers.postman_collection.json
14-
PostmandDelivers DEBUG.postman_environment.json = PostmandDelivers DEBUG.postman_environment.json
14+
Postman Delivers.postman_globals.json = Postman Delivers.postman_globals.json
15+
PostmandDelivers HTTP.postman_environment.json = PostmandDelivers HTTP.postman_environment.json
16+
PostmandDelivers HTTPS.postman_environment.json = PostmandDelivers HTTPS.postman_environment.json
17+
Script Order.postman_collection.json = Script Order.postman_collection.json
18+
ScriptOrderEnv.postman_environment.json = ScriptOrderEnv.postman_environment.json
1519
EndProjectSection
1620
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostmanDelivers.API", "PostmanDelivers.API\PostmanDelivers.API.csproj", "{6EFA36C6-1508-4116-8012-6448D0168FDA}"
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostmanDelivers.API", "PostmanDelivers.API\PostmanDelivers.API.csproj", "{6EFA36C6-1508-4116-8012-6448D0168FDA}"
1822
EndProject
1923
Global
2024
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"id": "e902407c-6cce-4860-bd13-3860e93e6459",
3+
"name": "PostmandDelivers HTTP",
4+
"values": [
5+
{
6+
"key": "baseurl",
7+
"value": "",
8+
"enabled": true
9+
},
10+
{
11+
"key": "happy_path_game_id",
12+
"value": "",
13+
"enabled": true
14+
},
15+
{
16+
"key": "happy_path_playero_id",
17+
"value": "",
18+
"enabled": true
19+
},
20+
{
21+
"key": "happy_path_playero_name",
22+
"value": "",
23+
"enabled": true
24+
},
25+
{
26+
"key": "happy_path_playerx_id",
27+
"value": "",
28+
"enabled": true
29+
},
30+
{
31+
"key": "happy_path_playerx_name",
32+
"value": "",
33+
"enabled": true
34+
}
35+
],
36+
"_postman_variable_scope": "environment",
37+
"_postman_exported_at": "2019-10-09T00:13:06.232Z",
38+
"_postman_exported_using": "Postman/7.8.0"
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"id": "f3c1560d-e9b7-4f17-be71-a278c012fdf8",
3+
"name": "PostmandDelivers HTTPS",
4+
"values": [
5+
{
6+
"key": "baseurl",
7+
"value": "",
8+
"enabled": true
9+
},
10+
{
11+
"key": "happy_path_game_id",
12+
"value": "",
13+
"enabled": true
14+
},
15+
{
16+
"key": "happy_path_playero_id",
17+
"value": "",
18+
"enabled": true
19+
},
20+
{
21+
"key": "happy_path_playero_name",
22+
"value": "",
23+
"enabled": true
24+
},
25+
{
26+
"key": "happy_path_playerx_id",
27+
"value": "",
28+
"enabled": true
29+
},
30+
{
31+
"key": "happy_path_playerx_name",
32+
"value": "",
33+
"enabled": true
34+
}
35+
],
36+
"_postman_variable_scope": "environment",
37+
"_postman_exported_at": "2019-10-09T00:13:13.464Z",
38+
"_postman_exported_using": "Postman/7.8.0"
39+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "96ef8159-d7c9-4a6e-940a-7ff34d0bcb03",
3+
"name": "ScriptOrderEnv",
4+
"values": [],
5+
"_postman_variable_scope": "environment",
6+
"_postman_exported_at": "2019-10-09T00:15:35.241Z",
7+
"_postman_exported_using": "Postman/7.8.0"
8+
}

0 commit comments

Comments
 (0)