{"info":{"_postman_id":"4fc95e11-eb0d-4664-a1ec-c6e26673f5b6","name":"Chess API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10892299","collectionId":"4fc95e11-eb0d-4664-a1ec-c6e26673f5b6","publishedId":"SzzkcHR2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-06-18T08:17:31.000Z"},"item":[{"name":"Create game","id":"c5e7bde2-833b-4b9a-b959-ed5afc8edcdf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://chess.trofimov.dev/create","description":"<p>Returns <code>id</code>, <code>moveNumber</code> and <code>turn</code> if <code>success</code> is <code>true</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>int</td>\n<td>New game id</td>\n</tr>\n<tr>\n<td>moveNumber</td>\n<td>int</td>\n<td>Counter of all moves</td>\n</tr>\n<tr>\n<td>turn</td>\n<td>int</td>\n<td>Player whose turn is now: 0 is black, 1 is white</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["create"],"host":["https://chess.trofimov.dev"],"query":[],"variable":[]}},"response":[{"id":"42598e4c-3a9a-4bd4-b54d-606a54eb5743","name":"Create game error","originalRequest":{"method":"GET","header":[],"url":"https://chess.trofimov.dev/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Jun 2020 23:18:08 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"03662c68d10000c3ca48bd1200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a507cee1d87c3ca-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 500,\n        \"msg\": \"Game not created\"\n    },\n    \"success\": false\n}"},{"id":"c13d5d5e-1df3-4e44-8f58-c82f34cd75ad","name":"Create game","originalRequest":{"method":"GET","header":[],"url":"https://chess.trofimov.dev/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Jun 2020 23:09:28 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"036624790c000084f845820200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a50703b4b6984f8-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"response\": {\n        \"id\": 1,\n        \"moveNumber\": 1,\n        \"turn\": 1\n    },\n    \"success\": true\n}"}],"_postman_id":"c5e7bde2-833b-4b9a-b959-ed5afc8edcdf"},{"name":"Move","id":"250f86fd-ca26-4e8a-8e12-606b36b754a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://chess.trofimov.dev/move?id=<integer>&from=<string>&to=<string>&transformTo=<string>","description":"<p>Returns <code>status</code> if <code>success</code> is <code>true</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>integer</td>\n<td>Current game status: 0 - Game in progress, 1 - King in check, 2 - King in mate</td>\n</tr>\n</tbody>\n</table>\n</div><p>For castling, you need to transfer the new coords of the King, the Rook will move automatically.</p>\n<p>To convert a pawn, you need to add param <code>transferTo</code> (one of <code>B</code> - Bishop, <code>H</code> - Knight, <code>Q</code> - Queen, <code>R</code> - Rook).</p>\n","urlObject":{"path":["move"],"host":["https://chess.trofimov.dev"],"query":[{"description":{"content":"<p>(Required) Game id</p>\n","type":"text/plain"},"key":"id","value":"<integer>"},{"description":{"content":"<p>(Required) Algebraic notation of cell, ex. f2</p>\n","type":"text/plain"},"key":"from","value":"<string>"},{"description":{"content":"<p>(Required) Algebraic notation of cell, ex. f4</p>\n","type":"text/plain"},"key":"to","value":"<string>"},{"description":{"content":"<p>What piece to turn a pawn into, one of <code>B</code> - Bishop, <code>H</code> - Knight, <code>Q</code> - Queen, <code>R</code> - Rook</p>\n","type":"text/plain"},"key":"transformTo","value":"<string>"}],"variable":[]}},"response":[{"id":"034c6270-366a-4838-b07a-563cb2ecaa7c","name":"Move error not your turn","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=f7&to=f5","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"f7","description":"Algebraic notation of cell"},{"key":"to","value":"f5","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Date","value":"Thu, 18 Jun 2020 07:47:58 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"0367ff2bd40000c3fcc017d200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a5367bfbe6ec3fc-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\"error\":{\"code\":403,\"msg\":\"Not your turn.\"},\"success\":false}"},{"id":"398312bc-442e-4cef-a26e-4881687cafc0","name":"Move error same cells","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=f4&to=f4","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"f4","description":"Algebraic notation of cell"},{"key":"to","value":"f4","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Date","value":"Thu, 18 Jun 2020 07:47:00 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"0367fe4ae80000c3fcc0338200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a536657da95c3fc-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\"error\":{\"code\":400,\"msg\":\"From and to are same.\"},\"success\":false}"},{"id":"4492c850-caf1-46b7-8f2a-cf37b8ce75aa","name":"Move","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=f2&to=f4","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"f2","description":"Algebraic notation of cell"},{"key":"to","value":"f4","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Jun 2020 23:08:15 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"0366235a98000084f845a0b200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a506e70fa7f84f8-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"response\": {\n        \"status\": 0\n    },\n    \"success\": true\n}"},{"id":"74b9541f-aca3-442e-b0b4-01d6cb69958b","name":"Move error empty cell","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=f4&to=f5","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"f4","description":"Algebraic notation of cell"},{"key":"to","value":"f5","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 18 Jun 2020 07:47:21 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"0367fe9d710000c3fcc022c200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a5366dbec0fc3fc-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"msg\": \"From cell is empty.\"\n    },\n    \"success\": false\n}"},{"id":"c508851b-b38f-4be3-b273-939eff5fa4aa","name":"Move error","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=f2&to=f4","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"f2","description":"Algebraic notation of cell"},{"key":"to","value":"f4","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Jun 2020 23:18:35 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"03662cd4640000c3ca488b2200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a507d9a3b66c3ca-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 404,\n        \"msg\": \"Game not found\"\n    },\n    \"success\": false\n}"},{"id":"ec966daf-cc15-42e4-9cd7-2926959340c8","name":"Move error bad move","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/move?id=1&from=a2&to=b2","host":["https://chess.trofimov.dev"],"path":["move"],"query":[{"key":"id","value":"1","description":"Game id"},{"key":"from","value":"a2","description":"Algebraic notation of cell"},{"key":"to","value":"b2","description":"Algebraic notation of cell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Date","value":"Thu, 18 Jun 2020 07:49:20 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"0368006f300000c3fcc03de200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a5369c51f8fc3fc-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\"error\":{\"code\":400,\"msg\":\"Bad move.\"},\"success\":false}"}],"_postman_id":"250f86fd-ca26-4e8a-8e12-606b36b754a0"},{"name":"Get game status","id":"3160f38a-6771-4eec-87ad-7e4887a11b25","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://chess.trofimov.dev/status?id=<integer>","description":"<p>Returns <code>moveNumber</code>, <code>turn</code> and <code>status</code> if <code>success</code> is <code>true</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>moveNumber</td>\n<td>integer</td>\n<td>Counter of all moves</td>\n</tr>\n<tr>\n<td>turn</td>\n<td>integer</td>\n<td>Player whose turn is now: 0 is black, 1 is white</td>\n</tr>\n<tr>\n<td>status</td>\n<td>integer</td>\n<td>Current game status: 0 - Game in progress, 1 - King in check, 2 - King in mate</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["status"],"host":["https://chess.trofimov.dev"],"query":[{"description":{"content":"<p>(Required) Game id</p>\n","type":"text/plain"},"key":"id","value":"<integer>"}],"variable":[]}},"response":[{"id":"7ea52657-04f6-48ef-8d71-446a3ba37271","name":"Get game status","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/status?id=1","host":["https://chess.trofimov.dev"],"path":["status"],"query":[{"key":"id","value":"1","description":"Game id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Jun 2020 23:11:13 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"036626153a000084f845836200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a5072cecf8e84f8-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"response\": {\n        \"moveNumber\": 1,\n        \"turn\": 1,\n        \"status\": 0\n    },\n    \"success\": true\n}"},{"id":"9782eb6c-9cb8-4c73-a46d-eb6b87e1a815","name":"Get game status error","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://chess.trofimov.dev/status?id=1","host":["https://chess.trofimov.dev"],"path":["status"],"query":[{"key":"id","value":"1","description":"Game id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 18 Jun 2020 08:05:02 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"cf-request-id","value":"03680ecb4200008480fe120200000001"},{"key":"Expect-CT","value":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"5a5380beda058480-LED"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 404,\n        \"msg\": \"Game not found\"\n    },\n    \"success\": false\n}"}],"_postman_id":"3160f38a-6771-4eec-87ad-7e4887a11b25"}],"variable":[{"key":"baseUrl","value":"https://chess.trofimov.dev"}]}