PowerShell your world cup

June 17, 2013

Table of Contents

PowerShell This is something that is very exciting and if you are interested you should try it. I found the post and tried it. Here is a function and how you use them.

  • Go to the kimono website and sign up for an account(http: //www.kimonolabs.com/signup)

This will get you an APIKey. Click your name once after you have logged in and then select your account.

  • Copy the API key and paste it below in the script and enjoy!

The Functions



Function Get-WorldCupPlayer ($Country) {

    If ($Country) {

        $TeamID = (Get-WorldCupTeam -Country $Country).id

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/players?teamId=$($TeamID)&apikey=$($ApiKey)”) | ConvertFrom-Json

    } Else {

        Invoke-WebRequest -Uri “http://worldcup.kimonolabs.com/api/players?apikey=$($ApiKey)” | ConvertFrom-Json



Function Get-WorldCupTeam ($Country, $TeamID) {

    If ($Country) {

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?name=$($Country)&apikey=$($ApiKey)”) | ConvertFrom-Json


    If ($TeamID) {

        Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?id=$($TeamID)&apikey=$($ApiKey)”) | ConvertFrom-Json



    If (!$country -and !$TeamID) {

        Invoke-WebRequest -Uri “http://worldcup.kimonolabs.com/api/teams?apikey=$($ApiKey)” | ConvertFrom-Json



Function Get-WorldCupStat {

    Invoke-WebRequest -Uri (“http://worldcup.kimonolabs.com/api/teams?sort=goalsFor,-1&apikey=$($ApiKey)”) | ConvertFrom-Json


Bring on the World Cup Fun

#Display the best team in the World Cup

Get-WorldCupTeam -Country “England”

Get-WorldCupStat | Format-Table

Get-WorldCupPlayer | Format-Table

Get-WorldCupPlayer -Country “England” | Format-Table

#Who has scored the most goals in the Netherland team so far?

Get-WorldCupPlayer -Country “Netherlands” | Foreach { $_ | Where

{ $_.goals -gt 0 } | Select firstName, lastName, goals } | sort goals –


#View the Logo of the team who is going to win

$logo = (New-Object System.Net.WebClient).DownloadFile(((Get-WorldCupTeam -Country “England”).logo), ($env:TEMP + “Logo.png”))

Invoke-Item $env:TEMPLogo.png


Share on
More posts

Dedicated Servers Quick Guide

What is a Dedicated Servers? Why bother using a dedicated server over a VPS or Shared Hosting?A dedicated server is a server 100% dedicated to your website/project or business needs.

Windows Programmes with Linux

How do I run a Windows program on Linux? You probably ran into issues with running a windows application in Linux and now you have ended up here, what you

Storage Center 5.6 Released

There is a release of the storage center 5.6 and it comes with some features and platform support currently built into storage center 6.x as well as a large number

Get 90% Discount

First 3 People gets the Bonus!
Don't Miss Out Our Big Sale

Get 0-90% On All
247Rack Services


The Sale Is Until The End Of March