🪄
Instant recording
These are APIs for practical recording.
Related API
- PUT - /v1/users/<username>/graphs/<graphID>/increment
- Add minimum quantity to the Pixel of that day of the graph which is specified by
<graphID>
.
- PUT - /v1/users/<username>/graphs/<graphID>/decrement
- Subtract minimum quantity from the Pixel of that day of the graph which is specified by
<graphID>
.
- POST - /v1/users/<username>/graphs/<graphID>/stopwatch
- For more detail about this API, please see Use Pixela as a stopwatch and record the measured time directly.
Properties and features
The common feature of these APIs is that you don’t need to specify the target date to be added or subtracted.
By requesting each API appropriately, the quantity of that day will be added or subtracted.
Therefore, it’s useful for real-time quantity recording.
Specifications
- “Minimum quantity” which is used in adding or subtracting with PUT - /v1/users/<username>/graphs/<graphID>/increment or PUT - /v1/users/<username>/graphs/<graphID>/decrement is the following:
- If the
type
of theGraph
isint
, then “Minimum quantity” is1
. - If the
type
of theGraph
isfloat
, then “Minimum quantity” is0.01
.
- When calculating the date to be added or subtracted,
timezone
of the graph will be used.
Notes
- If you want to record a quantity in real-time, but you can’t specify the HTTP header (in the case you can’t specify
X-USER-TOKEN
), then please consider using Webhook .