Project

leif

0.0
No commit activity in last 3 years
No release in over 3 years
A hypermedia browser for the CloudApp Collection+JSON API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 0.8.8
~> 1.6.19
 Project Readme

Leif

A hypermedia browser for the CloudApp Collection+JSON API.

Requirements

leif requires Ruby 1.9.3 or greater. Windows is not yet supported. If you're willing to lend a hand, we'd love to officially support it.

Installation

$ gem install leif
$ leif

leif includes a man page. Read it on the web or install gem-man:

$ gem install gem-man
$ gem man leif

Interactive Commands

  • root: Go back to the root.

  • 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.

Example

The UI is weak at this point and not very intuitive. To get started, here's a sample workflow. It should give you a general overview of what's possible.

$ leif
...

-- Links --
  account, authorization

> follow authorization
...

> basic arthur@dent.com
Password: *****
...
{
  "name": "token",
  "value": "2c2p2B2Y0U3y3c2c"
},
...

> token 2c2p2B2Y0U3y3c2c
...

-- Links --
  drops, drops-template, stream, store

> follow drops
...

> create
...
Fill the template to create a new item.
name [null]: New Drop
private [null]: false
trash [false]:
bookmark_url [null]: http://getcloudapp.com
file_size [null]:
...

> items
...
Select this item [y,n]? y

-- Links --
  collection, canonical, icon

> follow collection
...

> items
...
Select this item [y,n]? y
...

> update
...
Fill the template to update the item.
name ["New Drop"]: Updated Drop
private [false]:
trash [false]:
bookmark_url [null]:
file_size [null]:
...

> root
...
-- Links --
  drops, drops-template, account, stream