leif - A hypermedia browser for the CloudApp Collection+JSON API.
leif [--insecure] [url]
leif is a program to explore the CloudApp hypermedia API. It was built so
developers could feel how the API flows to help them consume it in their
programs.
Provide a url to use as the API root. With no url option, the endpoint
https://api.getcloudapp.com is used.
--insecurerootGo back to the root.
reloadMake a GET request to the last request URI.
follow relFollow link with the relation rel on the collection or selected item.
createBegin editing the template to create a new item.
updateBegin editing the template to update the item selected with items.
requestPrint the HTTP headers of the last request.
responsePrint the HTTP headers of the last response.
bodyPrint the HTTP body of the last response.
collectionPrint the collection from the last response.
templatePrint the template from the last response.
itemsPrint each item from the last response one at a time in order to update
or follow an item's link.
itemPrint the selected item.
basic [username [password]]Authenticate with HTTP Basic and reload the current resource. Will be prompted for username and password if omitted.
token tokenAuthenticate using the given token and reload the current resource.
helpPrint available commands.
quitExit leif.
Follow a rel=account link on the collection:
> follow account
Select an item and follow its rel=collection link:
> items
Select this item [y,n]? y
> follow collection
Use HTTP Basic authentication and reload the current resource:
> basic
Username: arthur@dent.com
Password: ********
Set token authentication:
> token abc123def456
Create a new item filling the name and bookmark_url fields:
> create
Name (empty to submit): name
Value: CloudApp
Name (empty to submit): bookmark_url
Value: http://getcloudapp.com
Name (empty to submit):
Update an item filling the password field:
> items
Select this item [y,n]? y
> update
Name (empty to submit): password
Value: towel
Name (empty to submit):
JSON primitives (null, integers, and booleans) are interpreted as such. Use quotes for literal strings.
> create
Name (empty to submit): private
Value: true
Name (empty to submit): name
Value: "true"