Add ex_aws
This commit is contained in:
@@ -2,3 +2,5 @@ import Config
|
||||
|
||||
config :scrapper,
|
||||
riot_api_key: System.get_env("RIOT_API_KEY")
|
||||
|
||||
import_config "#{config_env()}.exs"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import Config
|
||||
|
||||
import_config("libs/ex_aws_dev.exs")
|
||||
@@ -0,0 +1,8 @@
|
||||
import Config
|
||||
|
||||
config :ex_aws, :s3,
|
||||
scheme: "http://",
|
||||
host: System.get_env("EX_AWS_HOST"),
|
||||
port: System.get_env("EX_AWS_PORT"),
|
||||
access_key_id: System.get_env("EX_AWS_ACCESS_KEY"),
|
||||
secret_access_key: System.get_env("EX_AWS_SECRET_KEY")
|
||||
@@ -0,0 +1,4 @@
|
||||
defmodule Scrapper.Data.Storage.MatchStorage do
|
||||
@callback get_match(String.t()) :: {:ok, Scrapper.Data.Match.t()} | {:error, :not_found}
|
||||
@callback save_match(String.t(), Scrapper.Data.Match.t()) :: :ok
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
defmodule Scrapper.Data.Storage.S3MatchStorage do
|
||||
@behaviour Scrapper.Data.Storage.MatchStorage
|
||||
|
||||
def get_match(match_id) do
|
||||
""
|
||||
end
|
||||
|
||||
def store_match(match_id, match_data) do
|
||||
:ok
|
||||
end
|
||||
end
|
||||
@@ -27,7 +27,11 @@ defmodule Scrapper.MixProject do
|
||||
defp deps do
|
||||
[
|
||||
{:httpoison, "~> 2.2"},
|
||||
{:poison, "~> 5.0"}
|
||||
{:poison, "~> 5.0"},
|
||||
{:ex_aws, "~> 2.1"},
|
||||
{:ex_aws_s3, "~> 2.0"},
|
||||
{:hackney, "~> 1.9"},
|
||||
{:sweet_xml, "~> 0.6"}
|
||||
# {:dep_from_hexpm, "~> 0.3.0"},
|
||||
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
|
||||
# {:sibling_app_in_umbrella, in_umbrella: true}
|
||||
|
||||
Reference in New Issue
Block a user