Created
March 3, 2017 09:42
-
-
Save birksy89/734874e0e4e327253da27f9aced22153 to your computer and use it in GitHub Desktop.
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
public void getTeams() | |
{ | |
var json = GET("http://api.football-data.org/v1/competitions/426/teams"); | |
dynamic jsonObj = JsonConvert.DeserializeObject(json); | |
var tm = new TeamManager(); | |
foreach (var obj in jsonObj.teams) | |
{ | |
Team aTeam = new Team(); | |
aTeam.name = obj.name; | |
aTeam.code = obj.code; | |
aTeam.shortName = obj.shortName; | |
aTeam.squadMarketValue = obj.squadMarketValue; | |
aTeam.crestUrl = obj.crestUrl; | |
tm.CreateTeam(aTeam); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment