# Path: steamapi/getheroes.py
# def requestGetHeroes():
#     URL = "https://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?key=" + SteamAPIKey + "&language=en_us"
# 
# Path: steamapi/getproplayerlist.py
# def requestGetProPlayerList():
#     URL = "https://api.steampowered.com/IDOTA2Fantasy_570/GetProPlayerList/v1?key=" + SteamAPIKey
# 
# Path: steamapi/getschema.py
# def requestGetSchema():
#     URL = "https://api.steampowered.com/IEconItems_570/GetSchemaURL/v1?key=" + SteamAPIKey
#     URL = response['result']['items_game_url']
# 
# Path: steamapi/getleaguelisting.py
# def requestGetLeagueListing():
#         URL = "https://api.steampowered.com/IDOTA2Match_570/GetLeagueListing/v1?key=" + SteamAPIKey
# 
# Path: reddit/botinfo.py

# 
# Path: reddit/workerdeletebadcomments.py
# def deleteBadComments(r):
# 
# Path: reddit/workerfindcomments.py
# def findComments(r):
# 
# Path: reddit/workerdeleterequestedcomments.py
# def deleteRequestedComments(r):
# 
# Path: reddit/botinfo.py



import praw
import obot
import threading
from steamapi import getheroes, getproplayerlist, getschema, getleaguelisting
from reddit import botinfo
from reddit import workerdeletebadcomments, workerfindcomments, workerdeleterequestedcomments
from reddit.botinfo import message
                        password=obot.password)


        if message: print('[loginreddit] logging successful')

        if message: print('[loginreddit] updating heroDictionary')
        getheroes.requestGetHeroes()
        if message: print('[loginreddit] updating heroDictionary success')

        if message: print('[loginreddit] updating proPlayerDictionary')
        getproplayerlist.requestGetProPlayerList()
        if message: print('[loginreddit] updating proPlayerDictionary success')

        #if message: print('[loginreddit] updating dota 2 items_game schema')
        #getschema.requestGetSchema()
        #if message: print('[loginreddit] updating dota 2 items_game schema success')



        if message: print('[loginreddit] starting threads')

        if message: print('[loginreddit] starting deleteBadComments thread')
        t = threading.Thread(target=workerdeletebadcomments.deleteBadComments , args = (r,))
        t.start()

        if message: print('[loginreddit] starting findComments thread')
        t = threading.Thread(target=workerfindcomments.findComments, args = (r,))
        t.start()

        if message: print('[loginreddit] starting deleteRequestedComments thread')

# Path: steamapi/getheroes.py
# def requestGetHeroes():
#     URL = "https://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?key=" + SteamAPIKey + "&language=en_us"
# 
# Path: steamapi/getproplayerlist.py
# def requestGetProPlayerList():
#     URL = "https://api.steampowered.com/IDOTA2Fantasy_570/GetProPlayerList/v1?key=" + SteamAPIKey
# 
# Path: steamapi/getschema.py
# def requestGetSchema():
#     URL = "https://api.steampowered.com/IEconItems_570/GetSchemaURL/v1?key=" + SteamAPIKey
#     URL = response['result']['items_game_url']
# 
# Path: steamapi/getleaguelisting.py
# def requestGetLeagueListing():
#         URL = "https://api.steampowered.com/IDOTA2Match_570/GetLeagueListing/v1?key=" + SteamAPIKey
# 
# Path: reddit/botinfo.py

# 
# Path: reddit/workerdeletebadcomments.py
# def deleteBadComments(r):
# 
# Path: reddit/workerfindcomments.py
# def findComments(r):
# 
# Path: reddit/workerdeleterequestedcomments.py
# def deleteRequestedComments(r):
# 
# Path: reddit/botinfo.py



# Path: reddit/loginreddit.py
import praw
import obot
import threading
from steamapi import getheroes, getproplayerlist, getschema, getleaguelisting
from reddit import botinfo
from reddit import workerdeletebadcomments, workerfindcomments, workerdeleterequestedcomments
from reddit.botinfo import message

                        password=obot.password)


        if message: print('[loginreddit] logging successful')

        if message: print('[loginreddit] updating heroDictionary')
        getheroes.requestGetHeroes()
        if message: print('[loginreddit] updating heroDictionary success')

        if message: print('[loginreddit] updating proPlayerDictionary')
        getproplayerlist.requestGetProPlayerList()
        if message: print('[loginreddit] updating proPlayerDictionary success')

        #if message: print('[loginreddit] updating dota 2 items_game schema')
        #getschema.requestGetSchema()
        #if message: print('[loginreddit] updating dota 2 items_game schema success')



        if message: print('[loginreddit] starting threads')

        if message: print('[loginreddit] starting deleteBadComments thread')
        t = threading.Thread(target=workerdeletebadcomments.deleteBadComments , args = (r,))
        t.start()

        if message: print('[loginreddit] starting findComments thread')
        t = threading.Thread(target=workerfindcomments.findComments, args = (r,))
        t.start()

        if message: print('[loginreddit] starting deleteRequestedComments thread')

        t = threading.Thread(target=workerdeleterequestedcomments.deleteRequestedComments, args = (r,))