旧版Runescape API包装

python-osrsapi的Python项目详细描述


OSRS API包装

允许简单访问Oldschool Runescape的API。目前支持OSR仅有的两个API。(Hiscores和GE)

安装

pip install python-osrsapi

Dev安装

^{pr2}$

他的心脏

>>>fromosrs_api.constimportAccountType>>>fromosrs_apiimportHiscores>>>zezima=Hiscores('zezima')>>>zezima.skills{'attack':Skill(name=attack,rank=614026,level=76,xp=1343681),'defence':...}>>>zezima.skills['attack'].level76>>>zezima.skills['attack'].xp_tnl()131900>>>zezima.max_skill().name'firemaking'>>>defmaxed_skills(hiscore,skill):...returnhiscore.skills[skill].level==99>>>zezima.filter(maxed_skills){'firemaking':Skill(name=firemaking,rank=108780,level=99,xp=13034646)}>>>lynx=Hiscores('Lynx Titan')>>>mammal=Hiscores('mr mammal')>>>lynx>mammalTrue>>>iron_mammal=Hiscores('iron mammal',AccountType.IRONMAN)>>>iron_mammal.rank1052

大交换

>>>fromosrs_apiimportGrandExchange>>>fromosrs_apiimportItem>>>whip_id=Item.get_ids('abyssal whip')>>>whip_id4151>>>whip=GrandExchange.item(whip_id)>>>whip.description'A weapon from the abyss.'>>>whip.price(),whip.is_mem(1648785,True)>>>thirty_days=whip.price_info.trend_30>>>thirty_days.trend,thirty_days.change('negative',-18.0)>>>dagger_ids=Item.get_ids('rune dag')# If you enter a partial name, you will get a list of all possible matches.>>>dagger_ids[5696,5678,1229,1213]# Names>>>[Item.id_to_name(id)foridindagger_ids]['Rune dagger(p++)','Rune dagger(p+)','Rune dagger(p)','Rune dagger']>>>GrandExchange.item(dagger_ids[0]).description'The blade is covered with a nasty poison.'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JavaJSonarray不会从SeekBar读取double   使用另一个类从Java中的2D数组打印用户输入   java ClassNotFoundException的原因   spring调用两个方法以返回Java中的不同页面   httpurlconnection Java禁止的代码错误,但浏览器错误(2)   java画布矩阵转换   java:在另一个java映射中使用“Map”作为值   java“未找到用于解密的证书”(Apache CXF,WSSecurity)   java如何查看JTable中选择的行   java在没有xmlwrappers的情况下重复xml元素序列集   java将垂直直方图打印到控制台   java Spring JDBCTemplate:构造不带特殊字符的JSON   java PayPal RestApi获取用户信息