Client Object

class soccermetrics.rest.SoccermetricsRestClient(account=None, api_key=None, base_uri='https://api-connect.soccermetrics.net')[source]

A client object for accessing the Soccermetrics REST API.

Attribute Description
root Service root
link Link to resources
validation Validation resources
players Players resource
managers Managers resource
referees Referees resource
club Club match resources
natl Nat’l team match resources
analytics Match analytics resources
Parameters:
soccermetrics.rest.find_credentials()[source]

Search for API credentials in current environment.

Looks for SOCCERMETRICS_APP_ID and SOCCERMETRICS_APP_KEY among the environment variables. Returns a (None, None) tuple if neither variable is not present in the environment.

Returns:(account, api_key) or (None, None)

Exceptions

exception soccermetrics.SoccermetricsException[source]

Base class for exceptions in Soccermetrics applications.

Derived from Exception.

exception soccermetrics.SoccermetricsRestException(status, uri, msg='')[source]

Custom exception for Soccermetrics REST API errors.

The exception is raised with the following message:

**HTTP ERROR** <error code>: <error message>
<URI>