API Reference

nbawebstats.request_stats(request_name, params={}, **kwargs)[source]

Send an HTTP request to stats.nba.com.

Parameters:
  • request_name (str) – Identifier to the request type.
  • params (dict) – Dictionary of paramters to the request. Any parameters not provided in this argument will be set to default vaues. Some paramters do not have default values; all of these must be provided. See the documantation for individual request types for which parameters they accept. A parameter may be left unspecified by providing an empty string.
  • kwargs – Any additional keyword arguments that would be accepted by requests.get().
Returns:

Dictionary containing fields specific to the request type.

Return type:

dict

class nbawebstats.HTTPResponseError(server_response)[source]

Error indicating that the stats.nba.com server returned an unexpected status code.

server_response

requests.models.Response

Response given by the server. May contain useful information about the reason for the failure.