Class: Delicious::Console

Inherits:
Thor
  • Object
show all
Includes:
API::Authentication, API::Client, API::Parser, Thor::Actions
Defined in:
lib/delicious-console/console.rb

Instance Method Summary collapse

Methods included from API::Client

post_add, posts_all

Methods included from API::Parser

response

Methods included from API::Authentication

authenticate, filename, make_setup!

Instance Method Details

#add(url, description) ⇒ Object



20
21
22
23
24
# File 'lib/delicious-console/console.rb', line 20

def add(url, description)
  request, connection = Delicious::API::Client.post_add(url, description)
  response = Delicious::API::Authentication.authenticate(request, connection)
  puts response
end

#postsObject



11
12
13
14
15
# File 'lib/delicious-console/console.rb', line 11

def posts
  request, connection = Delicious::API::Client.posts_all
  response = Delicious::API::Authentication.authenticate(request, connection)
  puts Delicious::API::Parser.response(response.body)
end