Class: Flkr

Inherits:
Site show all
Defined in:
lib/tRuTag.rb

Instance Attribute Summary

Attributes inherited from Site

#attrib

Instance Method Summary collapse

Methods inherited from Site

#get_uml, #initialize, #required_attribute

Constructor Details

This class inherits a constructor from Site

Instance Method Details

#add_tags(tbin) ⇒ Object



400
401
402
403
404
405
406
407
408
409
410
# File 'lib/tRuTag.rb', line 400

def add_tags(tbin)
	#using Flickr api wrapper
	# gem install flickr
	required_attribute('email')
	
	require_gem 'flickr'

	flickr = Flickr.new                        
	user = flickr.users(@attrib['email'])
	user.tags.each { |x| tbin[x.downcase] = tbin.fetch(x.downcase, 0) +1 }
end