示例#1
0
def get_friends(dev_id, auth_key, session_id, name):
    method_name = "getfriends"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" + urllib2.quote(name))
示例#2
0
def get_patch_info(dev_id, auth_key):
    method_name = "getpatchinfo"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        timestamp)
示例#3
0
def get_match_player_details(dev_id, auth_key, session_id, match_id):
    method_name = "getmatchplayerdetails"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" + repr(match_id))
示例#4
0
def get_gods(dev_id, auth_key, session_id, lang=params.langCode['English']):
    method_name = "getgods"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" + repr(lang))
示例#5
0
def get_esports_details(dev_id, auth_key, session_id):
    method_name = "getesportsproleaguedetails"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp)
示例#6
0
def search_clans(dev_id, auth_key, session_id, search):
    method_name = "searchteams"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" + urllib2.quote(search))
示例#7
0
def get_achievements(dev_id, auth_key, session_id, player_name):
    method_name = "getplayerachievements"
    response_format = "json"
    player_id = get_player_id(dev_id, auth_key, session_id, player_name)
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" + repr(player_id))
示例#8
0
def get_player(dev_id, auth_key, session_id, name):
    method_name = "getplayer"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url + method_name + response_format + "/" + dev_id + "/" +
        session.get_signature(dev_id, method_name, auth_key, timestamp) + "/" +
        session_id + "/" + timestamp + "/" +
        urllib2.quote(name.encode('utf8')))
示例#9
0
def get_patch_info(dev_id, auth_key):
    method_name = "getpatchinfo"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + timestamp
    )
示例#10
0
def get_esports_details(dev_id, auth_key, session_id):
    method_name = "getesportsproleaguedetails"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp
    )
示例#11
0
def get_god_ranks(dev_id, auth_key, session_id, player_name):
    method_name = "getgodranks"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + urllib2.quote(player_name)
    )
示例#12
0
def get_match_player_details(dev_id, auth_key, session_id, match_id):
    method_name = "getmatchplayerdetails"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + repr(match_id)
    )
示例#13
0
def search_clans(dev_id, auth_key, session_id, search):
    method_name = "searchteams"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + urllib2.quote(search)
    )
示例#14
0
def get_gods(dev_id, auth_key, session_id, lang=params.langCode['English']):
    method_name = "getgods"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + repr(lang)
    )
示例#15
0
def get_player(dev_id, auth_key, session_id, name):
    method_name = "getplayer"
    response_format = "json"
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + urllib2.quote(name.encode('utf8'))
    )
示例#16
0
def get_achievements(dev_id, auth_key, session_id, player_name):
    method_name = "getplayerachievements"
    response_format = "json"
    player_id = get_player_id(dev_id, auth_key, session_id, player_name)
    timestamp = session.get_timestamp()
    return request.json(
        base_url
        + method_name
        + response_format + "/"
        + dev_id + "/"
        + session.get_signature(dev_id, method_name, auth_key, timestamp) + "/"
        + session_id + "/"
        + timestamp + "/"
        + repr(player_id)
    )