demo.mp4
time
field contains the time (in seconds) during which the snippet is accessible.views
field contains a number of views allowed for this snippet.
<input id="time_restriction" type="text"/>
contain the time restriction.<input id="views_restriction" type="text"/>
contain the views restriction.
GET /api/code/UUID
is not accessible if one of the restrictions is triggered. Return 404 Not Found in this case and all the cases when no snippet with such a UUID was found.
GET /api/code/UUID
shows what restrictions apply to the code piece. Use the keys time and views for that. A zero value (0) should correspond to the absence of the restriction.
time
field contains the time (in seconds) during which the snippet is accessible.views
field shows how many additional views are allowed for this snippet (excluding the current one).
<span id="time_restriction"> ... </span>
in case the time restriction is applied.<span id="views_restriction"> ... </span>
in case the views restriction is applied.