Class: AutoTagging::Delicious

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_tagging/delicious.rb

Constant Summary collapse

API_HOST =
'api.del.icio.us'
API_PAGE =
'/v1/posts/suggest'

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.passwordObject

Returns the value of attribute password.



11
12
13
# File 'lib/auto_tagging/delicious.rb', line 11

def password
  @password
end

.usernameObject

Returns the value of attribute username.



11
12
13
# File 'lib/auto_tagging/delicious.rb', line 11

def username
  @username
end

Class Method Details

.credentials=(credentials) ⇒ Object



13
14
15
16
# File 'lib/auto_tagging/delicious.rb', line 13

def credentials=(credentials)
	self.username = credentials.keys[0]
	self.password = credentials.values[0]
end

Instance Method Details

#get_tags(opts) ⇒ Object



19
20
21
# File 'lib/auto_tagging/delicious.rb', line 19

def get_tags(opts)			
	AutoTagging::SearchParam.url_search?(opts) ? api_request(url(opts)) : []
end