bernie2436
bernie2436

Reputation: 23921

How do I look up my teamID for a call to the ESPN API?

I'm a Louisiana-based iOS noob looking to learn by building a simple New Orleans Saints news feed app. I want to pull data from the free ESPN API. It seems like the syntax for the API call is:

/sports/:sportName/:leagueAbbrev/teams/:teamId/news

How do I look up the parameters for this call? How do I find out the :teamID for the Saints?

Upvotes: 0

Views: 1125

Answers (1)

bernie2436
bernie2436

Reputation: 23921

I did an API call to api.espn.com/v1/sports/football/nfl/teams and scrolled thru the output until I found the saints. Then I found the ID for the saints = 18. So the call is api.espn.com/v1/sports/football/nfl/teams/18/news

Upvotes: 1

Related Questions