rawg.io python api包装器
rawgp的Python项目详细描述
rawgpy快速启动
rawgpy rawg.io api包装器使用rawgpy.rawg.rawg作为用户访问的主类。
您可以使用rawgpy包装器进行或不进行身份验证。
import rawgpy
rawg = rawgpy.RAWG("User-Agent, this should identify your app")
results = rawg.search("Warframe") # defaults to returning the top 5 results
game = results[0]
game.populate() # get additional info for the game
print(game.name)
print(game.description)
for store in game.stores:
print(store.url)
rawg.login("someemail@example.com", "somepassword")
me = rawg.current_user()
print(me.name) # print my name, equivalent to print(self.username)
me.populate() # gets additional info for the user
for game in me.playing:
print(game.name) # prints all the games i'm currently playing