wip analytics tables
ci / docker (push) Waiting to run

This commit is contained in:
2024-05-29 15:34:27 +02:00
parent 5ce7ce0542
commit 6053cfcdac
4 changed files with 66 additions and 2 deletions
@@ -13,8 +13,8 @@ defmodule LolAnalytics.Analyzer.ChampionAnalyzer do
@doc """
iex> LolAnalytics.Analyzer.ChampionAnalyzer.analyze(:url, "http://localhost:9000/ranked/14.9.580.2108/EUW1_6923309745.json")
"""
@spec analyze(any(), any()) :: none()
@impl true
@spec analyze(atom(), String.t()) :: :ok
def analyze(:url, path) do
data = HTTPoison.get!(path)
analyze(:data, data.body)
@@ -22,7 +22,6 @@ defmodule LolAnalytics.Analyzer.ChampionAnalyzer do
end
@impl true
@spec analyze(atom(), any()) :: list(LoLAPI.Model.Participant.t())
def analyze(:data, data) do
decoded_match = Poison.decode!(data, as: %LoLAPI.Model.MatchResponse{})
participants = decoded_match.info.participants
@@ -0,0 +1,3 @@
defmodule LolAnalytics.Facts.ChampionPlayedGame.ChampionPlayedGameRepo do
end
@@ -0,0 +1,11 @@
defmodule LolAnalytics.Facts.ChampionPlayedGame.ChampionPlayedGameSchema do
use Ecto.Schema
schema "fact_champion_played_game" do
field :champion_id, :integer
field :match_id, :integer
field :is_win, :boolean
field :game_length_seconds, :integer
field :queue_id, :integer
end
end