{"openapi":"3.1.0","info":{"title":"Wardogs player stats API","description":"This is a instance of <a href=\"https://github.com/community-network/wardogs-api\" target=\"_blank\">https://github.com/community-network/wardogs-api</a><br/>You can callback from gathering new stats from /update to your own website directly, even for failed requests with ?redirect_url=<br />This project also has a connection with a Discord bot, to get the stats visible within Discord you can use <a href=\"https://discord.com/oauth2/authorize?client_id=1550222563047637002\" target=\"_blank\">https://discord.com/oauth2/authorize?client_id=1550222563047637002</a>, it has the public repository available at <a href=\"https://github.com/community-network/wardogs-bot\" target=\"_blank\">https://github.com/community-network/wardogs-bot</a>","version":"1.0.0"},"paths":{"/update":{"get":{"summary":"Redirects to steam to update the Wardogs stats","operationId":"update_update_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","description":"Token containing the discord connection","default":"","title":"State"},"description":"Token containing the discord connection"},{"name":"redirect_url","in":"query","required":false,"schema":{"type":"string","description":"Url to return to after the process is complete, it adds \"id\" and \"steam_id\" to the url on success, and \"error\" on failure","default":"","title":"Redirect Url"},"description":"Url to return to after the process is complete, it adds \"id\" and \"steam_id\" to the url on success, and \"error\" on failure"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats":{"get":{"summary":"Get your gathered stats via your, id, steam_id or discord_id","operationId":"stats_stats_get","parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Id of the user","title":"Id"},"description":"Id of the user"},{"name":"steam_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Steam id of the user","title":"Steam Id"},"description":"Steam id of the user"},{"name":"discord_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Discord id of the user","title":"Discord Id"},"description":"Discord id of the user"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PlayerStats"},{"type":"null"}],"title":"Response Stats Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots":{"get":{"summary":"Get your previous stat snapshots via your, id, steam_id or discord_id","operationId":"snapshots_snapshots_get","parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Id of the user","title":"Id"},"description":"Id of the user"},{"name":"steam_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Steam id of the user","title":"Steam Id"},"description":"Steam id of the user"},{"name":"discord_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Discord id of the user","title":"Discord Id"},"description":"Discord id of the user"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max amount of snapshots to return","default":10,"title":"Limit"},"description":"Max amount of snapshots to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlayerStats"},"title":"Response Snapshots Snapshots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/callback":{"get":{"summary":"Handles the callback from steam, logs in to Wardogs and save the gathered stats to the database","operationId":"callback_callback_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","description":"Token containing the discord connection","default":"","title":"State"},"description":"Token containing the discord connection"},{"name":"redirect_url","in":"query","required":false,"schema":{"type":"string","description":"Url to return to after the process is complete, it adds \"id\" and \"steam_id\" to the url on success, and \"error\" on failure","default":"","title":"Redirect Url"},"description":"Url to return to after the process is complete, it adds \"id\" and \"steam_id\" to the url on success, and \"error\" on failure"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PlayerStats":{"properties":{"player_data_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Data Version"},"infantry":{"$ref":"#/components/schemas/RoleStats"},"medic":{"$ref":"#/components/schemas/RoleStats"},"recon":{"$ref":"#/components/schemas/RoleStats"},"support":{"$ref":"#/components/schemas/RoleStats"},"driver":{"$ref":"#/components/schemas/RoleStats"},"pilot":{"$ref":"#/components/schemas/RoleStats"},"cash":{"type":"integer","title":"Cash","default":0},"gold":{"type":"integer","title":"Gold","default":0},"unlocks":{"items":{"$ref":"#/components/schemas/UnlockInfo"},"type":"array","title":"Unlocks"},"wardog_level":{"type":"integer","title":"Wardog Level","description":"Current WARDOGS overall level.\n\nThe live account we tested showed that the in-game Wardog level\nmatched the sum of the six role levels.","readOnly":true}},"type":"object","required":["wardog_level"],"title":"PlayerStats"},"RoleStats":{"properties":{"level":{"type":"integer","title":"Level","default":0},"xp":{"type":"integer","title":"Xp","default":0}},"type":"object","title":"RoleStats"},"UnlockInfo":{"properties":{"node_id":{"type":"string","title":"Node Id"},"level":{"type":"integer","title":"Level"}},"type":"object","required":["node_id","level"],"title":"UnlockInfo"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}