smash.gg的graphql api的包装器
smashggA的Python项目详细描述
smashgg api包装python
使用方法:
pip install smashggAPI
- 将公共api密钥添加为环境变量:
在.bashrc/任何等效文件中:
export SMASHGG_API_KEY='your api key here'
from smashggAPI import client
result = client.query('''
query TournamentInfo ($slug: String!) {
tournament(slug: $slug) {
id
name
}
}
''',
{
"slug": "genesis-6"
})
贡献
运行测试
python -m pip install -r requirements.txt
python -m pytest