{"swagger":"2.0","info":{"description":"3DAT Leaderboard API","version":"1.0.0","title":"3DAT API","contact":{"email":"selim.salihovic@gmail.com"}},"tags":[{"name":"authentication","description":"API calls related to authentication"},{"name":"fetch","description":"API calls used to fetch data"}],"paths":{"/api/games":{"get":{"tags":["fetch"],"summary":"Retrieve list of all games","operationId":"games_index","produces":["application/json"],"responses":{"200":{"description":"Successful response","schema":{"type":"object","items":{},"example":[{"id":125,"name":"Rainbow Six Siege"},{"id":122,"name":"Counter Strike: Global Offensive"}]}},"401":{"description":"Unauthorized"}}}},"/api/weapons":{"get":{"tags":["fetch"],"summary":"Retrieve list of all weapons","operationId":"weapons_index","produces":["application/json"],"parameters":[{"in":"query","name":"game_id","type":"integer","required":false,"description":"The game_id to return the weapons for"}],"responses":{"200":{"description":"Successful response","schema":{"type":"object","items":{},"example":[{"id":72,"name":".44 Mag Semi-Auto"},{"id":75,"name":"Counter416-C Carbine"}]}},"401":{"description":"Unauthorized"},"404":{"description":"Game not found"}}}},"/api/leaderboard":{"get":{"tags":["fetch"],"summary":"Retrieve the leaderboard","operationId":"leaderboard_index","produces":["application/json"],"parameters":[{"in":"query","name":"game_id","type":"integer","required":false,"description":"The game_id to return the results for"},{"in":"query","name":"weapon_id","type":"integer","required":false,"description":"The weapon_id to return the results for"}],"responses":{"200":{"description":"Successful response","schema":{"type":"object","items":{},"example":[{"percentile_rank":100,"user_rank":1,"score":8999,"user":{"created_at":"2021-06-23T23:08:20.000000Z","email":"heller.cara@example.org","email_verified_at":"2021-06-23T23:07:40.000000Z","id":12009,"name":"Cielo Bayer","updated_at":"2021-06-23T23:08:20.000000Z"}},{"percentile_rank":99.99,"user_rank":1,"score":8048,"user":{"created_at":"2021-06-23T23:08:20.000000Z","email":"hcorin@example.org","email_verified_at":"2021-06-23T23:07:40.000000Z","id":18464,"name":"Edgar Powlowski","updated_at":"2021-06-23T23:08:20.000000Z"}}]}},"401":{"description":"Unauthorized"},"404":{"description":"Game or weapon not found"}}}},"/api/auth/login":{"post":{"tags":["authentication"],"summary":"Authenticate using email and password","operationId":"authenticate","description":"Returns an authentication token to be used for subsequent calls in the Authorization header","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"user","required":true,"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}}}}],"responses":{"201":{"description":"User authenticated"},"400":{"description":"Invalid request"},"404":{"description":"User not found using credentials"}}}}},"schemes":["https"],"host":"virtserver.swaggerhub.com","basePath":"/SelimSalihovic/3DAT/1.0.0"}