1. leif(1)
  2. leif(1)

NAME

leif - A hypermedia browser for the CloudApp Collection+JSON API.

SYNOPSIS

leif [--insecure] [url]

DESCRIPTION

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.

OPTIONS

--insecure
Do not attempt to verify SSL certificates.

INTERACTIVE COMMANDS

root

Go back to the root.

reload

Make a GET request to the last request URI.

follow rel

Follow link with the relation rel on the collection or selected item.

create

Begin editing the template to create a new item.

update

Begin editing the template to update the item selected with items.

request

Print the HTTP headers of the last request.

response

Print the HTTP headers of the last response.

body

Print the HTTP body of the last response.

collection

Print the collection from the last response.

template

Print the template from the last response.

items

Print each item from the last response one at a time in order to update or follow an item's link.

item

Print 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 token

Authenticate using the given token and reload the current resource.

help

Print available commands.

quit

Exit leif.

EXAMPLES

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"
  1. August 2013
  2. leif(1)