Пример #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)
    )