上传闹钟参数
POST
/fishtank/post/alarm
/fishtank/post/alarm
请求参数
Header 参数
Content-Type
enum<string>
必需
枚举值:
application/json
Body 参数application/json
weeks
integer <uint64>
重复星期
>= 0<= 127
默认值:
127
示例值:
127
倍数:
1
isOpen
boolean
闹钟开关
默认值:
true
time
string <datetime('HH:mm')>
时间
默认值:
7:00
示例值:
7:00
snoozeDuration
integer <uint>
贪睡周期
>= 1<= 30
默认值:
5
倍数:
1
snoozeTimes
integer <uint>
贪睡次数
>= 0<= 5
默认值:
3
示例值:
3
倍数:
1
ringIndex
integer <uint>
铃声索引
>= 0<= 10
默认值:
0
示例值:
0
倍数:
1
index
integer <uint>
闹钟索引
>= 0<= 2
倍数:
1
示例
{
"weeks": 127,
"isOpen": true,
"time": "7:00",
"snoozeDuration": 5,
"snoozeTimes": 3,
"ringIndex": 0,
"index": 0
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mydodo.fun/fishtank/post/alarm' \
--header 'Content-Type: application/json' \
--data-raw '{
"weeks": 127,
"isOpen": true,
"time": "7:00",
"snoozeDuration": 5,
"snoozeTimes": 3,
"ringIndex": 0,
"index": 0
}'
返回响应
🟢200成功
application/json
Body
code
integer
状态码
data
object
返回数据
message
string | null
返回信息
示例
{
"code": 0,
"data": {},
"message": "string"
}
修改于 2024-06-21 08:08:39