funcional a parte de token
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
|
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
|
||||||
# Scribe uses this file to know when you change something manually in your docs.
|
# 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
|
.scribe/auth.md=8bb19ce54cd9ee69ae447231bc375761
|
||||||
@@ -32,20 +32,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '59'
|
x-ratelimit-remaining: '54'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -78,20 +78,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '58'
|
x-ratelimit-remaining: '53'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -124,90 +124,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '57'
|
x-ratelimit-remaining: '52'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
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 <code>id</code> 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'
|
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -252,124 +182,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":729},{"period":"M\u00eas Atual","points":1215},{"period":"Ano Atual","points":71182}]}'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '55'
|
x-ratelimit-remaining: '51'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
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'
|
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -402,20 +228,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '52'
|
x-ratelimit-remaining: '50'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
|
|||||||
@@ -30,20 +30,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '59'
|
x-ratelimit-remaining: '54'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -76,20 +76,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '58'
|
x-ratelimit-remaining: '53'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -122,90 +122,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '57'
|
x-ratelimit-remaining: '52'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
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 <code>id</code> 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'
|
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -250,124 +180,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":729},{"period":"M\u00eas Atual","points":1215},{"period":"Ano Atual","points":71182}]}'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '55'
|
x-ratelimit-remaining: '51'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
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'
|
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
@@ -400,20 +226,20 @@ endpoints:
|
|||||||
responses:
|
responses:
|
||||||
-
|
-
|
||||||
custom: []
|
custom: []
|
||||||
status: 200
|
status: 401
|
||||||
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"}]'
|
content: '{"message":"Invalid or expired token"}'
|
||||||
headers:
|
headers:
|
||||||
cache-control: 'no-cache, private'
|
cache-control: 'no-cache, private'
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
x-ratelimit-limit: '60'
|
x-ratelimit-limit: '60'
|
||||||
x-ratelimit-remaining: '52'
|
x-ratelimit-remaining: '50'
|
||||||
access-control-allow-origin: '*'
|
access-control-allow-origin: '*'
|
||||||
description: null
|
description: null
|
||||||
responseFields: []
|
responseFields: []
|
||||||
auth:
|
auth:
|
||||||
- headers
|
- headers
|
||||||
- Authorization
|
- Authorization
|
||||||
- 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnYW1ldmVyc2UtYXV0aCIsImF1ZCI6InJhbmtpbmctYXBpIiwic3ViIjoiZGVtby11c2VyIiwiaWF0IjoxNzc5MTQxNTcxLCJleHAiOjE4MTA2Nzc1NzF9.aiCMcNXMs1GxvGqY5Ln87D1VJG-J2CzQ2lktqJstEzm2ogcj9M4WxI1ye2Ps3p4IHExr5IQ9KwoNn3hTgnDI5C8LiMmRa6yqdB8ZlrkZZ_eSlNxFhuAhGiCIqLsQwHony4UpxFjS1MpSuJKPyY1Z4VSulOzUExcTt0Y-G1ynq8IYnsfjqoCTP20oQGP2pb2TTbZFf4jACxctnz2oIijvgWEMAiqn72G4DJ-8nWFXZ9Yf6Of2S76MDLtWjysgFoQQYriye_Ns9ynoPjIo9igUCFyzc_AgIjh_VE0IrGW9ifkx5kOISf0b95bh7rhMuDzyvBQbFay7lIUyKMRKi_i-qw'
|
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||||
controller: null
|
controller: null
|
||||||
method: null
|
method: null
|
||||||
route: null
|
route: null
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Microsserviço de rankings e métricas de jogos para integração com o ecossist
|
|||||||
<strong>Base URL</strong>: <code>http://127.0.0.1:8000</code>
|
<strong>Base URL</strong>: <code>http://127.0.0.1:8000</code>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
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>
|
<aside>Use os exemplos da documentação para demonstrar como o frontend ou outros microsserviços podem consumir os dados de ranking.</aside>
|
||||||
|
|
||||||
|
|||||||
51
README.md
51
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
|
* Fornecer ranking semanal, mensal e anual de jogos
|
||||||
* Listar os jogos mais jogados
|
* Listar os jogos mais jogados
|
||||||
* Consultar histórico de pontuação de um jogo
|
* Consultar histórico de pontuação de um jogo
|
||||||
* Filtrar rankings por plataforma
|
|
||||||
* Retornar dados estatísticos em formato JSON
|
* Retornar dados estatísticos em formato JSON
|
||||||
* Proteger as rotas da API usando JWT
|
* Proteger as rotas da API usando JWT
|
||||||
* Disponibilizar documentação interativa com Scribe
|
* Disponibilizar documentação interativa com Scribe
|
||||||
@@ -197,19 +196,13 @@ Gere a documentação:
|
|||||||
php artisan scribe:generate
|
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
|
| Recurso | Caminho |
|
||||||
http://localhost:8000/docs
|
| ------- | ------- |
|
||||||
```
|
| Documentação HTML | `resources/views/scribe/index.blade.php` |
|
||||||
|
| Collection Postman | `storage/app/scribe/collection.json` |
|
||||||
Links auxiliares:
|
| OpenAPI | `storage/app/scribe/openapi.yaml` |
|
||||||
|
|
||||||
| Recurso | URL |
|
|
||||||
| ------- | --- |
|
|
||||||
| Documentação interativa | `http://localhost:8000/docs` |
|
|
||||||
| Collection Postman | `http://localhost:8000/docs.postman` |
|
|
||||||
| OpenAPI | `http://localhost:8000/docs.openapi` |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -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/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/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/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/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 |
|
| 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
|
## Exemplos de Requisição
|
||||||
@@ -241,15 +229,6 @@ Accept: application/json
|
|||||||
Authorization: Bearer SEU_TOKEN_JWT
|
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:
|
Histórico de um jogo:
|
||||||
|
|
||||||
```http
|
```http
|
||||||
@@ -259,19 +238,10 @@ Accept: application/json
|
|||||||
Authorization: Bearer SEU_TOKEN_JWT
|
Authorization: Bearer SEU_TOKEN_JWT
|
||||||
```
|
```
|
||||||
|
|
||||||
Histórico de um jogo usando query string:
|
Jogos mais jogados:
|
||||||
|
|
||||||
```http
|
```http
|
||||||
GET /api/v1/rankings/history?id=1 HTTP/1.1
|
GET /api/v1/games/most-played 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
|
|
||||||
Host: localhost:8000
|
Host: localhost:8000
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Authorization: Bearer SEU_TOKEN_JWT
|
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 |
|
| 200 | Requisição autenticada com sucesso | Lista de jogos ou histórico |
|
||||||
| 401 | Token ausente, inválido ou expirado | `{"message":"Missing Authorization header"}` |
|
| 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 |
|
| 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 |
|
| 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
|
## Testes
|
||||||
@@ -327,8 +294,6 @@ Os testes cobrem:
|
|||||||
* ranking semanal, mensal e anual
|
* ranking semanal, mensal e anual
|
||||||
* jogos mais jogados
|
* jogos mais jogados
|
||||||
* histórico por jogo
|
* 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
|
* correspondência entre OpenAPI/Scribe e rotas públicas da API
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -3,24 +3,12 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Game;
|
use App\Models\Game;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group Rankings
|
* @group Rankings
|
||||||
*/
|
*/
|
||||||
class GameController extends Controller
|
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
|
* 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
"laravel/sail": "^1.18",
|
"laravel/sail": "^1.18",
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^7.0",
|
"nunomaduro/collision": "^7.0",
|
||||||
"phpunit/phpunit": "^10.1",
|
"phpunit/phpunit": "^10.1"
|
||||||
"spatie/laravel-ignition": "^2.0"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
386
composer.lock
generated
386
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "91c1807ebba70a46160d033fd7793870",
|
"content-hash": "aebe5262c364c90855a307eb2f8f54d9",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@@ -7942,390 +7942,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2024-02-20T11:51:46+00:00"
|
"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",
|
"name": "symfony/var-exporter",
|
||||||
"version": "v6.4.36",
|
"version": "v6.4.36",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
'paths' => ['api/*'],
|
||||||
|
|
||||||
'allowed_methods' => ['*'],
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
use Laravel\Sanctum\Sanctum;
|
use Laravel\Sanctum\Sanctum;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'routes' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ return [
|
|||||||
|
|
||||||
// Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported.
|
// Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported.
|
||||||
'intro_text' => <<<'INTRO'
|
'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.
|
||||||
|
|
||||||
<aside>Use os exemplos da documentação para demonstrar como o frontend ou outros microsserviços podem consumir os dados de ranking.</aside>
|
<aside>Use os exemplos da documentação para demonstrar como o frontend ou outros microsserviços podem consumir os dados de ranking.</aside>
|
||||||
INTRO,
|
INTRO,
|
||||||
@@ -44,10 +44,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
// Exclude these routes even if they matched the rules above.
|
// Exclude these routes even if they matched the rules above.
|
||||||
'exclude' => [
|
'exclude' => [],
|
||||||
'GET api/test-auth',
|
|
||||||
'GET api/health',
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -68,7 +65,7 @@ return [
|
|||||||
|
|
||||||
'laravel' => [
|
'laravel' => [
|
||||||
// Whether to automatically create a docs route for you to view your generated docs. You can still set up routing manually.
|
// 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).
|
// 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.
|
// By default, `/docs` opens the HTML page, `/docs.postman` opens the Postman collection, and `/docs.openapi` the OpenAPI spec.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\GameController;
|
use App\Http\Controllers\GameController;
|
||||||
|
|
||||||
@@ -16,21 +15,8 @@ Route::prefix('v1')->middleware(['jwt.auth'])->group(function () {
|
|||||||
Route::get('/rankings/weekly', [GameController::class, 'weeklyRanking']);
|
Route::get('/rankings/weekly', [GameController::class, 'weeklyRanking']);
|
||||||
Route::get('/rankings/monthly', [GameController::class, 'monthlyRanking']);
|
Route::get('/rankings/monthly', [GameController::class, 'monthlyRanking']);
|
||||||
Route::get('/rankings/yearly', [GameController::class, 'yearlyRanking']);
|
Route::get('/rankings/yearly', [GameController::class, 'yearlyRanking']);
|
||||||
Route::get('/rankings/history', [GameController::class, 'historyByQuery']);
|
|
||||||
Route::get('/rankings/history/{id}', [GameController::class, 'history']);
|
Route::get('/rankings/history/{id}', [GameController::class, 'history']);
|
||||||
Route::get('/rankings/platforms/{platform}', [GameController::class, 'platformRanking']);
|
|
||||||
|
|
||||||
// Jogos
|
// Jogos
|
||||||
Route::get('/games', [GameController::class, 'index']);
|
|
||||||
Route::get('/games/most-played', [GameController::class, 'mostPlayed']);
|
Route::get('/games/most-played', [GameController::class, 'mostPlayed']);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/health', function () {
|
|
||||||
return response()->json(['status' => 'ok']);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::middleware(['jwt.auth'])->get('/test-auth', function (Request $request) {
|
|
||||||
return response()->json([
|
|
||||||
'userId' => $request->attributes->get('auth')['id']
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -1,24 +1 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Web Routes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
|
||||||
| routes are loaded by the RouteServiceProvider and all of them will
|
|
||||||
| be assigned to the "web" middleware group. Make something great!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::get('/', function () {
|
|
||||||
return view('welcome');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::redirect('/games/most-played', '/api/v1/games/most-played');
|
|
||||||
|
|
||||||
Route::get('/health', function () {
|
|
||||||
return response('ok', 200);
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Tests\Feature;
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Yaml\Yaml;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@@ -9,10 +10,6 @@ class DocumentationRoutesTest extends TestCase
|
|||||||
{
|
{
|
||||||
public function test_openapi_documentation_matches_public_api_routes(): void
|
public function test_openapi_documentation_matches_public_api_routes(): void
|
||||||
{
|
{
|
||||||
$response = $this->get('/docs.openapi');
|
|
||||||
|
|
||||||
$response->assertOk();
|
|
||||||
|
|
||||||
$openApi = Yaml::parse(file_get_contents(storage_path('app/scribe/openapi.yaml')));
|
$openApi = Yaml::parse(file_get_contents(storage_path('app/scribe/openapi.yaml')));
|
||||||
$paths = array_keys($openApi['paths']);
|
$paths = array_keys($openApi['paths']);
|
||||||
|
|
||||||
@@ -20,14 +17,31 @@ class DocumentationRoutesTest extends TestCase
|
|||||||
'/api/v1/rankings/weekly',
|
'/api/v1/rankings/weekly',
|
||||||
'/api/v1/rankings/monthly',
|
'/api/v1/rankings/monthly',
|
||||||
'/api/v1/rankings/yearly',
|
'/api/v1/rankings/yearly',
|
||||||
'/api/v1/rankings/history',
|
|
||||||
'/api/v1/rankings/history/{id}',
|
'/api/v1/rankings/history/{id}',
|
||||||
'/api/v1/rankings/platforms/{platform}',
|
|
||||||
'/api/v1/games',
|
|
||||||
'/api/v1/games/most-played',
|
'/api/v1/games/most-played',
|
||||||
], $paths);
|
], $paths);
|
||||||
|
|
||||||
$this->assertNotContains('/api/test-auth', $paths);
|
$this->assertNotContains('/api/test-auth', $paths);
|
||||||
$this->assertNotContains('/api/health', $paths);
|
$this->assertNotContains('/api/health', $paths);
|
||||||
|
$this->assertNotContains('/api/v1/games', $paths);
|
||||||
|
$this->assertNotContains('/api/v1/rankings/platforms/{platform}', $paths);
|
||||||
|
$this->assertNotContains('/api/v1/rankings/history', $paths);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_registered_api_v1_routes_are_only_the_requested_endpoints(): void
|
||||||
|
{
|
||||||
|
$routes = collect(Route::getRoutes())
|
||||||
|
->filter(fn ($route) => str_starts_with($route->uri(), 'api/v1/'))
|
||||||
|
->map(fn ($route) => $route->uri())
|
||||||
|
->values()
|
||||||
|
->all();
|
||||||
|
|
||||||
|
$this->assertSame([
|
||||||
|
'api/v1/rankings/weekly',
|
||||||
|
'api/v1/rankings/monthly',
|
||||||
|
'api/v1/rankings/yearly',
|
||||||
|
'api/v1/rankings/history/{id}',
|
||||||
|
'api/v1/games/most-played',
|
||||||
|
], $routes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Tests\Feature;
|
|
||||||
|
|
||||||
// use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
||||||
use Tests\TestCase;
|
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* A basic test example.
|
|
||||||
*/
|
|
||||||
public function test_the_application_returns_a_successful_response(): void
|
|
||||||
{
|
|
||||||
$response = $this->get('/');
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -55,15 +55,6 @@ class GameRankingApiTest extends TestCase
|
|||||||
->assertJsonPath('9.name', 'Game 3');
|
->assertJsonPath('9.name', 'Game 3');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_games_route_returns_ids_for_frontend_selection(): void
|
|
||||||
{
|
|
||||||
$this->getJsonWithJwt('/api/v1/games')
|
|
||||||
->assertOk()
|
|
||||||
->assertJsonCount(12)
|
|
||||||
->assertJsonPath('0.id', 1)
|
|
||||||
->assertJsonPath('0.name', 'Game 1');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_history_returns_score_evolution_for_a_game(): void
|
public function test_history_returns_score_evolution_for_a_game(): void
|
||||||
{
|
{
|
||||||
$this->getJsonWithJwt('/api/v1/rankings/history/5')
|
$this->getJsonWithJwt('/api/v1/rankings/history/5')
|
||||||
@@ -77,31 +68,6 @@ class GameRankingApiTest extends TestCase
|
|||||||
->assertJsonPath('history.2.points', 50000);
|
->assertJsonPath('history.2.points', 50000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_history_can_be_requested_with_query_string_id(): void
|
|
||||||
{
|
|
||||||
$this->getJsonWithJwt('/api/v1/rankings/history?id=6')
|
|
||||||
->assertOk()
|
|
||||||
->assertJsonPath('game', 'Game 6')
|
|
||||||
->assertJsonPath('history.0.points', 600);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_platform_ranking_returns_only_requested_platform_ordered_by_active_players(): void
|
|
||||||
{
|
|
||||||
$this->getJsonWithJwt('/api/v1/rankings/platforms/Steam')
|
|
||||||
->assertOk()
|
|
||||||
->assertJsonCount(6)
|
|
||||||
->assertJsonPath('0.name', 'Game 12')
|
|
||||||
->assertJsonPath('5.name', 'Game 2')
|
|
||||||
->assertJsonMissing(['platform' => 'Riot Launcher']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_test_auth_route_returns_authenticated_subject(): void
|
|
||||||
{
|
|
||||||
$this->getJsonWithJwt('/api/test-auth')
|
|
||||||
->assertOk()
|
|
||||||
->assertJson(['userId' => 'consumer-project']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_accepts_token_with_audience_array_containing_expected_audience(): void
|
public function test_accepts_token_with_audience_array_containing_expected_audience(): void
|
||||||
{
|
{
|
||||||
$this->jwt = $this->makeJwt($this->privateKey, ['other-api', 'ranking-api']);
|
$this->jwt = $this->makeJwt($this->privateKey, ['other-api', 'ranking-api']);
|
||||||
|
|||||||
Reference in New Issue
Block a user