Пример #1
0

    ##587a0251-12ba-4600-86f1-0bc65b21cb57
    ##8e702b3f-50a7-437a-b825-18627375da3e


    # Call the API with explicit summoner ID
    id = lol.get_summoner_by_name('your-summoner-name')
    lol.get_games(id)


    # Or set the ID globally for all future calls

    lol.set_summoner('bruntbear')
    lol.get_summoner_stats()
    lol.get_summoner_ranked_stats()



    # Access data through dictionaries

    try:
        teams = lol.get_summoner_teams()
        for t in teams:
            print t["name"]
            for m in t["roster"]["memberList"]:
                id = m["playerId"]
                print id
                print lol.get_summoner_by_id(id)["name"]
    except RiotError, e:
        print e.error_msg