Class: Collecta::Result
- Inherits:
-
Blather::Stanza::PubSub::Event
- Object
- Blather::Stanza::PubSub::Event
- Collecta::Result
- Defined in:
- lib/collecta/result.rb
Instance Method Summary collapse
Instance Method Details
#abstract ⇒ Object
15 16 17 |
# File 'lib/collecta/result.rb', line 15 def abstract self.entry.find('//ns:abstract', :ns => 'http://api.collecta.com/ns/search-0#results').first.inner_html.strip end |
#category ⇒ Object
11 12 13 |
# File 'lib/collecta/result.rb', line 11 def category self.entry.content_from '//ns:category', :ns => 'http://api.collecta.com/ns/search-0#results' end |
#entry ⇒ Object
19 20 21 |
# File 'lib/collecta/result.rb', line 19 def entry Blather::XMPPNode.new('event').inherit self.items.first.find_first('//ns:entry', :ns => 'http://www.w3.org/2005/Atom') end |
#query ⇒ Object
3 4 5 |
# File 'lib/collecta/result.rb', line 3 def query content_from('//ns:headers/ns:header[@name="x-collecta#query"]', :ns => 'http://jabber.org/protocol/shim').strip end |
#title ⇒ Object
7 8 9 |
# File 'lib/collecta/result.rb', line 7 def title self.entry.content_from '//ns:title', :ns => 'http://www.w3.org/2005/Atom' end |