Build StatusCoverage StatusLatest Version

ExFootball

Simple Elixir client for football-data.org API v2

Installation

If available in Hex, the package can be installed by adding ex_football to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_football, "~> 0.2.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_football.

Usage

Get all competitions

> ExFootball.fetch("api_token", "competitions")

Get upcoming matches for Premier League

> ExFootball.fetch("api_token", "competitions", "matches", [id: "PL", status: "SCHEDULED"])

Get all matches of the Champions League

> ExFootball.fetch("api_token", "competitions", "matches", [id: "CL"])

Contribution

Clone repository

> git clone https://github.com/thienlhh/ex_football.git
> cd ex_football
> mix deps.get

Create secret.exs file in the /config directory, don't forget to add this file to gitignore:

use Mix.Config

config :ex_football, api_token: "football_data_api_token"

Run test

mix test