POST api/Sleep/RemoveDup

1.突出其中的未睡部分2.将相邻的state重复睡眠状态合并

Request Information

URI Parameters

None.

Body Parameters

Collection of SleepStateInfo2
NameDescriptionTypeAdditional information
startTime

date

None.

endTime

date

None.

state

0深睡 1浅睡 2醒着

integer

None.

var

decimal number

None.

span

decimal number

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "startTime": "2020-09-22T19:59:01.5015719+08:00",
    "endTime": "2020-09-22T19:59:01.5015719+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  },
  {
    "startTime": "2020-09-22T19:59:01.5015719+08:00",
    "endTime": "2020-09-22T19:59:01.5015719+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSleepStateInfo2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Controllers">
  <SleepStateInfo2>
    <endTime>2020-09-22T19:59:01.5015719+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-09-22T19:59:01.5015719+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
  <SleepStateInfo2>
    <endTime>2020-09-22T19:59:01.5015719+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-09-22T19:59:01.5015719+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
</ArrayOfSleepStateInfo2>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Collection of SleepStateInfo2
NameDescriptionTypeAdditional information
startTime

date

None.

endTime

date

None.

state

0深睡 1浅睡 2醒着

integer

None.

var

decimal number

None.

span

decimal number

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "startTime": "2020-09-22T19:59:01.5015719+08:00",
    "endTime": "2020-09-22T19:59:01.5015719+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  },
  {
    "startTime": "2020-09-22T19:59:01.5015719+08:00",
    "endTime": "2020-09-22T19:59:01.5015719+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSleepStateInfo2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Controllers">
  <SleepStateInfo2>
    <endTime>2020-09-22T19:59:01.5015719+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-09-22T19:59:01.5015719+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
  <SleepStateInfo2>
    <endTime>2020-09-22T19:59:01.5015719+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-09-22T19:59:01.5015719+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
</ArrayOfSleepStateInfo2>