Skip to content

Krokop/python-xmlstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-xmlstats

client for api https://erikberg.com/api

Work with python3.+

#Install

pip3 install python-xmlstats

#Use Just init class, and send any request, low level.

from xmlstats import XMLStats

stats = XMLStats(access_token='xxxxxxxxxxxxxxxxxxxxxxxxxxx', # access token you must get https://erikberg.com/api
                 email='some@email.com') #  email/website 
                                        #   to contact if there is a problem

responce = stats.make_request(host="erikberg.com", sport=None, method="events",
                              id=None, format="json",
                              parameters={'sport': 'nba', 'date':'20130414'})

Hight level

##Get teams

stats = XMLStats(access_token='xxxxxxxxxxxxxxxxxxxxxxxxxxx',
                 email='some@email.com')
teams = stats.get_teams()  # Return json https://erikberg.com/api/methods/teams