# Tumblr-2.2.0

**URL:** <https://www.ruby-forum.com/t/tumblr-2-2-0/178635>\
**Category:** Ruby\
**Created:** [November 8, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/tumblr-2-2-0/178635 "2009-11-08T16:49:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahoward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/779978/32.png) [@ahoward](https://www.ruby-forum.com/u/ahoward)\
**Post date:** [November 8, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/tumblr-2-2-0/178635/1 "2009-11-08T16:49:44Z")

</div>

2.2.0 introduces support for delete operations (thanks to  
[jordelver (Jordan Elver) · GitHub](http://github.com/jordelver))

NAME  
tumblr

SYNOPSIS  
tumblr (setup|write|read|authenticate|check-vimeo|check-audio)  
[options]+

DESCRIPTION  
tumblr.rb is a command line utility and library which interfaces to  
the  
excellent tumblr blogging platform @ [http://www.tumblr.com](http://www.tumblr.com)

tumblr.rb implements the complete restful api in both library and  
command line utility, doccumented in full @ [API | Tumblr](http://www.tumblr.com/api)

=== install ===

```
gem install tumblr

```

=== cli ===

```
the cli exactly mirrors the library api. arguments are passed to 

```

each  
method as ‘key=val’ pairs, values may be read from files using the  
syntax ‘key=file=val’ or ‘key==val’

```
you should first cache your login info to avoid having to pass it 

```

everytime

```
  cfp: ~> tumblr setup --email=my_email --password=my_password

```

–name=drawohara  
/Users/ahoward/.tumblr.yml

```
you can post

  cfp: ~> tumblr write regular title=testing body=rock_on

you can post from files

  cfp: ~> tumblr write regular title=slurp body==./post.html

you can read

  cfp: ~> tumblr read start=42 num=42

you can delete a post

    cfp: ~> tumblr delete post-id=42

you can test the auth

  cfp: ~> tumblr authenticate

etc.

```

=== api ===

```
it's pretty simple. here's a start, use the web docs to figure out 

```

the  
rest

```
  config = {
    :email => my_email,
    :password => my_password,
    :name => 'drawohara'
  }

  tumblr = Tumblr.for config

  abort unless tumblr.uri == 'http://drawohara.tumblr.com'

  response = tumblr.write :regular, :title = title, :body => body

  video = open 'video.mpg'
  response = tumblr.write :video, :data => video, :title => 

```

video.path

```
  response = tumblr.read :start => 42, :num => 42
  xml = response.content

  response = tumblr.read :start => 42, :num => 42, :json => true
  json = response.content

```

PARAMETERS  
–name=name, -n (0 ~\> name)  
–email=email, -e (0 ~\> email)  
–password=password, -p (0 ~\> password)  
–debug, -d  
–json, -j  
–help, -h
