Exposes xState state charts as REST Hypermedia API using SIREN.
Lists all known xState charts.
The gist must be public. xState Viz saved state charts can be loaded for now.
Fetches the given gist machine.js
and generates a form to fill its context.
The forms action points to POST /<gist>
Fetches the given gist machine.js
file and builds it with the given context
variables.
Gist: 631ecba85437bb21a24ae86f67595623
POST response "self" link points to POST original URL (incl. query). Shouldn't it point to the resources URL instead?
You can create a new state chart service by calling
POST /<chart>
Just send an Authorization: Basic
HTTP header with your request.
When you want to interact with the service again, you have to send the same
Authorization header with every request.
Note: Protected services can not be made public at the moment. It's also not possible at the moment to protect publicly created services.
A possible way to add such functionality via middleware would be to annotate the
possible actions for a resource. When its currently not protected the middleware
could inject an action to a PUT /protect
endpoint and for protected services
a DELETE /protect
to remove the protection or PATCH /protect
to change the
credentials.
Future versions of the API could also support ACL scenarios for services. So some users could then just read the service state and get updates but would not be able to change it/delete it.
Gets the wallpaper of the day from Bing.
param | description |
---|---|
daysBack |
can range from 0..7 . Defaults to 0 |
This can be used in CSS like:
html {
height: 100vh;
width: 100vw;
}
body {
height: 100%;
width: 100%;
background-size: cover;
background-image: url(https://restlr.io/bing)
}