Class: AutoTagging::Yahoo

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

Constant Summary collapse

API_SITE_URL =
'http://query.yahooapis.com/v1/public/yql'

Instance Method Summary collapse

Instance Method Details

#get_tags(content) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/auto_tagging/yahoo.rb', line 8

def get_tags(content)
  res = service_request(content)
  json_res = JSON.parse(res.body)
  tags = parse_response(res) if (json_res["query"]["count"] > 0)
  tags || []
rescue NoMethodError
  []
end