0% found this document useful (0 votes)
35 views

Smite-Python Documentation: Release 1.0

This document provides documentation on the smite-python library for interacting with the Smite API. It includes sections on the API reference, examples of using the library, and frequently asked questions. The API reference section outlines the main functions, exceptions, and enums available in the library. It describes what each function does and the parameters and return values. The examples section shows how to get a list of all gods using the library. And the FAQ addresses common questions around getting API keys, handling private profiles, and supported versions of Python.

Uploaded by

Love Thunder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Smite-Python Documentation: Release 1.0

This document provides documentation on the smite-python library for interacting with the Smite API. It includes sections on the API reference, examples of using the library, and frequently asked questions. The API reference section outlines the main functions, exceptions, and enums available in the library. It describes what each function does and the parameters and return values. The examples section shows how to get a list of all gods using the library. And the FAQ addresses common questions around getting API keys, handling private profiles, and supported versions of Python.

Uploaded by

Love Thunder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

smite-python Documentation

Release 1.0𝑟 𝑐2

Jayden Bailey

February 06, 2017


Contents

1 API Reference 3
1.1 Main Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Enums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Examples 7
2.1 Getting a list of all gods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 FAQ 9
3.1 How do I get a devId and authKey? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Why am I getting a null dataset for a player that exists? . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 When using methods such as SmiteClient.get_match(), some player info is missing. Why? . 9
3.4 Does this library support older versions of Python? . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.5 Do all methods work with all endpoints? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Indices and tables 11

i
ii
smite-python Documentation, Release 1.0𝑟 𝑐2

Contents:

Contents 1
smite-python Documentation, Release 1.0𝑟 𝑐2

2 Contents
CHAPTER 1

API Reference

The following section outlines the API of smite-python.

1.1 Main Functions

class smite.SmiteClient(dev_id, auth_key, lang=1)


Represents a connection to the Smite API. This class is used to interact with the API and retrieve information in
JSON.

Note: Any player with Privacy Mode enabled in-game will return a null dataset from methods that require a
player name

get_data_used()
Returns Returns a dictionary of daily usage limits and the stats against those limits

Note: Getting your data usage does contribute to your daily API limits

get_demo_details(match_id)
Parameters match_id – ID of the match
Returns Returns information regarding a match

Note: It is better practice to use get_match_details()

get_esports_proleague_details()
Returns Returns the matchup information for each matchup of the current eSports pro league
session.
get_friends(player)
Parameters player – The player name or a player ID
Returns Returns a list of friends
get_god_ranks(player)
Parameters player – The player name or player ID

3
smite-python Documentation, Release 1.0𝑟 𝑐2

Returns Returns the rank and worshippers value for each God the player has played
get_god_recommended_items(god_id)
Parameters god_id – ID of god you are querying. Can be found in get_gods return result.
Returns Returns a dictionary of recommended items for a particular god
get_god_skins(god_id)
Param god_id: ID of god you are querying. Can be found in get_gods return result.
Returns Returnss all skin information for a particular god
get_gods()
Returns Returns all smite Gods and their various attributes
get_items()
Returns Returns all Smite items and their various attributes
get_league_leaderboard(queue, tier, season)
Parameters
• queue – The queue to obtain data from
• tier – The tier to obtain data from
• season – The season to obtain data from
Returns Returns the top players for a particular league
get_league_seasons(queue)
Parameters queue – The queue to obtain data from
Returns Returns a list of seasons for a match queue
get_match_details(match_id)
Parameters match_id – The id of the match
Returns Returns a dictionary of the match and it’s attributes.
get_match_history(player)
Parameters player – The player name or player ID
Returns Returns the recent matches and high level match statistics for a particular player.
get_match_ids_by_queue(queue, date, hour=-1)
Parameters
• queue – The queue to obtain data from
• date – The date to obtain data from
• hour – The hour to obtain data from (0-23, -1 = all day)
Returns Returns a list of all match IDs for a specific match queue for given time frame
get_match_player_details(match_id)
Parameters match_id – The ID of the match
Returns Returns player information for a live match
get_motd()

4 Chapter 1. API Reference


smite-python Documentation, Release 1.0𝑟 𝑐2

Returns Returns information about the most recent Match of the Days
get_player(player_name)
Parameters player_name – the string name of a player
Returns Returns league and non-league high level data for a given player name
get_player_achievements(player_id)
Parameters player_id – ID of a player
Returns Returns a select number of achievement totals for the specified player ID
get_player_status(player_name)
Parameters player_name – the string name of a player
Returns Returns the current online status of a player
get_queue_stats(player, queue)
Parameters
• player – The player name or player ID
• queue – The id of the game mode
Returns Returns match summary statistics for a player and queue
get_team_details(clan_id)
Parameters clan_id – The id of the clan
Returns Returns the details of the clan in a python dictionary
get_team_match_history(clan_id)
Parameters clan_id – The ID of the clan.
Returns Returns a history of matches from the given clan.

