diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index 8ffeb95..a4f1567 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -1,22 +1,22 @@ ## Autogenerated by Scribe. DO NOT MODIFY. name: Rankings -description: 'APIs para visualização de rankings de jogos' +description: '' endpoints: - custom: [] httpMethods: - GET - uri: api/v1/rankings/general + uri: api/v1/rankings/weekly metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- - Ranking Geral - * Retorna o top 10 jogos baseado no período informado. + Top semanal + * Retorna o ranking dos jogos com melhor desempenho na última semana. description: '' authenticated: false deprecated: false @@ -25,20 +25,8 @@ endpoints: Accept: application/json urlParameters: [] cleanUrlParameters: [] - queryParameters: - period: - custom: [] - name: period - description: 'O período do ranking (weekly, monthly, yearly).' - required: true - example: weekly - type: string - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanQueryParameters: - period: weekly + queryParameters: [] + cleanQueryParameters: [] bodyParameters: [] cleanBodyParameters: [] fileParameters: [] @@ -46,12 +34,156 @@ endpoints: - custom: [] status: 200 - content: '[{"id":4,"name":"League of Legends","platform":"Riot Launcher","active_players":871182,"weekly_points":973,"monthly_points":1984,"yearly_points":80768,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":376396,"weekly_points":876,"monthly_points":2187,"yearly_points":35250,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":9,"name":"Fortnite","platform":"Epic Games","active_players":1114470,"weekly_points":797,"monthly_points":7803,"yearly_points":40254,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":870657,"weekly_points":604,"monthly_points":3181,"yearly_points":51833,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":10,"name":"Grand Theft Auto V","platform":"Steam","active_players":219252,"weekly_points":603,"monthly_points":8711,"yearly_points":55435,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":5,"name":"Helldivers 2","platform":"Steam","active_players":740974,"weekly_points":591,"monthly_points":7606,"yearly_points":20462,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":13,"name":"Warzone","platform":"Battle.net","active_players":1362862,"weekly_points":415,"monthly_points":1747,"yearly_points":22846,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":933732,"weekly_points":857,"monthly_points":4936,"yearly_points":44623,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":418738,"weekly_points":813,"monthly_points":6995,"yearly_points":22527,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":139569,"weekly_points":636,"monthly_points":8679,"yearly_points":12637,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '59' + x-ratelimit-remaining: '49' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: api/v1/rankings/monthly + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Top mensal + * Retorna o ranking dos jogos com melhor desempenho no último mês. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '[{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":139569,"weekly_points":636,"monthly_points":8679,"yearly_points":12637,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":418738,"weekly_points":813,"monthly_points":6995,"yearly_points":22527,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '48' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: api/v1/rankings/yearly + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Top anual + * Retorna o ranking dos jogos com melhor desempenho no último ano. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '[{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":1153799,"weekly_points":155,"monthly_points":2662,"yearly_points":99544,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '47' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: 'api/v1/rankings/history/{id}' + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Histórico de ranking + * Retorna a evolução de um jogo específico ao longo do tempo. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: + id: + custom: [] + name: id + description: 'O ID do jogo.' + required: true + example: 1 + type: integer + enumValues: [] + exampleWasSpecified: true + nullable: false + deprecated: false + cleanUrlParameters: + id: 1 + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":554},{"period":"M\u00eas Atual","points":5004},{"period":"Ano Atual","points":60724}]}' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '46' access-control-allow-origin: '*' description: null responseFields: [] @@ -67,11 +199,11 @@ endpoints: metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- - Jogos Mais Jogados + Jogos mais jogados * Retorna o top 10 jogos com base no número de jogadores ativos. description: '' authenticated: false @@ -90,12 +222,12 @@ endpoints: - custom: [] status: 200 - content: '[{"id":11,"name":"Cyberpunk 2077","platform":"Steam","active_players":1395488,"weekly_points":131,"monthly_points":8565,"yearly_points":96534,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":13,"name":"Warzone","platform":"Battle.net","active_players":1362862,"weekly_points":415,"monthly_points":1747,"yearly_points":22846,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":14,"name":"Apex Legends","platform":"Steam","active_players":1301140,"weekly_points":378,"monthly_points":7466,"yearly_points":49160,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":9,"name":"Fortnite","platform":"Epic Games","active_players":1114470,"weekly_points":797,"monthly_points":7803,"yearly_points":40254,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":1041606,"weekly_points":240,"monthly_points":4402,"yearly_points":77492,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":4,"name":"League of Legends","platform":"Riot Launcher","active_players":871182,"weekly_points":973,"monthly_points":1984,"yearly_points":80768,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":870657,"weekly_points":604,"monthly_points":3181,"yearly_points":51833,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":1153799,"weekly_points":155,"monthly_points":2662,"yearly_points":99544,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":933732,"weekly_points":857,"monthly_points":4936,"yearly_points":44623,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '58' + x-ratelimit-remaining: '45' access-control-allow-origin: '*' description: null responseFields: [] @@ -111,7 +243,7 @@ endpoints: metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- @@ -146,12 +278,12 @@ endpoints: - custom: [] status: 200 - content: '[{"id":11,"name":"Cyberpunk 2077","platform":"Steam","active_players":1395488,"weekly_points":131,"monthly_points":8565,"yearly_points":96534,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":14,"name":"Apex Legends","platform":"Steam","active_players":1301140,"weekly_points":378,"monthly_points":7466,"yearly_points":49160,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":1041606,"weekly_points":240,"monthly_points":4402,"yearly_points":77492,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":5,"name":"Helldivers 2","platform":"Steam","active_players":740974,"weekly_points":591,"monthly_points":7606,"yearly_points":20462,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":376396,"weekly_points":876,"monthly_points":2187,"yearly_points":35250,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":10,"name":"Grand Theft Auto V","platform":"Steam","active_players":219252,"weekly_points":603,"monthly_points":8711,"yearly_points":55435,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '57' + x-ratelimit-remaining: '44' access-control-allow-origin: '*' description: null responseFields: [] diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index ccc8126..76ded20 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -1,20 +1,20 @@ name: Rankings -description: 'APIs para visualização de rankings de jogos' +description: '' endpoints: - custom: [] httpMethods: - GET - uri: api/v1/rankings/general + uri: api/v1/rankings/weekly metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- - Ranking Geral - * Retorna o top 10 jogos baseado no período informado. + Top semanal + * Retorna o ranking dos jogos com melhor desempenho na última semana. description: '' authenticated: false deprecated: false @@ -23,20 +23,8 @@ endpoints: Accept: application/json urlParameters: [] cleanUrlParameters: [] - queryParameters: - period: - custom: [] - name: period - description: 'O período do ranking (weekly, monthly, yearly).' - required: true - example: weekly - type: string - enumValues: [] - exampleWasSpecified: true - nullable: false - deprecated: false - cleanQueryParameters: - period: weekly + queryParameters: [] + cleanQueryParameters: [] bodyParameters: [] cleanBodyParameters: [] fileParameters: [] @@ -44,12 +32,156 @@ endpoints: - custom: [] status: 200 - content: '[{"id":4,"name":"League of Legends","platform":"Riot Launcher","active_players":871182,"weekly_points":973,"monthly_points":1984,"yearly_points":80768,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":376396,"weekly_points":876,"monthly_points":2187,"yearly_points":35250,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":9,"name":"Fortnite","platform":"Epic Games","active_players":1114470,"weekly_points":797,"monthly_points":7803,"yearly_points":40254,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":870657,"weekly_points":604,"monthly_points":3181,"yearly_points":51833,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":10,"name":"Grand Theft Auto V","platform":"Steam","active_players":219252,"weekly_points":603,"monthly_points":8711,"yearly_points":55435,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":5,"name":"Helldivers 2","platform":"Steam","active_players":740974,"weekly_points":591,"monthly_points":7606,"yearly_points":20462,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":13,"name":"Warzone","platform":"Battle.net","active_players":1362862,"weekly_points":415,"monthly_points":1747,"yearly_points":22846,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":933732,"weekly_points":857,"monthly_points":4936,"yearly_points":44623,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":418738,"weekly_points":813,"monthly_points":6995,"yearly_points":22527,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":139569,"weekly_points":636,"monthly_points":8679,"yearly_points":12637,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '59' + x-ratelimit-remaining: '49' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: api/v1/rankings/monthly + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Top mensal + * Retorna o ranking dos jogos com melhor desempenho no último mês. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '[{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":9,"name":"Roblox","platform":"Multiplataforma","active_players":139569,"weekly_points":636,"monthly_points":8679,"yearly_points":12637,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":6,"name":"Fortnite","platform":"Epic Games","active_players":418738,"weekly_points":813,"monthly_points":6995,"yearly_points":22527,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '48' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: api/v1/rankings/yearly + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Top anual + * Retorna o ranking dos jogos com melhor desempenho no último ano. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '[{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":1153799,"weekly_points":155,"monthly_points":2662,"yearly_points":99544,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '47' + access-control-allow-origin: '*' + description: null + responseFields: [] + auth: [] + controller: null + method: null + route: null + - + custom: [] + httpMethods: + - GET + uri: 'api/v1/rankings/history/{id}' + metadata: + custom: [] + groupName: Rankings + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: |- + Histórico de ranking + * Retorna a evolução de um jogo específico ao longo do tempo. + description: '' + authenticated: false + deprecated: false + headers: + Content-Type: application/json + Accept: application/json + urlParameters: + id: + custom: [] + name: id + description: 'O ID do jogo.' + required: true + example: 1 + type: integer + enumValues: [] + exampleWasSpecified: true + nullable: false + deprecated: false + cleanUrlParameters: + id: 1 + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + custom: [] + status: 200 + content: '{"game":"Counter-Strike 2","history":[{"period":"Semana 1","points":554},{"period":"M\u00eas Atual","points":5004},{"period":"Ano Atual","points":60724}]}' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '46' access-control-allow-origin: '*' description: null responseFields: [] @@ -65,11 +197,11 @@ endpoints: metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- - Jogos Mais Jogados + Jogos mais jogados * Retorna o top 10 jogos com base no número de jogadores ativos. description: '' authenticated: false @@ -88,12 +220,12 @@ endpoints: - custom: [] status: 200 - content: '[{"id":11,"name":"Cyberpunk 2077","platform":"Steam","active_players":1395488,"weekly_points":131,"monthly_points":8565,"yearly_points":96534,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":13,"name":"Warzone","platform":"Battle.net","active_players":1362862,"weekly_points":415,"monthly_points":1747,"yearly_points":22846,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":14,"name":"Apex Legends","platform":"Steam","active_players":1301140,"weekly_points":378,"monthly_points":7466,"yearly_points":49160,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":9,"name":"Fortnite","platform":"Epic Games","active_players":1114470,"weekly_points":797,"monthly_points":7803,"yearly_points":40254,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":1041606,"weekly_points":240,"monthly_points":4402,"yearly_points":77492,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":4,"name":"League of Legends","platform":"Riot Launcher","active_players":871182,"weekly_points":973,"monthly_points":1984,"yearly_points":80768,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":870657,"weekly_points":604,"monthly_points":3181,"yearly_points":51833,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":10,"name":"League of Legends","platform":"Riot Launcher","active_players":1682586,"weekly_points":587,"monthly_points":1858,"yearly_points":56745,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":3,"name":"Valorant","platform":"Riot Launcher","active_players":1153799,"weekly_points":155,"monthly_points":2662,"yearly_points":99544,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":13,"name":"Minecraft","platform":"Multiplataforma","active_players":1058688,"weekly_points":768,"monthly_points":6013,"yearly_points":97008,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":12,"name":"Call of Duty: Warzone","platform":"Battle.net","active_players":933732,"weekly_points":857,"monthly_points":4936,"yearly_points":44623,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '58' + x-ratelimit-remaining: '45' access-control-allow-origin: '*' description: null responseFields: [] @@ -109,7 +241,7 @@ endpoints: metadata: custom: [] groupName: Rankings - groupDescription: 'APIs para visualização de rankings de jogos' + groupDescription: '' subgroup: '' subgroupDescription: '' title: |- @@ -144,12 +276,12 @@ endpoints: - custom: [] status: 200 - content: '[{"id":11,"name":"Cyberpunk 2077","platform":"Steam","active_players":1395488,"weekly_points":131,"monthly_points":8565,"yearly_points":96534,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":14,"name":"Apex Legends","platform":"Steam","active_players":1301140,"weekly_points":378,"monthly_points":7466,"yearly_points":49160,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":12,"name":"Baldur''s Gate 3","platform":"Steam","active_players":1275998,"weekly_points":915,"monthly_points":5889,"yearly_points":52943,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":1041606,"weekly_points":240,"monthly_points":4402,"yearly_points":77492,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":929392,"weekly_points":823,"monthly_points":1188,"yearly_points":81765,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":6,"name":"EA SPORTS FC 24","platform":"Steam","active_players":921786,"weekly_points":696,"monthly_points":3010,"yearly_points":87627,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":5,"name":"Helldivers 2","platform":"Steam","active_players":740974,"weekly_points":591,"monthly_points":7606,"yearly_points":20462,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":376396,"weekly_points":876,"monthly_points":2187,"yearly_points":35250,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"},{"id":10,"name":"Grand Theft Auto V","platform":"Steam","active_players":219252,"weekly_points":603,"monthly_points":8711,"yearly_points":55435,"created_at":"2026-04-14T02:35:43.000000Z","updated_at":"2026-04-14T02:35:43.000000Z"}]' + content: '[{"id":14,"name":"Cyberpunk 2077","platform":"Steam","active_players":1700019,"weekly_points":221,"monthly_points":2723,"yearly_points":56740,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":7,"name":"Grand Theft Auto V","platform":"Steam","active_players":1509381,"weekly_points":812,"monthly_points":7911,"yearly_points":17211,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":8,"name":"EA SPORTS FC 24","platform":"Steam","active_players":1075170,"weekly_points":776,"monthly_points":6337,"yearly_points":70015,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":5,"name":"Baldur''s Gate 3","platform":"Steam","active_players":847989,"weekly_points":198,"monthly_points":1404,"yearly_points":66933,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":2,"name":"Elden Ring","platform":"Steam","active_players":799796,"weekly_points":647,"monthly_points":8422,"yearly_points":76612,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":4,"name":"Helldivers 2","platform":"Steam","active_players":589021,"weekly_points":833,"monthly_points":9947,"yearly_points":78223,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":1,"name":"Counter-Strike 2","platform":"Steam","active_players":564671,"weekly_points":554,"monthly_points":5004,"yearly_points":60724,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":11,"name":"Apex Legends","platform":"Steam","active_players":558948,"weekly_points":219,"monthly_points":8214,"yearly_points":80587,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"},{"id":15,"name":"Stardew Valley","platform":"Steam","active_players":94038,"weekly_points":682,"monthly_points":5436,"yearly_points":54743,"created_at":"2026-04-18T01:47:16.000000Z","updated_at":"2026-04-18T01:47:16.000000Z"}]' headers: cache-control: 'no-cache, private' content-type: application/json x-ratelimit-limit: '60' - x-ratelimit-remaining: '57' + x-ratelimit-remaining: '44' access-control-allow-origin: '*' description: null responseFields: [] diff --git a/app/Http/Controllers/GameController.php b/app/Http/Controllers/GameController.php index 2b6d33c..7c1f25a 100644 --- a/app/Http/Controllers/GameController.php +++ b/app/Http/Controllers/GameController.php @@ -7,31 +7,41 @@ use Illuminate\Http\Request; /** * @group Rankings - * APIs para visualização de rankings de jogos */ class GameController extends Controller { /** - * Ranking Geral - * * Retorna o top 10 jogos baseado no período informado. - * @queryParam period string required O período do ranking (weekly, monthly, yearly). Example: weekly + * Top semanal + * * Retorna o ranking dos jogos com melhor desempenho na última semana. */ - public function generalRanking(Request $request) + public function weeklyRanking() { - $period = $request->query('period', 'weekly'); - $column = "{$period}_points"; - - // Validação simples - if (!in_array($period, ['weekly', 'monthly', 'yearly'])) { - return response()->json(['error' => 'Período inválido'], 400); - } - - $games = Game::orderBy($column, 'desc')->take(10)->get(); + $games = Game::orderBy('weekly_points', 'desc')->take(10)->get(); return response()->json($games); } /** - * Jogos Mais Jogados + * Top mensal + * * Retorna o ranking dos jogos com melhor desempenho no último mês. + */ + public function monthlyRanking() + { + $games = Game::orderBy('monthly_points', 'desc')->take(10)->get(); + return response()->json($games); + } + + /** + * Top anual + * * Retorna o ranking dos jogos com melhor desempenho no último ano. + */ + public function yearlyRanking() + { + $games = Game::orderBy('yearly_points', 'desc')->take(10)->get(); + return response()->json($games); + } + + /** + * Jogos mais jogados * * Retorna o top 10 jogos com base no número de jogadores ativos. */ public function mostPlayed() @@ -40,6 +50,23 @@ class GameController extends Controller return response()->json($games); } + /** + * Histórico de ranking + * * Retorna a evolução de um jogo específico ao longo do tempo. + * @urlParam id int required O ID do jogo. Example: 1 + */ + public function history($id) + { + $game = Game::findOrFail($id); + return response()->json([ + 'game' => $game->name, + 'history' => [ + ['period' => 'Semana 1', 'points' => $game->weekly_points], + ['period' => 'Mês Atual', 'points' => $game->monthly_points], + ['period' => 'Ano Atual', 'points' => $game->yearly_points], + ] + ]); + } /** * Ranking por Plataforma * * Retorna os jogos mais bem ranqueados de uma plataforma específica. diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 6f61457..8791e95 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -// use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; +use App\Models\Game; // Certifique-se de que o model Game está sendo importado class DatabaseSeeder extends Seeder { @@ -11,34 +11,34 @@ class DatabaseSeeder extends Seeder * Seed the application's database. */ public function run(): void -{ - $games = [ - ['name' => 'Counter-Strike 2', 'platform' => 'Steam'], - ['name' => 'Elden Ring', 'platform' => 'Steam'], - ['name' => 'Valorant', 'platform' => 'Riot Launcher'], - ['name' => 'League of Legends', 'platform' => 'Riot Launcher'], - ['name' => 'Helldivers 2', 'platform' => 'Steam'], - ['name' => 'EA SPORTS FC 24', 'platform' => 'Steam'], - ['name' => 'Roblox', 'platform' => 'Multiplataforma'], - ['name' => 'Minecraft', 'platform' => 'Multiplataforma'], - ['name' => 'Fortnite', 'platform' => 'Epic Games'], - ['name' => 'Grand Theft Auto V', 'platform' => 'Steam'], - ['name' => 'Cyberpunk 2077', 'platform' => 'Steam'], - ['name' => 'Baldur\'s Gate 3', 'platform' => 'Steam'], - ['name' => 'Warzone', 'platform' => 'Battle.net'], - ['name' => 'Apex Legends', 'platform' => 'Steam'], - ['name' => 'Stardew Valley', 'platform' => 'Steam'], - ]; + { + $jogosAtuais = [ + ['name' => 'Counter-Strike 2', 'platform' => 'Steam'], + ['name' => 'Elden Ring', 'platform' => 'Steam'], + ['name' => 'Valorant', 'platform' => 'Riot Launcher'], + ['name' => 'Helldivers 2', 'platform' => 'Steam'], + ['name' => 'Baldur\'s Gate 3', 'platform' => 'Steam'], + ['name' => 'Fortnite', 'platform' => 'Epic Games'], + ['name' => 'Grand Theft Auto V', 'platform' => 'Steam'], + ['name' => 'EA SPORTS FC 24', 'platform' => 'Steam'], + ['name' => 'Roblox', 'platform' => 'Multiplataforma'], + ['name' => 'League of Legends', 'platform' => 'Riot Launcher'], + ['name' => 'Apex Legends', 'platform' => 'Steam'], + ['name' => 'Call of Duty: Warzone', 'platform' => 'Battle.net'], + ['name' => 'Minecraft', 'platform' => 'Multiplataforma'], + ['name' => 'Cyberpunk 2077', 'platform' => 'Steam'], + ['name' => 'Stardew Valley', 'platform' => 'Steam'], + ]; - foreach ($games as $game) { - \App\Models\Game::create([ - 'name' => $game['name'], - 'platform' => $game['platform'], - 'active_players' => fake()->numberBetween(50000, 1500000), - 'weekly_points' => fake()->numberBetween(100, 1000), - 'monthly_points' => fake()->numberBetween(1000, 10000), - 'yearly_points' => fake()->numberBetween(10000, 100000), - ]); + foreach ($jogosAtuais as $jogo) { + Game::create([ + 'name' => $jogo['name'], + 'platform' => $jogo['platform'], + 'active_players' => fake()->numberBetween(50000, 1800000), // Jogadores de 50k a 1.8M + 'weekly_points' => fake()->numberBetween(100, 1000), + 'monthly_points' => fake()->numberBetween(1000, 10000), + 'yearly_points' => fake()->numberBetween(10000, 100000), + ]); + } } -} -} +} \ No newline at end of file diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php index 2dcacf7..aa19a11 100644 --- a/resources/views/scribe/index.blade.php +++ b/resources/views/scribe/index.blade.php @@ -71,12 +71,24 @@ Rankings @@ -115,38 +127,32 @@ You can switch the language used with the tabs at the top right (or from the nav

