Files
API/TOOHUCardAPI/ExternalDocumentation/2HU API.postman_collection.json

184 lines
3.5 KiB
JSON

{
"info": {
"_postman_id": "ca7d06a8-ff57-4c17-bfb0-b7fd504dcf40",
"name": "2HU API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "PlayerData",
"item": [
{
"name": "Get Test User",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"method\": \"get\",\n \"ids\": {\n \"0\": \"123\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BaseURL}}PlayerData",
"host": [
"{{BaseURL}}PlayerData"
]
}
},
"response": []
},
{
"name": "Save Test Card Group",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"method\": \"save_card_group\",\n \"steamid\": \"123\",\n \"group_key\": \"1\",\n \"group_data\": \"test\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BaseURL}}PlayerData",
"host": [
"{{BaseURL}}PlayerData"
]
}
},
"response": []
}
]
},
{
"name": "GameConfig",
"item": [
{
"name": "Get Gameconfig",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BaseURL}}GameConfig",
"host": [
"{{BaseURL}}GameConfig"
]
}
},
"response": []
}
]
},
{
"name": "PlayerBaseData",
"item": [
{
"name": "PlayerBaseData",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BaseURL}}PlayerBaseData?id=123",
"host": [
"{{BaseURL}}PlayerBaseData"
],
"query": [
{
"key": "id",
"value": "123"
}
]
}
},
"response": []
}
]
},
{
"name": "RankData",
"item": [
{
"name": "Get",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BaseURL}}RankData?rank_type=all",
"host": [
"{{BaseURL}}RankData"
],
"query": [
{
"key": "rank_type",
"value": "all"
}
]
}
},
"response": []
},
{
"name": "Upload",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"method\": \"upload\",\n \"rank_type\": \"S\",\n \"steamid\": \"123\",\n \"userid\": \"12345\",\n \"username\": \"debug\",\n \"version\": \"S8\",\n \"wave\": 5,\n \"damage\": 5,\n \"card1\": \"debug\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BaseURL}}RankData",
"host": [
"{{BaseURL}}RankData"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"pm.test(\"Body response code is 0000\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.code).to.eql(\"0000\");",
"});"
]
}
}
],
"variable": [
{
"key": "BaseURL",
"value": "https://192.168.1.103:5001/api/"
}
]
}