Skip to content

Instantly share code, notes, and snippets.

@marbemac
Created October 13, 2016 19:55
Show Gist options
  • Save marbemac/8ab63f09d04073bb4f8c17de91d3a585 to your computer and use it in GitHub Desktop.
Save marbemac/8ab63f09d04073bb4f8c17de91d3a585 to your computer and use it in GitHub Desktop.
random github gist flow
{
"name": "Random Github Gist",
"steps": [
{
"functions": [
{
"name": "List gists and save random id",
"input": {
"request": {
"method": "get",
"url": "https://api.github.com/gists"
}
},
"after": {
"script": "_.set(state, 'randomGist.id', _.sample(response.body).id);"
}
}
]
},
{
"functions": [
{
"name": "Get the random gist",
"input": {
"request": {
"method": "get",
"url": "https://api.github.com/gists/<<randomGist.id>>"
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment