Methods
(async) addDailyFollow(fileName, num)
批量加每日
| Name | Type | Description |
|---|---|---|
fileName | string | 数据文件的名称。 |
num | number | 要增加的数值。 |
- Source
(async) checkFile(fileName)
检查文件
| Name | Type | Description |
|---|---|---|
fileName | string | 文件名。 |
- Source
(async) clearDailyFollow(fileName) → {Promise.<Object>}
清除每日
| Name | Type | Description |
|---|---|---|
fileName | string | 数据文件的名称。 |
- Source
- 操作结果,主键为 "main"。
- Type:
- Promise.<Object>
(async) createUser(platformName, userInfo, followopt)
创建或新增用户
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
platformName | string | 平台名称。 | ||
userInfo | Object | 用户信息。 | ||
follow | boolean | <optional> | false | 是否关注用户。 |
- Source
(async) dataControler(fileName, type, dataType, newData)
添加数据库内容
| Name | Type | Description |
|---|---|---|
fileName | string | 文件名。 |
type | string | 操作类型('add', 'delete', 'set')。 |
dataType | string | 数据类型。 |
newData | Object | 新数据或更新数据。 |
- Source
(async) dataGetter(fileName, dataType, query) → {Promise.<Object>}
查询数据库内容
| Name | Type | Description |
|---|---|---|
fileName | string | 文件名。 |
dataType | string | 数据类型。 |
query | Object | 查询条件。 |
- Source
- 查询结果。
- Type:
- Promise.<Object>
(async) getBackAndFind(act, target, limitopt) → {Promise.<boolean>}
调用安卓返回键,直到某页
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
act | Object | 操作对象。 | ||
target | Object | 目标元素选择器,用于判断是否到达目标页面。 | ||
limit | number | <optional> | 10 | 最大返回次数。 |
- Source
- 是否成功到达目标页面。
- Type:
- Promise.<boolean>
getError(tag, str) → {string}
搜集简化的报错信息上传,主要用来输出选择器的报错
| Name | Type | Description |
|---|---|---|
tag | string | 标签,用于标识错误来源。 |
str | string | 原始错误信息。 |
- Source
- 简化后的错误信息。
- Type:
- string
(async) getInfo(fileName, param, info) → {Promise.<Object>}
查询内容
| Name | Type | Description |
|---|---|---|
fileName | string | 数据文件的名称。 |
param | string | 数据类型参数。 |
info | Object | 查询信息。 |
- Source
- 查询结果。
- Type:
- Promise.<Object>
(async) getLists(queue) → {string}
获取所有任务队列文件,提取要执行的文件
| Name | Type | Description |
|---|---|---|
queue | Array.<string> | 任务对面数组 |
- Source
- Type:
- string
(async) getToast(act, checkStringopt) → {Promise.<string>}
捕获轻提示
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
act | Object | 操作对象。 | ||
checkString | string | <optional> | null | 要检查的字符串。 |
- Source
- 捕获到的提示信息。
- Type:
- Promise.<string>
(async) getTodoList(fileName) → {string}
查看当前任务文件
| Name | Type | Description |
|---|---|---|
fileName | string | 任务文件名 |
- Source
- Type:
- string
(async) myCapacity(act, type, data) → {string}
执行任务各个功能
| Name | Type | Description |
|---|---|---|
act | * | MyAction实例 |
type | * | 执行功能的名字 |
data | * | 执行功能所需的数据 |
- Source
- Type:
- string
(async) myGQL(queryStr, variables, operateopt, authopt) → {Promise.<Object>}
gql数据库
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
queryStr | string | GraphQL 查询字符串。 | ||
variables | Object | GraphQL 查询变量。 | ||
operate | string | <optional> | null | GraphQL 操作名称。 |
auth | string | <optional> | null | 授权令牌。 |
- Source
- GraphQL 查询结果。
- Type:
- Promise.<Object>
(async) screenShot(act, selectoropt, fileName, suffixopt) → {Promise.<(boolean|string)>}
截取元素或整个屏幕的截图,上传成功会返回生成的文件名
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
act | Object | 操作对象。 | ||
selector | Object | <optional> | null | 要截图的元素选择器。 |
fileName | string | 文件名。 | ||
suffix | string | <optional> | '_default' | 文件名后缀。 |
- Source
- 返回上传结果,成功返回文件名,失败返回false。
- Type:
- Promise.<(boolean|string)>
(async) sleep(baseTimeSec, randomTimeSecopt) → {Promise.<number>}
延时等待,基础时间+随机时间 await sleep(1.2, 4); 1.2s~5.2s
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
baseTimeSec | number | 基础等待时间(秒)。 | ||
randomTimeSec | number | <optional> | 0 | 额外的随机等待时间(秒)。 |
- Source
- 返回实际等待的总时间(秒)。
- Type:
- Promise.<number>
(async) updateTask(fileName, schedule, type, over)
更新任务进度
| Name | Type | Description |
|---|---|---|
fileName | string | 要更新的任务文件名 |
schedule | string | | 要更新的任务细节 |
type | * | 要更新的任务文件类型 |
over | * | 是否是最后一项更新 |
- Source
(async) visitedVideo(fileName, videoInfo) → {Promise.<string>}
记录已访问过的视频
| Name | Type | Description |
|---|---|---|
fileName | string | 文件名。 |
videoInfo | Object | 视频信息。 |
- Source
- 返回视频检查结果,可能是 'over', 'haveVideo' 或其他错误信息。
- Type:
- Promise.<string>
Type Definitions
AdvancedSettings
视频发布高级设置对象,包含各种发布选项。
- Object
| Name | Type | Description |
|---|---|---|
text | string | 设置的描述文本。 |
value | boolean | 设置的值,如 true 或 false。 |
- Source
TodoList
一个包含多个任务的对象,每个任务都是一个对象,包含任务类型和相关数据。
- Object
| Name | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
todoList | Array.<Object> | 任务列表,每个任务是一个对象。 | |||||||||||||||||||||||||||||||||
todoList[].type | string | 任务的类型,如 'searchVideo', 'searchUser', 'replyMessage' 等。 | |||||||||||||||||||||||||||||||||
todoList[].data | Object | 与任务相关的数据。 Properties
| |||||||||||||||||||||||||||||||||
todoList[].data | Array.<Object> | 回复消息任务的数据。 | |||||||||||||||||||||||||||||||||
todoList[].data[].type | string | 回复消息的类型,如 'notice', 'reply', 'search' 等。 | |||||||||||||||||||||||||||||||||
todoList[].data[].userName | string | 用户名,用于搜索任务。 | |||||||||||||||||||||||||||||||||
todoList[].data[].text | string | 搜索文本,用于搜索任务。 |
- Source
VideoReleaseData
视频发布数据对象,包含视频的URL、标题、标签等信息。
- Object
| Name | Type | Description |
|---|---|---|
url | string | 视频的URL地址。 |
title | string | 视频的标题。 |
tags | Array | 视频的标签数组。 |
location | string | 视频的地理位置信息(如果有)。 |
permission | string | 视频的权限设置,如 '公开 · 所有人可见'。 |
declare | string | 视频的声明信息(如果有)。 |
advanced | Array | 视频发布的高级设置数组。 |
- Source
WorkList
工作列表对象,包含发布视频的任务TodoItem测试。
- Object
| Name | Type | Description |
|---|---|---|
missionStart | boolean | 任务开始的标志。 |
name | string | 任务的名称。 |
todoList | Array | 待办任务列表。 |
- Source
todoList
待办任务对象,包含发布视频的详细信息。
- Object
| Name | Type | Description |
|---|---|---|
type | string | 任务类型,这里是 'releaseVideo'。 |
data | Object | 视频发布的具体数据。 |
- Source