Warning: This method is deprecated and will return a null dataset

get_team_players(clan_id)
Parameters clan_id – The ID of the clan
Returns Returns a list of players for the given clan.
get_top_matches()
Returns Returns the 50 most watch or most recent recorded matches
ping()
Returns Indicates whether the request was successful

Note: Pinging the Smite API is used to establish connectivity. You do not need to authenticate your ID or
key to do this.

search_teams(search_team)
Parameters search_team – The string search term to search against
Returns Returns high level information for clan names containing search_team string

1.1. Main Functions 5


smite-python Documentation, Release 1.0𝑟 𝑐2

1.2 Exceptions

class smite.SmiteError(*args, **kwargs)


class smite.NoResultError(*args, **kwargs)

1.3 Enums

class smite.Endpoint
Valid enums: PC, PS4, XBOX

6 Chapter 1. API Reference


CHAPTER 2

Examples

2.1 Getting a list of all gods


from smite import SmiteClient
from smite import Endpoint

# Create a new instance of the client


smite = SmiteClient(1700, '2djsa8231jlsad92ka9d2jkad912j')
# Print JSON data for all of the gods in the game on PC
print(smite.get_gods())

# Make the library use the Xbox endpoint for future requests
smite._switch_endpoint(Endpoint.XBOX)
# Print JSON data for all of the gods in the game on Xbox
print(smite.get_gods())

7
smite-python Documentation, Release 1.0𝑟 𝑐2

8 Chapter 2. Examples
CHAPTER 3

FAQ

3.1 How do I get a devId and authKey?

If you do not already have a developer ID and API key, you can obtain one by filling out this form. Hi-Rez Studios
usually responds within a few days.

3.2 Why am I getting a null dataset for a player that exists?

If a player has Hide My Profile enabled in-game, methods will return a null dataset.

3.3 When using methods such as SmiteClient.get_match(),


some player info is missing. Why?

If a player has Hide My Profile enabled in-game, some of their data will be unavailable for match history etc.

3.4 Does this library support older versions of Python?

No. smite-python only supports Python 3.5 or higher. However, if you are using Python 3.4, you can use smython,
though it may be outdated. It does not contain all possible API calls, and doesn’t support the console endpoints.

3.5 Do all methods work with all endpoints?

No. PC is the only endpoint guaranteed to work with all methods.

9
smite-python Documentation, Release 1.0𝑟 𝑐2

10 Chapter 3. FAQ
CHAPTER 4

Indices and tables

• genindex
• modindex

11
smite-python Documentation, Release 1.0𝑟 𝑐2

12 Chapter 4. Indices and tables


Index

E SmiteClient (class in smite), 3


Endpoint (class in smite), 6 SmiteError (class in smite), 6

G
get_data_used() (smite.SmiteClient method), 3
get_demo_details() (smite.SmiteClient method), 3
get_esports_proleague_details() (smite.SmiteClient
method), 3
get_friends() (smite.SmiteClient method), 3
get_god_ranks() (smite.SmiteClient method), 3
get_god_recommended_items() (smite.SmiteClient
method), 4
get_god_skins() (smite.SmiteClient method), 4
get_gods() (smite.SmiteClient method), 4
get_items() (smite.SmiteClient method), 4
get_league_leaderboard() (smite.SmiteClient method), 4
get_league_seasons() (smite.SmiteClient method), 4
get_match_details() (smite.SmiteClient method), 4
get_match_history() (smite.SmiteClient method), 4
get_match_ids_by_queue() (smite.SmiteClient method),
4
get_match_player_details() (smite.SmiteClient method),
4
get_motd() (smite.SmiteClient method), 4
get_player() (smite.SmiteClient method), 5
get_player_achievements() (smite.SmiteClient method), 5
get_player_status() (smite.SmiteClient method), 5
get_queue_stats() (smite.SmiteClient method), 5
get_team_details() (smite.SmiteClient method), 5
get_team_match_history() (smite.SmiteClient method), 5
get_team_players() (smite.SmiteClient method), 5
get_top_matches() (smite.SmiteClient method), 5

N
NoResultError (class in smite), 6

P
ping() (smite.SmiteClient method), 5

S
search_teams() (smite.SmiteClient method), 5

13

You might also like