Rankings

-

APIs para visualização de rankings de jogos

+ -

Ranking Geral -* Retorna o top 10 jogos baseado no período informado.

+

Top semanal +* Retorna o ranking dos jogos com melhor desempenho na última semana.

- +
Example request:
curl --request GET \
-    --get "http://localhost/api/v1/rankings/general?period=weekly" \
+    --get "http://localhost/api/v1/rankings/weekly" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
const url = new URL(
-    "http://localhost/api/v1/rankings/general"
+    "http://localhost/api/v1/rankings/weekly"
 );
 
-const params = {
-    "period": "weekly",
-};
-Object.keys(params)
-    .forEach(key => url.searchParams.append(key, params[key]));
-
 const headers = {
     "Content-Type": "application/json",
     "Accept": "application/json",
@@ -160,7 +166,7 @@ fetch(url, {
 
 
 
-
+
             

Example response (200):

@@ -171,161 +177,161 @@ fetch(url, {
cache-control: no-cache, private
 content-type: application/json
 x-ratelimit-limit: 60
-x-ratelimit-remaining: 59
+x-ratelimit-remaining: 49
 access-control-allow-origin: *
  
 
 [
     {
-        "id": 4,
-        "name": "League of Legends",
-        "platform": "Riot Launcher",
-        "active_players": 871182,
-        "weekly_points": 973,
-        "monthly_points": 1984,
-        "yearly_points": 80768,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "id": 12,
+        "name": "Call of Duty: Warzone",
+        "platform": "Battle.net",
+        "active_players": 933732,
+        "weekly_points": 857,
+        "monthly_points": 4936,
+        "yearly_points": 44623,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 12,
-        "name": "Baldur's Gate 3",
+        "id": 4,
+        "name": "Helldivers 2",
         "platform": "Steam",
-        "active_players": 1275998,
-        "weekly_points": 915,
-        "monthly_points": 5889,
-        "yearly_points": 52943,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 589021,
+        "weekly_points": 833,
+        "monthly_points": 9947,
+        "yearly_points": 78223,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 6,
+        "name": "Fortnite",
+        "platform": "Epic Games",
+        "active_players": 418738,
+        "weekly_points": 813,
+        "monthly_points": 6995,
+        "yearly_points": 22527,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 7,
+        "name": "Grand Theft Auto V",
+        "platform": "Steam",
+        "active_players": 1509381,
+        "weekly_points": 812,
+        "monthly_points": 7911,
+        "yearly_points": 17211,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 8,
+        "name": "EA SPORTS FC 24",
+        "platform": "Steam",
+        "active_players": 1075170,
+        "weekly_points": 776,
+        "monthly_points": 6337,
+        "yearly_points": 70015,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 13,
+        "name": "Minecraft",
+        "platform": "Multiplataforma",
+        "active_players": 1058688,
+        "weekly_points": 768,
+        "monthly_points": 6013,
+        "yearly_points": 97008,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 15,
         "name": "Stardew Valley",
         "platform": "Steam",
-        "active_players": 376396,
-        "weekly_points": 876,
-        "monthly_points": 2187,
-        "yearly_points": 35250,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 94038,
+        "weekly_points": 682,
+        "monthly_points": 5436,
+        "yearly_points": 54743,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 1,
-        "name": "Counter-Strike 2",
+        "id": 2,
+        "name": "Elden Ring",
         "platform": "Steam",
-        "active_players": 929392,
-        "weekly_points": 823,
-        "monthly_points": 1188,
-        "yearly_points": 81765,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 799796,
+        "weekly_points": 647,
+        "monthly_points": 8422,
+        "yearly_points": 76612,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 9,
-        "name": "Fortnite",
-        "platform": "Epic Games",
-        "active_players": 1114470,
-        "weekly_points": 797,
-        "monthly_points": 7803,
-        "yearly_points": 40254,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 6,
-        "name": "EA SPORTS FC 24",
-        "platform": "Steam",
-        "active_players": 921786,
-        "weekly_points": 696,
-        "monthly_points": 3010,
-        "yearly_points": 87627,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 3,
-        "name": "Valorant",
-        "platform": "Riot Launcher",
-        "active_players": 870657,
-        "weekly_points": 604,
-        "monthly_points": 3181,
-        "yearly_points": 51833,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "name": "Roblox",
+        "platform": "Multiplataforma",
+        "active_players": 139569,
+        "weekly_points": 636,
+        "monthly_points": 8679,
+        "yearly_points": 12637,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 10,
-        "name": "Grand Theft Auto V",
-        "platform": "Steam",
-        "active_players": 219252,
-        "weekly_points": 603,
-        "monthly_points": 8711,
-        "yearly_points": 55435,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 5,
-        "name": "Helldivers 2",
-        "platform": "Steam",
-        "active_players": 740974,
-        "weekly_points": 591,
-        "monthly_points": 7606,
-        "yearly_points": 20462,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 13,
-        "name": "Warzone",
-        "platform": "Battle.net",
-        "active_players": 1362862,
-        "weekly_points": 415,
-        "monthly_points": 1747,
-        "yearly_points": 22846,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "name": "League of Legends",
+        "platform": "Riot Launcher",
+        "active_players": 1682586,
+        "weekly_points": 587,
+        "monthly_points": 1858,
+        "yearly_points": 56745,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     }
 ]
  
-
   
@@ -354,28 +360,650 @@ You can check the Dev Tools console for debugging information.
   

Example: application/json

-

Query Parameters

-
- period   -string  + + +

Top mensal +* Retorna o ranking dos jogos com melhor desempenho no último mês.

+ +

+

+ + + + +
Example request:
+ + +
+
curl --request GET \
+    --get "http://localhost/api/v1/rankings/monthly" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+ + +
+
const url = new URL(
+    "http://localhost/api/v1/rankings/monthly"
+);
+
+const headers = {
+    "Content-Type": "application/json",
+    "Accept": "application/json",
+};
+
+
+fetch(url, {
+    method: "GET",
+    headers,
+}).then(response => response.json());
+ +
+ + +
+

Example response (200):

+
+
+ + Show headers + +
cache-control: no-cache, private
+content-type: application/json
+x-ratelimit-limit: 60
+x-ratelimit-remaining: 48
+access-control-allow-origin: *
+ 
+
+[
+    {
+        "id": 4,
+        "name": "Helldivers 2",
+        "platform": "Steam",
+        "active_players": 589021,
+        "weekly_points": 833,
+        "monthly_points": 9947,
+        "yearly_points": 78223,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 9,
+        "name": "Roblox",
+        "platform": "Multiplataforma",
+        "active_players": 139569,
+        "weekly_points": 636,
+        "monthly_points": 8679,
+        "yearly_points": 12637,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 2,
+        "name": "Elden Ring",
+        "platform": "Steam",
+        "active_players": 799796,
+        "weekly_points": 647,
+        "monthly_points": 8422,
+        "yearly_points": 76612,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 11,
+        "name": "Apex Legends",
+        "platform": "Steam",
+        "active_players": 558948,
+        "weekly_points": 219,
+        "monthly_points": 8214,
+        "yearly_points": 80587,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 7,
+        "name": "Grand Theft Auto V",
+        "platform": "Steam",
+        "active_players": 1509381,
+        "weekly_points": 812,
+        "monthly_points": 7911,
+        "yearly_points": 17211,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 6,
+        "name": "Fortnite",
+        "platform": "Epic Games",
+        "active_players": 418738,
+        "weekly_points": 813,
+        "monthly_points": 6995,
+        "yearly_points": 22527,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 8,
+        "name": "EA SPORTS FC 24",
+        "platform": "Steam",
+        "active_players": 1075170,
+        "weekly_points": 776,
+        "monthly_points": 6337,
+        "yearly_points": 70015,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 13,
+        "name": "Minecraft",
+        "platform": "Multiplataforma",
+        "active_players": 1058688,
+        "weekly_points": 768,
+        "monthly_points": 6013,
+        "yearly_points": 97008,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 15,
+        "name": "Stardew Valley",
+        "platform": "Steam",
+        "active_players": 94038,
+        "weekly_points": 682,
+        "monthly_points": 5436,
+        "yearly_points": 54743,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 1,
+        "name": "Counter-Strike 2",
+        "platform": "Steam",
+        "active_players": 564671,
+        "weekly_points": 554,
+        "monthly_points": 5004,
+        "yearly_points": 60724,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    }
+]
+ 
+
+ + +
+

+ Request    + +    + +

+

+ GET + api/v1/rankings/monthly +

+

Headers

+
+ Content-Type   +      + name="Content-Type" data-endpoint="GETapi-v1-rankings-monthly" + value="application/json" + data-component="header">
-

O período do ranking (weekly, monthly, yearly). Example: weekly

+

Example: application/json

-
+
+ Accept   +  +   +   + +
+

Example: application/json

+
+ -

Jogos Mais Jogados +

Top anual +* Retorna o ranking dos jogos com melhor desempenho no último ano.

+ +

+

+ + + + +
Example request:
+ + +
+
curl --request GET \
+    --get "http://localhost/api/v1/rankings/yearly" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+ + +
+
const url = new URL(
+    "http://localhost/api/v1/rankings/yearly"
+);
+
+const headers = {
+    "Content-Type": "application/json",
+    "Accept": "application/json",
+};
+
+
+fetch(url, {
+    method: "GET",
+    headers,
+}).then(response => response.json());
+ +
+ + +
+

Example response (200):

+
+
+ + Show headers + +
cache-control: no-cache, private
+content-type: application/json
+x-ratelimit-limit: 60
+x-ratelimit-remaining: 47
+access-control-allow-origin: *
+ 
+
+[
+    {
+        "id": 3,
+        "name": "Valorant",
+        "platform": "Riot Launcher",
+        "active_players": 1153799,
+        "weekly_points": 155,
+        "monthly_points": 2662,
+        "yearly_points": 99544,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 13,
+        "name": "Minecraft",
+        "platform": "Multiplataforma",
+        "active_players": 1058688,
+        "weekly_points": 768,
+        "monthly_points": 6013,
+        "yearly_points": 97008,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 11,
+        "name": "Apex Legends",
+        "platform": "Steam",
+        "active_players": 558948,
+        "weekly_points": 219,
+        "monthly_points": 8214,
+        "yearly_points": 80587,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 4,
+        "name": "Helldivers 2",
+        "platform": "Steam",
+        "active_players": 589021,
+        "weekly_points": 833,
+        "monthly_points": 9947,
+        "yearly_points": 78223,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 2,
+        "name": "Elden Ring",
+        "platform": "Steam",
+        "active_players": 799796,
+        "weekly_points": 647,
+        "monthly_points": 8422,
+        "yearly_points": 76612,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 8,
+        "name": "EA SPORTS FC 24",
+        "platform": "Steam",
+        "active_players": 1075170,
+        "weekly_points": 776,
+        "monthly_points": 6337,
+        "yearly_points": 70015,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 5,
+        "name": "Baldur's Gate 3",
+        "platform": "Steam",
+        "active_players": 847989,
+        "weekly_points": 198,
+        "monthly_points": 1404,
+        "yearly_points": 66933,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 1,
+        "name": "Counter-Strike 2",
+        "platform": "Steam",
+        "active_players": 564671,
+        "weekly_points": 554,
+        "monthly_points": 5004,
+        "yearly_points": 60724,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 10,
+        "name": "League of Legends",
+        "platform": "Riot Launcher",
+        "active_players": 1682586,
+        "weekly_points": 587,
+        "monthly_points": 1858,
+        "yearly_points": 56745,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 14,
+        "name": "Cyberpunk 2077",
+        "platform": "Steam",
+        "active_players": 1700019,
+        "weekly_points": 221,
+        "monthly_points": 2723,
+        "yearly_points": 56740,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    }
+]
+ 
+
+ + +
+

+ Request    + +    + +

+

+ GET + api/v1/rankings/yearly +

+

Headers

+
+ Content-Type   +  +   +   + +
+

Example: application/json

+
+
+ Accept   +  +   +   + +
+

Example: application/json

+
+
+ +

Histórico de ranking +* Retorna a evolução de um jogo específico ao longo do tempo.

+ +

+

+ + + + +
Example request:
+ + +
+
curl --request GET \
+    --get "http://localhost/api/v1/rankings/history/1" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+ + +
+
const url = new URL(
+    "http://localhost/api/v1/rankings/history/1"
+);
+
+const headers = {
+    "Content-Type": "application/json",
+    "Accept": "application/json",
+};
+
+
+fetch(url, {
+    method: "GET",
+    headers,
+}).then(response => response.json());
+ +
+ + +
+

Example response (200):

+
+
+ + Show headers + +
cache-control: no-cache, private
+content-type: application/json
+x-ratelimit-limit: 60
+x-ratelimit-remaining: 46
+access-control-allow-origin: *
+ 
+
+{
+    "game": "Counter-Strike 2",
+    "history": [
+        {
+            "period": "Semana 1",
+            "points": 554
+        },
+        {
+            "period": "Mês Atual",
+            "points": 5004
+        },
+        {
+            "period": "Ano Atual",
+            "points": 60724
+        }
+    ]
+}
+ 
+
+ + +
+

+ Request    + +    + +

+

+ GET + api/v1/rankings/history/{id} +

+

Headers

+
+ Content-Type   +  +   +   + +
+

Example: application/json

+
+
+ Accept   +  +   +   + +
+

Example: application/json

+
+

URL Parameters

+
+ id   +integer  +   +   + +
+

O ID do jogo. Example: 1

+
+
+ +

Jogos mais jogados * Retorna o top 10 jogos com base no número de jogadores ativos.

@@ -423,120 +1051,120 @@ fetch(url, {

cache-control: no-cache, private
 content-type: application/json
 x-ratelimit-limit: 60
-x-ratelimit-remaining: 58
+x-ratelimit-remaining: 45
 access-control-allow-origin: *
  
 
 [
     {
-        "id": 11,
+        "id": 14,
         "name": "Cyberpunk 2077",
         "platform": "Steam",
-        "active_players": 1395488,
-        "weekly_points": 131,
-        "monthly_points": 8565,
-        "yearly_points": 96534,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 1700019,
+        "weekly_points": 221,
+        "monthly_points": 2723,
+        "yearly_points": 56740,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 13,
-        "name": "Warzone",
-        "platform": "Battle.net",
-        "active_players": 1362862,
-        "weekly_points": 415,
-        "monthly_points": 1747,
-        "yearly_points": 22846,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 14,
-        "name": "Apex Legends",
-        "platform": "Steam",
-        "active_players": 1301140,
-        "weekly_points": 378,
-        "monthly_points": 7466,
-        "yearly_points": 49160,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 12,
-        "name": "Baldur's Gate 3",
-        "platform": "Steam",
-        "active_players": 1275998,
-        "weekly_points": 915,
-        "monthly_points": 5889,
-        "yearly_points": 52943,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 9,
-        "name": "Fortnite",
-        "platform": "Epic Games",
-        "active_players": 1114470,
-        "weekly_points": 797,
-        "monthly_points": 7803,
-        "yearly_points": 40254,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 2,
-        "name": "Elden Ring",
-        "platform": "Steam",
-        "active_players": 1041606,
-        "weekly_points": 240,
-        "monthly_points": 4402,
-        "yearly_points": 77492,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 1,
-        "name": "Counter-Strike 2",
-        "platform": "Steam",
-        "active_players": 929392,
-        "weekly_points": 823,
-        "monthly_points": 1188,
-        "yearly_points": 81765,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 6,
-        "name": "EA SPORTS FC 24",
-        "platform": "Steam",
-        "active_players": 921786,
-        "weekly_points": 696,
-        "monthly_points": 3010,
-        "yearly_points": 87627,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 4,
+        "id": 10,
         "name": "League of Legends",
         "platform": "Riot Launcher",
-        "active_players": 871182,
-        "weekly_points": 973,
-        "monthly_points": 1984,
-        "yearly_points": 80768,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 1682586,
+        "weekly_points": 587,
+        "monthly_points": 1858,
+        "yearly_points": 56745,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 7,
+        "name": "Grand Theft Auto V",
+        "platform": "Steam",
+        "active_players": 1509381,
+        "weekly_points": 812,
+        "monthly_points": 7911,
+        "yearly_points": 17211,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 3,
         "name": "Valorant",
         "platform": "Riot Launcher",
-        "active_players": 870657,
-        "weekly_points": 604,
-        "monthly_points": 3181,
-        "yearly_points": 51833,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 1153799,
+        "weekly_points": 155,
+        "monthly_points": 2662,
+        "yearly_points": 99544,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 8,
+        "name": "EA SPORTS FC 24",
+        "platform": "Steam",
+        "active_players": 1075170,
+        "weekly_points": 776,
+        "monthly_points": 6337,
+        "yearly_points": 70015,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 13,
+        "name": "Minecraft",
+        "platform": "Multiplataforma",
+        "active_players": 1058688,
+        "weekly_points": 768,
+        "monthly_points": 6013,
+        "yearly_points": 97008,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 12,
+        "name": "Call of Duty: Warzone",
+        "platform": "Battle.net",
+        "active_players": 933732,
+        "weekly_points": 857,
+        "monthly_points": 4936,
+        "yearly_points": 44623,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 5,
+        "name": "Baldur's Gate 3",
+        "platform": "Steam",
+        "active_players": 847989,
+        "weekly_points": 198,
+        "monthly_points": 1404,
+        "yearly_points": 66933,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 2,
+        "name": "Elden Ring",
+        "platform": "Steam",
+        "active_players": 799796,
+        "weekly_points": 647,
+        "monthly_points": 8422,
+        "yearly_points": 76612,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 4,
+        "name": "Helldivers 2",
+        "platform": "Steam",
+        "active_players": 589021,
+        "weekly_points": 833,
+        "monthly_points": 9947,
+        "yearly_points": 78223,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     }
 ]
  
@@ -662,109 +1290,109 @@ fetch(url, {
cache-control: no-cache, private
 content-type: application/json
 x-ratelimit-limit: 60
-x-ratelimit-remaining: 57
+x-ratelimit-remaining: 44
 access-control-allow-origin: *
  
 
 [
     {
-        "id": 11,
+        "id": 14,
         "name": "Cyberpunk 2077",
         "platform": "Steam",
-        "active_players": 1395488,
-        "weekly_points": 131,
-        "monthly_points": 8565,
-        "yearly_points": 96534,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 1700019,
+        "weekly_points": 221,
+        "monthly_points": 2723,
+        "yearly_points": 56740,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 14,
-        "name": "Apex Legends",
+        "id": 7,
+        "name": "Grand Theft Auto V",
         "platform": "Steam",
-        "active_players": 1301140,
-        "weekly_points": 378,
-        "monthly_points": 7466,
-        "yearly_points": 49160,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 1509381,
+        "weekly_points": 812,
+        "monthly_points": 7911,
+        "yearly_points": 17211,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 12,
+        "id": 8,
+        "name": "EA SPORTS FC 24",
+        "platform": "Steam",
+        "active_players": 1075170,
+        "weekly_points": 776,
+        "monthly_points": 6337,
+        "yearly_points": 70015,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 5,
         "name": "Baldur's Gate 3",
         "platform": "Steam",
-        "active_players": 1275998,
-        "weekly_points": 915,
-        "monthly_points": 5889,
-        "yearly_points": 52943,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 847989,
+        "weekly_points": 198,
+        "monthly_points": 1404,
+        "yearly_points": 66933,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 2,
         "name": "Elden Ring",
         "platform": "Steam",
-        "active_players": 1041606,
-        "weekly_points": 240,
-        "monthly_points": 4402,
-        "yearly_points": 77492,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 799796,
+        "weekly_points": 647,
+        "monthly_points": 8422,
+        "yearly_points": 76612,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
+    },
+    {
+        "id": 4,
+        "name": "Helldivers 2",
+        "platform": "Steam",
+        "active_players": 589021,
+        "weekly_points": 833,
+        "monthly_points": 9947,
+        "yearly_points": 78223,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 1,
         "name": "Counter-Strike 2",
         "platform": "Steam",
-        "active_players": 929392,
-        "weekly_points": 823,
-        "monthly_points": 1188,
-        "yearly_points": 81765,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 564671,
+        "weekly_points": 554,
+        "monthly_points": 5004,
+        "yearly_points": 60724,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
-        "id": 6,
-        "name": "EA SPORTS FC 24",
+        "id": 11,
+        "name": "Apex Legends",
         "platform": "Steam",
-        "active_players": 921786,
-        "weekly_points": 696,
-        "monthly_points": 3010,
-        "yearly_points": 87627,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 5,
-        "name": "Helldivers 2",
-        "platform": "Steam",
-        "active_players": 740974,
-        "weekly_points": 591,
-        "monthly_points": 7606,
-        "yearly_points": 20462,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 558948,
+        "weekly_points": 219,
+        "monthly_points": 8214,
+        "yearly_points": 80587,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     },
     {
         "id": 15,
         "name": "Stardew Valley",
         "platform": "Steam",
-        "active_players": 376396,
-        "weekly_points": 876,
-        "monthly_points": 2187,
-        "yearly_points": 35250,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
-    },
-    {
-        "id": 10,
-        "name": "Grand Theft Auto V",
-        "platform": "Steam",
-        "active_players": 219252,
-        "weekly_points": 603,
-        "monthly_points": 8711,
-        "yearly_points": 55435,
-        "created_at": "2026-04-14T02:35:43.000000Z",
-        "updated_at": "2026-04-14T02:35:43.000000Z"
+        "active_players": 94038,
+        "weekly_points": 682,
+        "monthly_points": 5436,
+        "yearly_points": 54743,
+        "created_at": "2026-04-18T01:47:16.000000Z",
+        "updated_at": "2026-04-18T01:47:16.000000Z"
     }
 ]
  
diff --git a/routes/api.php b/routes/api.php index 2a1e14e..530b854 100644 --- a/routes/api.php +++ b/routes/api.php @@ -14,8 +14,12 @@ use App\Http\Controllers\GameController; | */ Route::prefix('v1')->group(function () { - Route::get('/rankings/general', [GameController::class, 'generalRanking']); + Route::get('/rankings/weekly', [GameController::class, 'weeklyRanking']); + Route::get('/rankings/monthly', [GameController::class, 'monthlyRanking']); + Route::get('/rankings/yearly', [GameController::class, 'yearlyRanking']); + Route::get('/rankings/history/{id}', [GameController::class, 'history']); Route::get('/games/most-played', [GameController::class, 'mostPlayed']); + Route::get('/rankings/platforms/{platform}', [GameController::class, 'platformRanking']); });