Skip to content

Instantly share code, notes, and snippets.

@Rydgel
Created June 20, 2014 14:36
Show Gist options
  • Save Rydgel/61a75f7b89967764509c to your computer and use it in GitHub Desktop.
Save Rydgel/61a75f7b89967764509c to your computer and use it in GitHub Desktop.
Print finished World Cup match results
(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