myotest智能教练api的python客户端
revo-client的Python项目详细描述
#myotest客户端api
3.4
-pip-install-r-requirement.txt
<
>这将在您当前环境中安装一个名为"revo client"的python包
-`` pip install-e{您的repo路径` ` `
` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `储存库版本
-`` pip install revo client``
``创建客户端
=客户端("My API Token")
连接到临时服务器
client=client("My API Token",server="staging")
连接到另一台服务器
client=client("My API Token",server="https://my server")
\user_id="other user uuid")
````
"ranges"])
获取id
workout=client.getu-workoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutud
<
<
<
<
<
<
<
<
35;属性
-id(id)
-title(字符串)
-开始(日期时间)
-结束(日期时间)
-类型(字符串)训练类型
-目标持续时间(时间增量)训练请求持续时间
-有效持续时间(时间增量)
-插槽(对象列表::插槽)
-数据集(对象列表::数据集)
-训练加载(object::trainingload)
如果名称是完整的(即"mil-1"),则返回数据集。
如果名称是部分的(即"mil"),则返回第一个数据集(下索引)
第一个插槽(object::slot)包含所有标记,如果有任何
```````````````````````````````````````````````````````````````````````````````````````````>
-训练(对象::锻炼)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\属性
-id(id)
-tags(字符串列表)
-tags(字符串列表)
-type(字符串)
-value(对象::slotvvalue)
-value(对象::slotvvalue)
-value(对象::slotvtvalue)
-text(字符串)
-text(字符串)
-text(字符串)
-result(对象::时间)
-功率类型(字符串)
-分析(dict列表)
-训练(object::训练)
-训练负荷(object::训练负荷)
"中值")**
-速度(dict)描述**("max","min","std","mean","count","median")**
-GPS功率(dict)描述GPS功率**("max","min","std","mean","count","median")**
-GPS速度(dict)描述**("max","min","std","mean","count","中值")**
-以米为单位的距离(浮动)距离
-以米为单位的GPS距离(浮动)距离
-规律性90%的时间
-步数比率(浮动)步数与运行比率
-规律性中值(浮动)规律性中值
**GPS速度****只有当MIL包含这些信息时,GPS_Power**才可用,如果
用户创建了一个没有GPS的训练,则这些值为空
\object::slotvalue
\repetition=count
-attributes
-value(float)distance=meters,duration=seconds,repetition=count
-type(distance|持续时间重复)
###对象:profile
-出生日期(日期)
-年龄(浮动)在
35 35 35 35 35 35 \35 \35 \35 \35 \35 \35 \ \\\ \ \ \\/>训练负荷仅适用于一个插槽使用pma计算。
对于其他插槽类型,所有值都是0
导入client
client=client("My API Token")
workout=client.get_last_workout_with_tags(["VMA_high"])
await workout.load_slots()
slot=workout.get_sloth_with_tags(["VMA_high"])
profile=client.get_profile()
print(
"你好,我是{}),我已经{}岁了,我的最后一个"
"vma训练的规则性为{}"。格式(
profile.full_name,
profile.age,
slot.result.regulatory_median))
```
3.4
-pip-install-r-requirement.txt
<
>这将在您当前环境中安装一个名为"revo client"的python包
-`` pip install-e{您的repo路径` ` `
` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `储存库版本
-`` pip install revo client``
``创建客户端
=客户端("My API Token")
连接到临时服务器
client=client("My API Token",server="staging")
连接到另一台服务器
client=client("My API Token",server="https://my server")
\user_id="other user uuid")
````
"ranges"])
获取id
workout=client.getu-workoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutoutud
<
<
<
<
<
<
<
<
35;属性
-id(id)
-title(字符串)
-开始(日期时间)
-结束(日期时间)
-类型(字符串)训练类型
-目标持续时间(时间增量)训练请求持续时间
-有效持续时间(时间增量)
-插槽(对象列表::插槽)
-数据集(对象列表::数据集)
-训练加载(object::trainingload)
如果名称是完整的(即"mil-1"),则返回数据集。
如果名称是部分的(即"mil"),则返回第一个数据集(下索引)
第一个插槽(object::slot)包含所有标记,如果有任何
```````````````````````````````````````````````````````````````````````````````````````````>
-训练(对象::锻炼)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\属性
-id(id)
-tags(字符串列表)
-tags(字符串列表)
-type(字符串)
-value(对象::slotvvalue)
-value(对象::slotvvalue)
-value(对象::slotvtvalue)
-text(字符串)
-text(字符串)
-text(字符串)
-result(对象::时间)
-功率类型(字符串)
-分析(dict列表)
-训练(object::训练)
-训练负荷(object::训练负荷)
"中值")**
-速度(dict)描述**("max","min","std","mean","count","median")**
-GPS功率(dict)描述GPS功率**("max","min","std","mean","count","median")**
-GPS速度(dict)描述**("max","min","std","mean","count","中值")**
-以米为单位的距离(浮动)距离
-以米为单位的GPS距离(浮动)距离
-规律性90%的时间
-步数比率(浮动)步数与运行比率
-规律性中值(浮动)规律性中值
**GPS速度****只有当MIL包含这些信息时,GPS_Power**才可用,如果
用户创建了一个没有GPS的训练,则这些值为空
\object::slotvalue
\repetition=count
-attributes
-value(float)distance=meters,duration=seconds,repetition=count
-type(distance|持续时间重复)
###对象:profile
-出生日期(日期)
-年龄(浮动)在
35 35 35 35 35 35 \35 \35 \35 \35 \35 \35 \ \\\ \ \ \\/>训练负荷仅适用于一个插槽使用pma计算。
对于其他插槽类型,所有值都是0
导入client
client=client("My API Token")
workout=client.get_last_workout_with_tags(["VMA_high"])
await workout.load_slots()
slot=workout.get_sloth_with_tags(["VMA_high"])
profile=client.get_profile()
print(
"你好,我是{}),我已经{}岁了,我的最后一个"
"vma训练的规则性为{}"。格式(
profile.full_name,
profile.age,
slot.result.regulatory_median))
```