diff --git a/.scribe/.filehashes b/.scribe/.filehashes index 0ecbdee..b87a744 100644 --- a/.scribe/.filehashes +++ b/.scribe/.filehashes @@ -1,4 +1,4 @@ # GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE. # Scribe uses this file to know when you change something manually in your docs. -.scribe/intro.md=dbddc2eb30e9b0489e068210bcae61f6 +.scribe/intro.md=7b0dd61cd08d5f1bff8f917a5c809588 .scribe/auth.md=8bb19ce54cd9ee69ae447231bc375761 \ No newline at end of file diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index a2cd4a3..7f47caa 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -32,20 +32,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '59' + x-ratelimit-remaining: '54' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -78,20 +78,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":242066,"weekly_points":184,"monthly_points":9278,"yearly_points":33053,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '58' + x-ratelimit-remaining: '53' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -124,90 +124,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '57' + x-ratelimit-remaining: '52' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: api/v1/rankings/history - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Histórico de ranking por query string' - description: 'Retorna a evolução de um jogo específico usando o parâmetro `id` na query string.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: [] - cleanUrlParameters: [] - queryParameters: - id: - custom: [] - name: id - description: 'O ID do jogo.' - required: true - example: 1 - type: integer - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanQueryParameters: - id: 1 - bodyParameters: - id: - custom: [] - name: id - description: 'The id of an existing record in the games table.' - required: true - example: 16 - type: integer - enumValues: [] - exampleWasSpecified: false - nullable: false - deprecated: false - cleanBodyParameters: - id: 16 - fileParameters: [] - responses: - - - custom: [] - status: 422 - content: '{"message":"The selected id is invalid.","errors":{"id":["The selected id is invalid."]}}' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '56' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -252,124 +182,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":729},{"period":"M\u00eas Atual","points":1215},{"period":"Ano Atual","points":71182}]}' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '55' + x-ratelimit-remaining: '51' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: 'api/v1/rankings/platforms/{platform}' - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Ranking por Plataforma' - description: 'Retorna os jogos mais bem ranqueados de uma plataforma específica.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: - platform: - custom: [] - name: platform - description: 'O nome da plataforma.' - required: true - example: Steam - type: string - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanUrlParameters: - platform: Steam - queryParameters: [] - cleanQueryParameters: [] - bodyParameters: [] - cleanBodyParameters: [] - fileParameters: [] - responses: - - - custom: [] - status: 200 - content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '54' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: api/v1/games - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Listar jogos' - description: 'Retorna os jogos cadastrados com seus IDs para o frontend escolher qual histórico consultar.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: [] - cleanUrlParameters: [] - queryParameters: [] - cleanQueryParameters: [] - bodyParameters: [] - cleanBodyParameters: [] - fileParameters: [] - responses: - - - custom: [] - status: 200 - content: '[{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":242066,"weekly_points":184,"monthly_points":9278,"yearly_points":33053,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '53' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -402,20 +228,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '52' + x-ratelimit-remaining: '50' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index 1c9c91b..86b2c7b 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -30,20 +30,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '59' + x-ratelimit-remaining: '54' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -76,20 +76,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":242066,"weekly_points":184,"monthly_points":9278,"yearly_points":33053,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '58' + x-ratelimit-remaining: '53' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -122,90 +122,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '57' + x-ratelimit-remaining: '52' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: api/v1/rankings/history - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Histórico de ranking por query string' - description: 'Retorna a evolução de um jogo específico usando o parâmetro `id` na query string.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: [] - cleanUrlParameters: [] - queryParameters: - id: - custom: [] - name: id - description: 'O ID do jogo.' - required: true - example: 1 - type: integer - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanQueryParameters: - id: 1 - bodyParameters: - id: - custom: [] - name: id - description: 'The id of an existing record in the games table.' - required: true - example: 16 - type: integer - enumValues: [] - exampleWasSpecified: false - nullable: false - deprecated: false - cleanBodyParameters: - id: 16 - fileParameters: [] - responses: - - - custom: [] - status: 422 - content: '{"message":"The selected id is invalid.","errors":{"id":["The selected id is invalid."]}}' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '56' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -250,124 +180,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":729},{"period":"M\u00eas Atual","points":1215},{"period":"Ano Atual","points":71182}]}' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '55' + x-ratelimit-remaining: '51' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: 'api/v1/rankings/platforms/{platform}' - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Ranking por Plataforma' - description: 'Retorna os jogos mais bem ranqueados de uma plataforma específica.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: - platform: - custom: [] - name: platform - description: 'O nome da plataforma.' - required: true - example: Steam - type: string - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanUrlParameters: - platform: Steam - queryParameters: [] - cleanQueryParameters: [] - bodyParameters: [] - cleanBodyParameters: [] - fileParameters: [] - responses: - - - custom: [] - status: 200 - content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '54' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' - controller: null - method: null - route: null - - - custom: [] - httpMethods: - - GET - uri: api/v1/games - metadata: - custom: [] - groupName: Rankings - groupDescription: '' - subgroup: '' - subgroupDescription: '' - title: 'Listar jogos' - description: 'Retorna os jogos cadastrados com seus IDs para o frontend escolher qual histórico consultar.' - authenticated: true - deprecated: false - headers: - Authorization: 'Bearer {YOUR_JWT_TOKEN}' - Content-Type: application/json - Accept: application/json - urlParameters: [] - cleanUrlParameters: [] - queryParameters: [] - cleanQueryParameters: [] - bodyParameters: [] - cleanBodyParameters: [] - fileParameters: [] - responses: - - - custom: [] - status: 200 - content: '[{"id":11,"name":"Apex Legends","platform":"Steam","active_players":218457,"weekly_points":945,"monthly_points":8776,"yearly_points":56526,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":243114,"weekly_points":877,"monthly_points":2426,"yearly_points":36655,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":262363,"weekly_points":199,"monthly_points":2257,"yearly_points":62350,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":217823,"weekly_points":617,"monthly_points":5232,"yearly_points":24531,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":242066,"weekly_points":184,"monthly_points":9278,"yearly_points":33053,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' - headers: - cache-control: 'no-cache, private' - content-type: application/json - x-ratelimit-limit: '60' - x-ratelimit-remaining: '53' - access-control-allow-origin: '*' - description: null - responseFields: [] - auth: - - headers - - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null @@ -400,20 +226,20 @@ endpoints: responses: - custom: [] - status: 200 - content: '[{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1166370,"weekly_points":786,"monthly_points":4506,"yearly_points":21445,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1161973,"weekly_points":874,"monthly_points":4853,"yearly_points":27988,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":1117483,"weekly_points":702,"monthly_points":7545,"yearly_points":42912,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":1091171,"weekly_points":611,"monthly_points":5678,"yearly_points":96832,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":1086549,"weekly_points":729,"monthly_points":1215,"yearly_points":71182,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":991415,"weekly_points":770,"monthly_points":2080,"yearly_points":22209,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":821498,"weekly_points":241,"monthly_points":1030,"yearly_points":57266,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":715531,"weekly_points":697,"monthly_points":7369,"yearly_points":44291,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":398998,"weekly_points":872,"monthly_points":5333,"yearly_points":81468,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":296988,"weekly_points":352,"monthly_points":3595,"yearly_points":62260,"created_at":"2026-05-18T21:57:31.000000Z","updated_at":"2026-05-18T21:57:31.000000Z"}]' + status: 401 + content: '{"message":"Invalid or expired token"}' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '52' + x-ratelimit-remaining: '50' access-control-allow-origin: '*' description: null responseFields: [] auth: - headers - Authorization - - 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw' + - 'Bearer 6g43cv8PD1aE5beadkZfhV6' controller: null method: null route: null diff --git a/.scribe/intro.md b/.scribe/intro.md index 5e8db56..ecc6c50 100644 --- a/.scribe/intro.md +++ b/.scribe/intro.md @@ -6,7 +6,7 @@ Microsserviço de rankings e métricas de jogos para integração com o ecossist Base URL: http://127.0.0.1:8000 - Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados, histórico de pontuação e filtros por plataforma. + Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados e histórico de pontuação. diff --git a/README.md b/README.md index d38ca51..ea12e9b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ O projeto contém apenas o backend da API. A interface visual do usuário final * Fornecer ranking semanal, mensal e anual de jogos * Listar os jogos mais jogados * Consultar histórico de pontuação de um jogo -* Filtrar rankings por plataforma * Retornar dados estatísticos em formato JSON * Proteger as rotas da API usando JWT * Disponibilizar documentação interativa com Scribe @@ -197,19 +196,13 @@ Gere a documentação: php artisan scribe:generate ``` -Acesse: +Para deploy, as rotas públicas do Scribe ficam desabilitadas para que a API exponha somente os endpoints de consumo. Os arquivos gerados ficam disponíveis no projeto: -```text -http://localhost:8000/docs -``` - -Links auxiliares: - -| Recurso | URL | -| ------- | --- | -| Documentação interativa | `http://localhost:8000/docs` | -| Collection Postman | `http://localhost:8000/docs.postman` | -| OpenAPI | `http://localhost:8000/docs.openapi` | +| Recurso | Caminho | +| ------- | ------- | +| Documentação HTML | `resources/views/scribe/index.blade.php` | +| Collection Postman | `storage/app/scribe/collection.json` | +| OpenAPI | `storage/app/scribe/openapi.yaml` | --- @@ -220,14 +213,9 @@ Links auxiliares: | GET | `/api/v1/rankings/weekly` | Lista o top 10 jogos por pontuação semanal | JWT | | GET | `/api/v1/rankings/monthly` | Lista o top 10 jogos por pontuação mensal | JWT | | GET | `/api/v1/rankings/yearly` | Lista o top 10 jogos por pontuação anual | JWT | -| GET | `/api/v1/rankings/history?id={id}` | Retorna o histórico de pontuação usando query string | JWT | | GET | `/api/v1/rankings/history/{id}` | Retorna o histórico de pontuação de um jogo | JWT | -| GET | `/api/v1/rankings/platforms/{platform}` | Lista jogos filtrados por plataforma | JWT | -| GET | `/api/v1/games` | Lista os jogos cadastrados com seus IDs | JWT | | GET | `/api/v1/games/most-played` | Lista o top 10 jogos por jogadores ativos | JWT | -Existe também a rota técnica `GET /api/test-auth`, usada apenas para validar o token JWT. Ela não faz parte da documentação pública principal. - --- ## Exemplos de Requisição @@ -241,15 +229,6 @@ Accept: application/json Authorization: Bearer SEU_TOKEN_JWT ``` -Ranking por plataforma: - -```http -GET /api/v1/rankings/platforms/Steam HTTP/1.1 -Host: localhost:8000 -Accept: application/json -Authorization: Bearer SEU_TOKEN_JWT -``` - Histórico de um jogo: ```http @@ -259,19 +238,10 @@ Accept: application/json Authorization: Bearer SEU_TOKEN_JWT ``` -Histórico de um jogo usando query string: +Jogos mais jogados: ```http -GET /api/v1/rankings/history?id=1 HTTP/1.1 -Host: localhost:8000 -Accept: application/json -Authorization: Bearer SEU_TOKEN_JWT -``` - -Listar jogos para o frontend escolher o ID: - -```http -GET /api/v1/games HTTP/1.1 +GET /api/v1/games/most-played HTTP/1.1 Host: localhost:8000 Accept: application/json Authorization: Bearer SEU_TOKEN_JWT @@ -306,11 +276,8 @@ Authorization: Bearer SEU_TOKEN_JWT | 200 | Requisição autenticada com sucesso | Lista de jogos ou histórico | | 401 | Token ausente, inválido ou expirado | `{"message":"Missing Authorization header"}` | | 404 | Jogo inexistente em `/rankings/history/{id}` | Resposta padrão do Laravel para model não encontrado | -| 422 | ID ausente ou inválido em `/rankings/history?id={id}` | Erro de validação | | 500 | Erro inesperado no servidor | Falha interna | -Observação: quando uma plataforma não possui jogos, `/api/v1/rankings/platforms/{platform}` retorna `200` com lista vazia. - --- ## Testes @@ -327,8 +294,6 @@ Os testes cobrem: * ranking semanal, mensal e anual * jogos mais jogados * histórico por jogo -* filtro por plataforma -* rota técnica de teste de autenticação * correspondência entre OpenAPI/Scribe e rotas públicas da API --- diff --git a/app/Http/Controllers/GameController.php b/app/Http/Controllers/GameController.php index ecd266c..fe023cf 100644 --- a/app/Http/Controllers/GameController.php +++ b/app/Http/Controllers/GameController.php @@ -3,24 +3,12 @@ namespace App\Http\Controllers; use App\Models\Game; -use Illuminate\Http\Request; /** * @group Rankings */ class GameController extends Controller { - /** - * Listar jogos - * - * Retorna os jogos cadastrados com seus IDs para o frontend escolher qual histórico consultar. - */ - public function index() - { - $games = Game::orderBy('name')->get(); - return response()->json($games); - } - /** * Top semanal * @@ -85,35 +73,4 @@ class GameController extends Controller ]); } - /** - * Histórico de ranking por query string - * - * Retorna a evolução de um jogo específico usando o parâmetro `id` na query string. - * - * @queryParam id int required O ID do jogo. Example: 1 - */ - public function historyByQuery(Request $request) - { - $request->validate([ - 'id' => ['required', 'integer', 'exists:games,id'], - ]); - - return $this->history($request->integer('id')); - } - - /** - * Ranking por Plataforma - * - * Retorna os jogos mais bem ranqueados de uma plataforma específica. - * - * @urlParam platform string required O nome da plataforma. Example: Steam - */ - public function platformRanking($platform) - { - $games = Game::where('platform', $platform) - ->orderBy('active_players', 'desc') - ->get(); - - return response()->json($games); - } } diff --git a/composer.json b/composer.json index 9ce4327..832c7e1 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,7 @@ "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", - "phpunit/phpunit": "^10.1", - "spatie/laravel-ignition": "^2.0" + "phpunit/phpunit": "^10.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 5f91150..78d3d22 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "91c1807ebba70a46160d033fd7793870", + "content-hash": "aebe5262c364c90855a307eb2f8f54d9", "packages": [ { "name": "brick/math", @@ -7942,390 +7942,6 @@ ], "time": "2024-02-20T11:51:46+00:00" }, - { - "name": "spatie/backtrace", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/spatie/backtrace.git", - "reference": "8ffe78be5ed355b5009e3dd989d183433e9a5adc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/8ffe78be5ed355b5009e3dd989d183433e9a5adc", - "reference": "8ffe78be5ed355b5009e3dd989d183433e9a5adc", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "ext-json": "*", - "laravel/serializable-closure": "^1.3 || ^2.0", - "phpunit/phpunit": "^9.3 || ^11.4.3", - "spatie/phpunit-snapshot-assertions": "^4.2 || ^5.1.6", - "symfony/var-dumper": "^5.1|^6.0|^7.0|^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Backtrace\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van de Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "A better backtrace", - "homepage": "https://github.com/spatie/backtrace", - "keywords": [ - "Backtrace", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/backtrace/issues", - "source": "https://github.com/spatie/backtrace/tree/1.8.2" - }, - "funding": [ - { - "url": "https://github.com/sponsors/spatie", - "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" - } - ], - "time": "2026-03-11T13:48:28+00:00" - }, - { - "name": "spatie/error-solutions", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/spatie/error-solutions.git", - "reference": "e495d7178ca524f2dd0fe6a1d99a1e608e1c9936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/error-solutions/zipball/e495d7178ca524f2dd0fe6a1d99a1e608e1c9936", - "reference": "e495d7178ca524f2dd0fe6a1d99a1e608e1c9936", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "illuminate/broadcasting": "^10.0|^11.0|^12.0", - "illuminate/cache": "^10.0|^11.0|^12.0", - "illuminate/support": "^10.0|^11.0|^12.0", - "livewire/livewire": "^2.11|^3.5.20", - "openai-php/client": "^0.10.1", - "orchestra/testbench": "8.22.3|^9.0|^10.0", - "pestphp/pest": "^2.20|^3.0", - "phpstan/phpstan": "^2.1", - "psr/simple-cache": "^3.0", - "psr/simple-cache-implementation": "^3.0", - "spatie/ray": "^1.28", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "simple-cache-implementation": "To cache solutions from OpenAI" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Ignition\\": "legacy/ignition", - "Spatie\\ErrorSolutions\\": "src", - "Spatie\\LaravelIgnition\\": "legacy/laravel-ignition" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ruben Van Assche", - "email": "ruben@spatie.be", - "role": "Developer" - } - ], - "description": "This is my package error-solutions", - "homepage": "https://github.com/spatie/error-solutions", - "keywords": [ - "error-solutions", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/error-solutions/issues", - "source": "https://github.com/spatie/error-solutions/tree/1.1.3" - }, - "funding": [ - { - "url": "https://github.com/Spatie", - "type": "github" - } - ], - "time": "2025-02-14T12:29:50+00:00" - }, - { - "name": "spatie/flare-client-php", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/flare-client-php.git", - "reference": "fb3ffb946675dba811fbde9122224db2f84daca9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/fb3ffb946675dba811fbde9122224db2f84daca9", - "reference": "fb3ffb946675dba811fbde9122224db2f84daca9", - "shasum": "" - }, - "require": { - "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0|^12.0|^13.0", - "php": "^8.0", - "spatie/backtrace": "^1.6.1", - "symfony/http-foundation": "^5.2|^6.0|^7.0|^8.0", - "symfony/mime": "^5.2|^6.0|^7.0|^8.0", - "symfony/process": "^5.2|^6.0|^7.0|^8.0", - "symfony/var-dumper": "^5.2|^6.0|^7.0|^8.0" - }, - "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.5.0", - "pestphp/pest": "^1.20|^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/pest-plugin-snapshots": "^1.0|^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.3.x-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\FlareClient\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/spatie/flare-client-php", - "keywords": [ - "exception", - "flare", - "reporting", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.11.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2026-03-17T08:06:16+00:00" - }, - { - "name": "spatie/ignition", - "version": "1.16.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/ignition.git", - "reference": "b59385bb7aa24dae81bcc15850ebecfda7b40838" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/b59385bb7aa24dae81bcc15850ebecfda7b40838", - "reference": "b59385bb7aa24dae81bcc15850ebecfda7b40838", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^8.0", - "spatie/backtrace": "^1.7.1", - "spatie/error-solutions": "^1.1.2", - "spatie/flare-client-php": "^1.9", - "symfony/console": "^5.4.42|^6.0|^7.0|^8.0", - "symfony/http-foundation": "^5.4.42|^6.0|^7.0|^8.0", - "symfony/mime": "^5.4.42|^6.0|^7.0|^8.0", - "symfony/var-dumper": "^5.4.42|^6.0|^7.0|^8.0" - }, - "require-dev": { - "illuminate/cache": "^9.52|^10.0|^11.0|^12.0|^13.0", - "mockery/mockery": "^1.4", - "pestphp/pest": "^1.20|^2.0|^3.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "psr/simple-cache-implementation": "*", - "symfony/cache": "^5.4.38|^6.0|^7.0|^8.0", - "symfony/process": "^5.4.35|^6.0|^7.0|^8.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "simple-cache-implementation": "To cache solutions from OpenAI" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Spatie\\Ignition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Spatie", - "email": "info@spatie.be", - "role": "Developer" - } - ], - "description": "A beautiful error page for PHP applications.", - "homepage": "https://flareapp.io/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/spatie/ignition/issues", - "source": "https://github.com/spatie/ignition" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2026-03-17T10:51:08+00:00" - }, - { - "name": "spatie/laravel-ignition", - "version": "2.9.1", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "1baee07216d6748ebd3a65ba97381b051838707a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/1baee07216d6748ebd3a65ba97381b051838707a", - "reference": "1baee07216d6748ebd3a65ba97381b051838707a", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/support": "^10.0|^11.0|^12.0", - "php": "^8.1", - "spatie/ignition": "^1.15", - "symfony/console": "^6.2.3|^7.0", - "symfony/var-dumper": "^6.2.3|^7.0" - }, - "require-dev": { - "livewire/livewire": "^2.11|^3.3.5", - "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.8.1|^0.10", - "orchestra/testbench": "8.22.3|^9.0|^10.0", - "pestphp/pest": "^2.34|^3.7", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan-deprecation-rules": "^1.1.1|^2.0", - "phpstan/phpstan-phpunit": "^1.3.16|^2.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" - }, - "providers": [ - "Spatie\\LaravelIgnition\\IgnitionServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\LaravelIgnition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Spatie", - "email": "info@spatie.be", - "role": "Developer" - } - ], - "description": "A beautiful error page for Laravel applications.", - "homepage": "https://flareapp.io/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/spatie/laravel-ignition/issues", - "source": "https://github.com/spatie/laravel-ignition" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2025-02-20T13:13:55+00:00" - }, { "name": "symfony/var-exporter", "version": "v6.4.36", diff --git a/config/cors.php b/config/cors.php index 8a39e6d..558369d 100644 --- a/config/cors.php +++ b/config/cors.php @@ -15,7 +15,7 @@ return [ | */ - 'paths' => ['api/*', 'sanctum/csrf-cookie'], + 'paths' => ['api/*'], 'allowed_methods' => ['*'], diff --git a/config/sanctum.php b/config/sanctum.php index 35d75b3..7f1f868 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -3,6 +3,7 @@ use Laravel\Sanctum\Sanctum; return [ + 'routes' => false, /* |-------------------------------------------------------------------------- diff --git a/config/scribe.php b/config/scribe.php index 73262b3..983652d 100644 --- a/config/scribe.php +++ b/config/scribe.php @@ -18,7 +18,7 @@ return [ // Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported. 'intro_text' => <<<'INTRO' - Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados, histórico de pontuação e filtros por plataforma. + Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados e histórico de pontuação. INTRO, @@ -44,10 +44,7 @@ return [ ], // Exclude these routes even if they matched the rules above. - 'exclude' => [ - 'GET api/test-auth', - 'GET api/health', - ], + 'exclude' => [], ], ], @@ -68,7 +65,7 @@ return [ 'laravel' => [ // Whether to automatically create a docs route for you to view your generated docs. You can still set up routing manually. - 'add_routes' => true, + 'add_routes' => false, // URL path to use for the docs endpoint (if `add_routes` is true). // By default, `/docs` opens the HTML page, `/docs.postman` opens the Postman collection, and `/docs.openapi` the OpenAPI spec. diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php index 4a8795b..13aa1d8 100644 --- a/resources/views/scribe/index.blade.php +++ b/resources/views/scribe/index.blade.php @@ -79,18 +79,9 @@
  • Top anual -
  • -
  • - Histórico de ranking por query string
  • Histórico de ranking -
  • -
  • - Ranking por Plataforma -
  • -
  • - Listar jogos
  • Jogos mais jogados @@ -118,7 +109,7 @@ -
    Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados, histórico de pontuação e filtros por plataforma.
    +
    Esta API expõe rankings semanais, mensais e anuais, jogos mais jogados e histórico de pontuação.
     
     <aside>Use os exemplos da documentação para demonstrar como o frontend ou outros microsserviços podem consumir os dados de ranking.</aside>
    @@ -172,7 +163,7 @@ fetch(url, {
    -

    Example response (200):

    +

    Example response (401):

    @@ -181,122 +172,13 @@ fetch(url, {
    cache-control: no-cache, private
     content-type: application/json
     x-ratelimit-limit: 60
    -x-ratelimit-remaining: 59
    +x-ratelimit-remaining: 54
     access-control-allow-origin: *
      
     
    -[
    -    {
    -        "id": 11,
    -        "name": "Apex Legends",
    -        "platform": "Steam",
    -        "active_players": 218457,
    -        "weekly_points": 945,
    -        "monthly_points": 8776,
    -        "yearly_points": 56526,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 12,
    -        "name": "Call of Duty: Warzone",
    -        "platform": "Battle.net",
    -        "active_players": 243114,
    -        "weekly_points": 877,
    -        "monthly_points": 2426,
    -        "yearly_points": 36655,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 14,
    -        "name": "Cyberpunk 2077",
    -        "platform": "Steam",
    -        "active_players": 1161973,
    -        "weekly_points": 874,
    -        "monthly_points": 4853,
    -        "yearly_points": 27988,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 8,
    -        "name": "EA SPORTS FC 24",
    -        "platform": "Steam",
    -        "active_players": 398998,
    -        "weekly_points": 872,
    -        "monthly_points": 5333,
    -        "yearly_points": 81468,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 10,
    -        "name": "League of Legends",
    -        "platform": "Riot Launcher",
    -        "active_players": 1166370,
    -        "weekly_points": 786,
    -        "monthly_points": 4506,
    -        "yearly_points": 21445,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 9,
    -        "name": "Roblox",
    -        "platform": "Multiplataforma",
    -        "active_players": 991415,
    -        "weekly_points": 770,
    -        "monthly_points": 2080,
    -        "yearly_points": 22209,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 1,
    -        "name": "Counter-Strike 2",
    -        "platform": "Steam",
    -        "active_players": 1086549,
    -        "weekly_points": 729,
    -        "monthly_points": 1215,
    -        "yearly_points": 71182,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 15,
    -        "name": "Stardew Valley",
    -        "platform": "Steam",
    -        "active_players": 1117483,
    -        "weekly_points": 702,
    -        "monthly_points": 7545,
    -        "yearly_points": 42912,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 2,
    -        "name": "Elden Ring",
    -        "platform": "Steam",
    -        "active_players": 715531,
    -        "weekly_points": 697,
    -        "monthly_points": 7369,
    -        "yearly_points": 44291,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 4,
    -        "name": "Helldivers 2",
    -        "platform": "Steam",
    -        "active_players": 217823,
    -        "weekly_points": 617,
    -        "monthly_points": 5232,
    -        "yearly_points": 24531,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    }
    -]
    +{
    +    "message": "Invalid or expired token"
    +}
      
    -

    Histórico de ranking por query string

    - -

    -requires authentication -

    - -

    Retorna a evolução de um jogo específico usando o parâmetro id na query string.

    - - -
    Example request:
    - - -
    -
    curl --request GET \
    -    --get "http://127.0.0.1:8000/api/v1/rankings/history?id=1" \
    -    --header "Authorization: Bearer {YOUR_JWT_TOKEN}" \
    -    --header "Content-Type: application/json" \
    -    --header "Accept: application/json" \
    -    --data "{
    -    \"id\": 16
    -}"
    -
    - - -
    -
    const url = new URL(
    -    "http://127.0.0.1:8000/api/v1/rankings/history"
    -);
    -
    -const params = {
    -    "id": "1",
    -};
    -Object.keys(params)
    -    .forEach(key => url.searchParams.append(key, params[key]));
    -
    -const headers = {
    -    "Authorization": "Bearer {YOUR_JWT_TOKEN}",
    -    "Content-Type": "application/json",
    -    "Accept": "application/json",
    -};
    -
    -let body = {
    -    "id": 16
    -};
    -
    -fetch(url, {
    -    method: "GET",
    -    headers,
    -    body: JSON.stringify(body),
    -}).then(response => response.json());
    - -
    - - -
    -

    Example response (422):

    -
    -
    - - Show headers - -
    cache-control: no-cache, private
    -content-type: application/json
    -x-ratelimit-limit: 60
    -x-ratelimit-remaining: 56
    -access-control-allow-origin: *
    - 
    -
    -{
    -    "message": "The selected id is invalid.",
    -    "errors": {
    -        "id": [
    -            "The selected id is invalid."
    -        ]
    -    }
    -}
    - 
    -
    - - -
    -

    - Request    - -    - -

    -

    - GET - api/v1/rankings/history -

    -

    Headers

    -
    - Authorization   -  -   -   - -
    -

    Example: Bearer {YOUR_JWT_TOKEN}

    -
    -
    - Content-Type   -  -   -   - -
    -

    Example: application/json

    -
    -
    - Accept   -  -   -   - -
    -

    Example: application/json

    -
    -

    Query Parameters

    -
    - id   -integer  -   -   - -
    -

    O ID do jogo. Example: 1

    -
    -

    Body Parameters

    -
    - id   -integer  -   -   - -
    -

    The id of an existing record in the games table. Example: 16

    -
    -
    -

    Histórico de ranking

    @@ -1120,7 +595,7 @@ fetch(url, {

    -

    Example response (200):

    +

    Example response (401):

    @@ -1129,26 +604,12 @@ fetch(url, {
    cache-control: no-cache, private
     content-type: application/json
     x-ratelimit-limit: 60
    -x-ratelimit-remaining: 55
    +x-ratelimit-remaining: 51
     access-control-allow-origin: *
      
     
     {
    -    "game": "Counter-Strike 2",
    -    "history": [
    -        {
    -            "period": "Semana 1",
    -            "points": 729
    -        },
    -        {
    -            "period": "Mês Atual",
    -            "points": 1215
    -        },
    -        {
    -            "period": "Ano Atual",
    -            "points": 71182
    -        }
    -    ]
    +    "message": "Invalid or expired token"
     }
      
    @@ -1250,569 +711,6 @@ You can check the Dev Tools console for debugging information. -

    Ranking por Plataforma

    - -

    -requires authentication -

    - -

    Retorna os jogos mais bem ranqueados de uma plataforma específica.

    - - -
    Example request:
    - - -
    -
    curl --request GET \
    -    --get "http://127.0.0.1:8000/api/v1/rankings/platforms/Steam" \
    -    --header "Authorization: Bearer {YOUR_JWT_TOKEN}" \
    -    --header "Content-Type: application/json" \
    -    --header "Accept: application/json"
    - - -
    -
    const url = new URL(
    -    "http://127.0.0.1:8000/api/v1/rankings/platforms/Steam"
    -);
    -
    -const headers = {
    -    "Authorization": "Bearer {YOUR_JWT_TOKEN}",
    -    "Content-Type": "application/json",
    -    "Accept": "application/json",
    -};
    -
    -
    -fetch(url, {
    -    method: "GET",
    -    headers,
    -}).then(response => response.json());
    - -
    - - -
    -

    Example response (200):

    -
    -
    - - Show headers - -
    cache-control: no-cache, private
    -content-type: application/json
    -x-ratelimit-limit: 60
    -x-ratelimit-remaining: 54
    -access-control-allow-origin: *
    - 
    -
    -[
    -    {
    -        "id": 14,
    -        "name": "Cyberpunk 2077",
    -        "platform": "Steam",
    -        "active_players": 1161973,
    -        "weekly_points": 874,
    -        "monthly_points": 4853,
    -        "yearly_points": 27988,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 15,
    -        "name": "Stardew Valley",
    -        "platform": "Steam",
    -        "active_players": 1117483,
    -        "weekly_points": 702,
    -        "monthly_points": 7545,
    -        "yearly_points": 42912,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 1,
    -        "name": "Counter-Strike 2",
    -        "platform": "Steam",
    -        "active_players": 1086549,
    -        "weekly_points": 729,
    -        "monthly_points": 1215,
    -        "yearly_points": 71182,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 2,
    -        "name": "Elden Ring",
    -        "platform": "Steam",
    -        "active_players": 715531,
    -        "weekly_points": 697,
    -        "monthly_points": 7369,
    -        "yearly_points": 44291,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 8,
    -        "name": "EA SPORTS FC 24",
    -        "platform": "Steam",
    -        "active_players": 398998,
    -        "weekly_points": 872,
    -        "monthly_points": 5333,
    -        "yearly_points": 81468,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 5,
    -        "name": "Baldur's Gate 3",
    -        "platform": "Steam",
    -        "active_players": 296988,
    -        "weekly_points": 352,
    -        "monthly_points": 3595,
    -        "yearly_points": 62260,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 7,
    -        "name": "Grand Theft Auto V",
    -        "platform": "Steam",
    -        "active_players": 262363,
    -        "weekly_points": 199,
    -        "monthly_points": 2257,
    -        "yearly_points": 62350,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 11,
    -        "name": "Apex Legends",
    -        "platform": "Steam",
    -        "active_players": 218457,
    -        "weekly_points": 945,
    -        "monthly_points": 8776,
    -        "yearly_points": 56526,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 4,
    -        "name": "Helldivers 2",
    -        "platform": "Steam",
    -        "active_players": 217823,
    -        "weekly_points": 617,
    -        "monthly_points": 5232,
    -        "yearly_points": 24531,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    }
    -]
    - 
    -
    - - -
    -

    - Request    - -    - -

    -

    - GET - api/v1/rankings/platforms/{platform} -

    -

    Headers

    -
    - Authorization   -  -   -   - -
    -

    Example: Bearer {YOUR_JWT_TOKEN}

    -
    -
    - Content-Type   -  -   -   - -
    -

    Example: application/json

    -
    -
    - Accept   -  -   -   - -
    -

    Example: application/json

    -
    -

    URL Parameters

    -
    - platform   -string  -   -   - -
    -

    O nome da plataforma. Example: Steam

    -
    -
    - -

    Listar jogos

    - -

    -requires authentication -

    - -

    Retorna os jogos cadastrados com seus IDs para o frontend escolher qual histórico consultar.

    - - -
    Example request:
    - - -
    -
    curl --request GET \
    -    --get "http://127.0.0.1:8000/api/v1/games" \
    -    --header "Authorization: Bearer {YOUR_JWT_TOKEN}" \
    -    --header "Content-Type: application/json" \
    -    --header "Accept: application/json"
    - - -
    -
    const url = new URL(
    -    "http://127.0.0.1:8000/api/v1/games"
    -);
    -
    -const headers = {
    -    "Authorization": "Bearer {YOUR_JWT_TOKEN}",
    -    "Content-Type": "application/json",
    -    "Accept": "application/json",
    -};
    -
    -
    -fetch(url, {
    -    method: "GET",
    -    headers,
    -}).then(response => response.json());
    - -
    - - -
    -

    Example response (200):

    -
    -
    - - Show headers - -
    cache-control: no-cache, private
    -content-type: application/json
    -x-ratelimit-limit: 60
    -x-ratelimit-remaining: 53
    -access-control-allow-origin: *
    - 
    -
    -[
    -    {
    -        "id": 11,
    -        "name": "Apex Legends",
    -        "platform": "Steam",
    -        "active_players": 218457,
    -        "weekly_points": 945,
    -        "monthly_points": 8776,
    -        "yearly_points": 56526,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 5,
    -        "name": "Baldur's Gate 3",
    -        "platform": "Steam",
    -        "active_players": 296988,
    -        "weekly_points": 352,
    -        "monthly_points": 3595,
    -        "yearly_points": 62260,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 12,
    -        "name": "Call of Duty: Warzone",
    -        "platform": "Battle.net",
    -        "active_players": 243114,
    -        "weekly_points": 877,
    -        "monthly_points": 2426,
    -        "yearly_points": 36655,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 1,
    -        "name": "Counter-Strike 2",
    -        "platform": "Steam",
    -        "active_players": 1086549,
    -        "weekly_points": 729,
    -        "monthly_points": 1215,
    -        "yearly_points": 71182,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 14,
    -        "name": "Cyberpunk 2077",
    -        "platform": "Steam",
    -        "active_players": 1161973,
    -        "weekly_points": 874,
    -        "monthly_points": 4853,
    -        "yearly_points": 27988,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 8,
    -        "name": "EA SPORTS FC 24",
    -        "platform": "Steam",
    -        "active_players": 398998,
    -        "weekly_points": 872,
    -        "monthly_points": 5333,
    -        "yearly_points": 81468,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 2,
    -        "name": "Elden Ring",
    -        "platform": "Steam",
    -        "active_players": 715531,
    -        "weekly_points": 697,
    -        "monthly_points": 7369,
    -        "yearly_points": 44291,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 6,
    -        "name": "Fortnite",
    -        "platform": "Epic Games",
    -        "active_players": 1091171,
    -        "weekly_points": 611,
    -        "monthly_points": 5678,
    -        "yearly_points": 96832,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 7,
    -        "name": "Grand Theft Auto V",
    -        "platform": "Steam",
    -        "active_players": 262363,
    -        "weekly_points": 199,
    -        "monthly_points": 2257,
    -        "yearly_points": 62350,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 4,
    -        "name": "Helldivers 2",
    -        "platform": "Steam",
    -        "active_players": 217823,
    -        "weekly_points": 617,
    -        "monthly_points": 5232,
    -        "yearly_points": 24531,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 10,
    -        "name": "League of Legends",
    -        "platform": "Riot Launcher",
    -        "active_players": 1166370,
    -        "weekly_points": 786,
    -        "monthly_points": 4506,
    -        "yearly_points": 21445,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 13,
    -        "name": "Minecraft",
    -        "platform": "Multiplataforma",
    -        "active_players": 242066,
    -        "weekly_points": 184,
    -        "monthly_points": 9278,
    -        "yearly_points": 33053,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 9,
    -        "name": "Roblox",
    -        "platform": "Multiplataforma",
    -        "active_players": 991415,
    -        "weekly_points": 770,
    -        "monthly_points": 2080,
    -        "yearly_points": 22209,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 15,
    -        "name": "Stardew Valley",
    -        "platform": "Steam",
    -        "active_players": 1117483,
    -        "weekly_points": 702,
    -        "monthly_points": 7545,
    -        "yearly_points": 42912,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 3,
    -        "name": "Valorant",
    -        "platform": "Riot Launcher",
    -        "active_players": 821498,
    -        "weekly_points": 241,
    -        "monthly_points": 1030,
    -        "yearly_points": 57266,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    }
    -]
    - 
    -
    - - -
    -

    - Request    - -    - -

    -

    - GET - api/v1/games -

    -

    Headers

    -
    - Authorization   -  -   -   - -
    -

    Example: Bearer {YOUR_JWT_TOKEN}

    -
    -
    - Content-Type   -  -   -   - -
    -

    Example: application/json

    -
    -
    - Accept   -  -   -   - -
    -

    Example: application/json

    -
    -
    -

    Jogos mais jogados

    @@ -1854,7 +752,7 @@ fetch(url, {

    -

    Example response (200):

    +

    Example response (401):

    @@ -1863,122 +761,13 @@ fetch(url, {
    cache-control: no-cache, private
     content-type: application/json
     x-ratelimit-limit: 60
    -x-ratelimit-remaining: 52
    +x-ratelimit-remaining: 50
     access-control-allow-origin: *
      
     
    -[
    -    {
    -        "id": 10,
    -        "name": "League of Legends",
    -        "platform": "Riot Launcher",
    -        "active_players": 1166370,
    -        "weekly_points": 786,
    -        "monthly_points": 4506,
    -        "yearly_points": 21445,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 14,
    -        "name": "Cyberpunk 2077",
    -        "platform": "Steam",
    -        "active_players": 1161973,
    -        "weekly_points": 874,
    -        "monthly_points": 4853,
    -        "yearly_points": 27988,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 15,
    -        "name": "Stardew Valley",
    -        "platform": "Steam",
    -        "active_players": 1117483,
    -        "weekly_points": 702,
    -        "monthly_points": 7545,
    -        "yearly_points": 42912,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 6,
    -        "name": "Fortnite",
    -        "platform": "Epic Games",
    -        "active_players": 1091171,
    -        "weekly_points": 611,
    -        "monthly_points": 5678,
    -        "yearly_points": 96832,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 1,
    -        "name": "Counter-Strike 2",
    -        "platform": "Steam",
    -        "active_players": 1086549,
    -        "weekly_points": 729,
    -        "monthly_points": 1215,
    -        "yearly_points": 71182,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 9,
    -        "name": "Roblox",
    -        "platform": "Multiplataforma",
    -        "active_players": 991415,
    -        "weekly_points": 770,
    -        "monthly_points": 2080,
    -        "yearly_points": 22209,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 3,
    -        "name": "Valorant",
    -        "platform": "Riot Launcher",
    -        "active_players": 821498,
    -        "weekly_points": 241,
    -        "monthly_points": 1030,
    -        "yearly_points": 57266,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 2,
    -        "name": "Elden Ring",
    -        "platform": "Steam",
    -        "active_players": 715531,
    -        "weekly_points": 697,
    -        "monthly_points": 7369,
    -        "yearly_points": 44291,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 8,
    -        "name": "EA SPORTS FC 24",
    -        "platform": "Steam",
    -        "active_players": 398998,
    -        "weekly_points": 872,
    -        "monthly_points": 5333,
    -        "yearly_points": 81468,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    },
    -    {
    -        "id": 5,
    -        "name": "Baldur's Gate 3",
    -        "platform": "Steam",
    -        "active_players": 296988,
    -        "weekly_points": 352,
    -        "monthly_points": 3595,
    -        "yearly_points": 62260,
    -        "created_at": "2026-05-18T21:57:31.000000Z",
    -        "updated_at": "2026-05-18T21:57:31.000000Z"
    -    }
    -]
    +{
    +    "message": "Invalid or expired token"
    +}