TryFi狗项圈的Python接口
pytryfi的Python项目详细描述
pytryfi-TryFi的Python接口
这个python接口使您能够收集关于您的狗的下落、用户详细信息和您可能拥有的任何基础的信息。在
注意:由于这与未记录的API交互,因此可能会更改而不另行通知。在
安装
待定
使用
TryFi将Graphql用于其api。实际上,您将使用您的用户名(电子邮件地址)和密码来检索特定于API调用的唯一用户名,该用户名将在检索数据的持续时间内使用。在
示例
#this will create the object and gather all the necessary datatryfi=PyTryFi(username,password)print(tryfi)#this will perform a complete refresh of all Pets and data pointstryfi.updatePets()#this will perform a complete refresh of all Bases and data pointstryfi.updateBases()#this will perform an update on both Pets and Bases and their associated data pointstryfi.update()#this will update the last reported location of a bettryfi.pets[0].updatePetLocation(tryfi.session)#this will update the stats of the pet tryfi.pets[0].updateStats(tryfi.session)#update the device/collar details for the given pettryfi.pets[0].updateDeviceDetails(tryfi.session)#update the all details for a given pettryfi.pets[0].updateAllDetails(tryfi.session)#this will set the light color of the collartryfi.pets[0].setLedColorCode(tryfi.session,2)#this will turn on the LED light on the colortryfi.pets[0].turnOnOffLed(tryfi.session,True)#or turn it offtryfi.pets[0].turnOnOffLed(tryfi.session,False)#this will turn on the lost dog modetryfi.pets[0].setLostDogMode(tryfi.session,True)#or turn it offtryfi.pets[0].setLostDogMode(tryfi.session,False)#this will get the lost dog mode status/state currently in the objecttryfi.pets[0].isLost
待办事项
- 提供活动数据历史记录
链接:
版本历史记录
0.0.7
- 更新对象时的错误修复
0.0.6
- 增加了提交丢失狗动作的功能
- 为宠物添加了isLost属性
- 代码清理
0.0.5
- 增加了全局更新功能,更新宠物和基地(pytryfi.update())
- 增加了更好的错误处理
0.0.4节
- 为各种宠物和设备对象创建更新函数,并为宠物创建全局更新
- 将上次更新的日期/时间添加到对象以跟踪上次更新数据的时间
- 将“打开/关闭”操作更改为布尔值
- 在套环上执行操作时,更新同时检索的数据
0.0.3
进行了以下更新/增强:
- 已将更新的宠物位置从基本对象移动到宠物类
- 创建了更新宠物状态的函数
- 将适当的变量转换为整数、浮点数和日期
- 创建功能来设置领子上的LED颜色
- 创建了打开/关闭衣领上的LED的功能
0.0.2款
TryFi界面的初始版本,收集了宠物、项圈和底座的基本信息。在
- 项目
标签: