API-EZTV.it icon indicating copy to clipboard operation
API-EZTV.it copied to clipboard

Confused on API

Open adamhammes opened this issue 9 years ago • 0 comments

Taken from the readme:

# get all the seasons from Game Of Thrones
seasons = test_api.seasons()
for season in seasons:
    for episode in seasons[season]:
        # will print the magnet link of all episodes, in all seasons
        print seasons[season][episode]

What was the choice to go with above over something like:

season = tes_api.seasons()
for season in seasons:
    for episode in season:
        print episode

That is, directly iterating over the seasons/episodes instead of using indexes.

adamhammes avatar Jun 30 '16 01:06 adamhammes