Created
June 20, 2014 14:36
-
-
Save Rydgel/61a75f7b89967764509c to your computer and use it in GitHub Desktop.
Print finished World Cup match results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns wc.core | |
(:require [clj-http.client :as client])) | |
(defn print-matchs-over [] | |
(let [data-request (client/get "http://worldcup.sfg.io/matches" {:as :json-strict}) | |
completed (filter #(= (:status %) "completed") (:body data-request))] | |
(doseq [{home-team :home_team away-team :away_team} completed] | |
(println (str (:country home-team) " " (:goals home-team) " x " | |
(:country away-team) " " (:goals away-team)))))) | |
(defn -main | |
[& args] | |
(print-matchs-over)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment