# Path: steamapi/getproplayerlist.py
# def requestGetProPlayerList():
#     URL = "https://api.steampowered.com/IDOTA2Fantasy_570/GetProPlayerList/v1?key=" + SteamAPIKey
# 
# Path: odotaapi/getodplayerdetails.py
# def getODPlayerDetails(playerID, q=None):
#             URL = 'https://api.opendota.com/api/players/' + str(playerID)


from steamapi import getproplayerlist
from odotaapi import getodplayerdetails
                                                                                          proPlayerDictionary[playerID]['team_name'],
                                                                                          proPlayerDictionary[playerID]['is_locked'],
                                                                                          proPlayerDictionary[playerID]['sponsor'])
        result = result.replace('|','').replace('\\','').replace('*','')
        return result

    else:
        if playerSummariesJson==None:
            result = '[DB](http://dotabuff.com/players/%s "Dotabuff: Lookup people\'s match history")/' \
                     '[OD](http://opendota.com/players/%s "OpenDota: Provides free replay analysis")/' \
                     '[STRATZ](https://stratz.com/player/%s "STRATZ: Every match, every player, every stat. Free.")' %(playerID, playerID, playerID)
        else:
            for player in playerSummariesJson['response']['players']:
                if int(player['steam32id']) == playerID:
                    try:
                        playerName = '%.12s' %player['personaname']
                    except:
                        playerName = ''
                    break

            result = '[DB](http://dotabuff.com/players/%s "Dotabuff: Lookup people\'s match history")/' \
                     '[OD](http://opendota.com/players/%s "OpenDota: Provides free replay analysis")/' \
                     '[STRATZ](https://stratz.com/player/%s "STRATZ: Every match, every player, every stat. Free.") %s' %(playerID, playerID, playerID, playerName)

            result = result.replace('|','').replace('\\','').replace('*','')
        return result


def getMMR(playerID):
    try:

# Path: steamapi/getproplayerlist.py
# def requestGetProPlayerList():
#     URL = "https://api.steampowered.com/IDOTA2Fantasy_570/GetProPlayerList/v1?key=" + SteamAPIKey
# 
# Path: odotaapi/getodplayerdetails.py
# def getODPlayerDetails(playerID, q=None):
#             URL = 'https://api.opendota.com/api/players/' + str(playerID)


# Path: converter/playerconverter.py
from steamapi import getproplayerlist
from odotaapi import getodplayerdetails

                                                                                          proPlayerDictionary[playerID]['team_name'],
                                                                                          proPlayerDictionary[playerID]['is_locked'],
                                                                                          proPlayerDictionary[playerID]['sponsor'])
        result = result.replace('|','').replace('\\','').replace('*','')
        return result

    else:
        if playerSummariesJson==None:
            result = '[DB](http://dotabuff.com/players/%s "Dotabuff: Lookup people\'s match history")/' \
                     '[OD](http://opendota.com/players/%s "OpenDota: Provides free replay analysis")/' \
                     '[STRATZ](https://stratz.com/player/%s "STRATZ: Every match, every player, every stat. Free.")' %(playerID, playerID, playerID)
        else:
            for player in playerSummariesJson['response']['players']:
                if int(player['steam32id']) == playerID:
                    try:
                        playerName = '%.12s' %player['personaname']
                    except:
                        playerName = ''
                    break

            result = '[DB](http://dotabuff.com/players/%s "Dotabuff: Lookup people\'s match history")/' \
                     '[OD](http://opendota.com/players/%s "OpenDota: Provides free replay analysis")/' \
                     '[STRATZ](https://stratz.com/player/%s "STRATZ: Every match, every player, every stat. Free.") %s' %(playerID, playerID, playerID, playerName)

            result = result.replace('|','').replace('\\','').replace('*','')
        return result


def getMMR(playerID):
    try:

        odPlayerJson = getodplayerdetails.getODPlayerDetails(playerID)