Created
June 4, 2015 15:40
-
-
Save kevinswiber/77a544d75332c339b0d5 to your computer and use it in GitHub Desktop.
Siren Hypermedia on the Command Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl http://zetta-cloud-2.herokuapp.com | \ | |
| json links | \ | |
| json -ac 'this.rel.indexOf("http://rels.zettajs.io/server") > -1 && this.title == "Detroit"' | \ | |
| json href | \ | |
| xargs curl | \ | |
| json entities | \ | |
| json -ac 'this.rel.indexOf("http://rels.zettajs.io/device") > -1 && this.class.indexOf("light") > -1' | \ | |
| json links | \ | |
| json -ac 'this.rel.indexOf("self") > -1' | \ | |
| json href | \ | |
| xargs curl | \ | |
| json links | \ | |
| json -c 'this.rel.indexOf("monitor") > -1' | \ | |
| json -a title href | \ | |
| column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment