예제 #1
0
파일: script.py 프로젝트: glee-/Display.gg

#Finds out which API key is usable
def getWatcher():
    temp = order.pop(0)
    order.append(temp)
    try:
        temp.get_summoner(name)
        return temp
    except:
        time.sleep(1)
        return getWatcher()


#sets to correct version of league
cdnVersion = watcher1.static_get_versions()[0]

#keystones defined
keystones = [
    "Warlord's Bloodlust", "Fervor of Battle", "Deathfire Touch",
    "Stormraider's Surge", "Thunderlord's Decree", "Windspeaker's Blessing",
    "Grasp of the Undying", "Strength of the Ages", "Bond of Stone"
]

#runes defined
runes = {
    "FlatArmorMod": ["+", "armor", 1],
    "FlatAttackSpeedMod": ["+", "attack speed", 1],
    "FlatBlockMod": ["+", "block", 1],
    "FlatCritChanceMod": ["+", "critical strike chance", 1],
    "FlatCritDamageMod": ["+", "criticl strike damage", 1],
예제 #2
0
from pymongo import MongoClient
import pymongo
import riotwatcher as rw
from riotwatcher import RiotWatcher
from riotwatcher import LoLException
import time
from optparse import OptionParser
import json

#frodo621 key
key = "45fbe47f-84f1-43b6-9394-9f433a23d522"

watcher = RiotWatcher(key)

print watcher.static_get_versions(region = 'na')