import "common_base.proto";
import "common.proto";

message CSteamCharts_GetBestOfYearPages_Request {
}

message CSteamCharts_GetBestOfYearPages_Response {
	repeated .CSteamCharts_GetBestOfYearPages_Response_BestOfYearPage pages = 1;
}

message CSteamCharts_GetBestOfYearPages_Response_BestOfYearPage {
	optional string name = 1;
	optional string url_path = 2;
	repeated string banner_url = 3;
	repeated string banner_url_mobile = 4;
	optional uint32 start_date = 5;
}

message CSteamCharts_GetGamesByConcurrentPlayers_Request {
	optional .StoreBrowseContext context = 1;
	optional .StoreBrowseItemDataRequest data_request = 2;
}

message CSteamCharts_GetGamesByConcurrentPlayers_Response {
	optional uint32 last_update = 1;
	repeated .CSteamCharts_GetGamesByConcurrentPlayers_Response_MostPlayedRank ranks = 2;
}

message CSteamCharts_GetGamesByConcurrentPlayers_Response_MostPlayedRank {
	optional int32 rank = 1;
	optional uint32 appid = 2;
	optional .StoreItem item = 3;
	optional uint32 concurrent_in_game = 4;
	optional uint32 peak_in_game = 5;
}

message CSteamCharts_GetMonthTopAppReleases_Request {
	optional uint32 rtime_month = 1;
	optional bool include_dlc = 2;
	optional uint32 top_results_limit = 3;
}

message CSteamCharts_GetMonthTopAppReleases_Response {
	repeated .CTopAppNewRelease top_dlc_releases = 2;
	repeated .CTopAppNewRelease top_combined_app_and_dlc_releases = 3;
}

message CSteamCharts_GetMostPlayedGames_Request {
	optional .StoreBrowseContext context = 1;
	optional .StoreBrowseItemDataRequest data_request = 2;
}

message CSteamCharts_GetMostPlayedGames_Response {
	optional uint32 rollup_date = 1;
	repeated .CSteamCharts_GetMostPlayedGames_Response_MostPlayedRank ranks = 2;
}

message CSteamCharts_GetMostPlayedGames_Response_MostPlayedRank {
	optional int32 rank = 1;
	optional uint32 appid = 2;
	optional .StoreItem item = 3;
	optional int32 last_week_rank = 4;
	optional uint32 peak_in_game = 5;
	optional uint32 daily_active_players = 6;
}

message CSteamCharts_GetMostPlayedSteamDeckGames_Request {
	optional .StoreBrowseContext context = 1;
	optional .StoreBrowseItemDataRequest data_request = 2;
	optional int32 top_played_period = 3 [(.description) = "enum"];
	optional int32 count = 4;
}

message CSteamCharts_GetMostPlayedSteamDeckGames_Response {
	repeated .CSteamCharts_GetMostPlayedSteamDeckGames_Response_MostPlayedRank ranks = 1;
	optional int32 top_played_period = 2 [(.description) = "enum"];
}

message CSteamCharts_GetMostPlayedSteamDeckGames_Response_MostPlayedRank {
	optional int32 rank = 1;
	optional uint32 appid = 2;
	optional .StoreItem item = 3;
	optional int32 last_period_rank = 4;
}

message CSteamCharts_GetTopReleasesPages_Request {
}

message CSteamCharts_GetTopReleasesPages_Response {
	repeated .CSteamCharts_GetTopReleasesPages_Response_TopReleasesPage pages = 1;
}

message CSteamCharts_GetTopReleasesPages_Response_TopReleasesPage {
	optional string name = 1;
	optional uint32 start_of_month = 2;
	optional string url_path = 3;
	repeated .StoreItemID item_ids = 4;
}

message CSteamCharts_GetYearTopAppReleases_Request {
	optional uint32 rtime_year = 1;
	optional bool include_dlc = 2;
}

message CSteamCharts_GetYearTopAppReleases_Response {
	repeated .CTopAppNewRelease top_dlc_releases = 2;
	repeated .CTopAppNewRelease top_combined_app_and_dlc_releases = 3;
	repeated .CSteamCharts_GetYearTopAppReleases_Response_TopApps top_app_list = 4;
}

message CSteamCharts_GetYearTopAppReleases_Response_TopApps {
	optional uint32 appid = 1;
	optional int32 app_release_rank = 3 [(.description) = "enum"];
	optional int32 type = 4 [(.description) = "enum"];
}

message CTopAppNewRelease {
	optional uint32 appid = 1;
	optional uint32 rtime_release = 2;
	optional int32 app_release_rank = 3 [(.description) = "enum"];
}

service SteamCharts {
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetBestOfYearPages (.CSteamCharts_GetBestOfYearPages_Request) returns (.CSteamCharts_GetBestOfYearPages_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetGamesByConcurrentPlayers (.CSteamCharts_GetGamesByConcurrentPlayers_Request) returns (.CSteamCharts_GetGamesByConcurrentPlayers_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetMonthTopAppReleases (.CSteamCharts_GetMonthTopAppReleases_Request) returns (.CSteamCharts_GetMonthTopAppReleases_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetMostPlayedGames (.CSteamCharts_GetMostPlayedGames_Request) returns (.CSteamCharts_GetMostPlayedGames_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetMostPlayedSteamDeckGames (.CSteamCharts_GetMostPlayedSteamDeckGames_Request) returns (.CSteamCharts_GetMostPlayedSteamDeckGames_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetTopReleasesPages (.CSteamCharts_GetTopReleasesPages_Request) returns (.CSteamCharts_GetTopReleasesPages_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetYearTopAppReleases (.CSteamCharts_GetYearTopAppReleases_Request) returns (.CSteamCharts_GetYearTopAppReleases_Response);
}

