Class: Googletastic::Group
Constant Summary
Constants included from Mixins::Namespaces
Mixins::Namespaces::NAMESPACES
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#system_group ⇒ Object
Returns the value of attribute system_group.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Base
#acl, #attachment_path, #created_at, #etag, #head, #id, #keep_raw, #raw, #response, #synced_with, #updated_at
Attributes included from Mixins::Attributes
Class Method Summary collapse
Methods inherited from Base
Methods included from Mixins::Pagination
Methods included from Mixins::Finders
Methods included from Mixins::Parsing
Methods included from Mixins::Requesting
Methods included from Mixins::Attributes
#attribute_names, #has_attribute?, #inspect
Methods included from Mixins::Namespaces
Constructor Details
This class inherits a constructor from Googletastic::Base
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/googletastic/group.rb', line 3 def description @description end |
#system_group ⇒ Object
Returns the value of attribute system_group.
3 4 5 |
# File 'lib/googletastic/group.rb', line 3 def system_group @system_group end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/googletastic/group.rb', line 3 def title @title end |
Class Method Details
.client_class ⇒ Object
11 12 13 |
# File 'lib/googletastic/group.rb', line 11 def client_class "Contacts" end |
.index_url ⇒ Object
7 8 9 |
# File 'lib/googletastic/group.rb', line 7 def index_url "http://www.google.com/m8/feeds/groups/default/full" end |
.unmarshall(xml) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/googletastic/group.rb', line 24 def unmarshall(xml) records = xml.xpath("//atom:entry", ns_tag("atom")).collect do |record| id = record.xpath("atom:id", ns_tag("atom")).first.text title = record.xpath("atom:title", ns_tag("atom")).first.text description = record.xpath("atom:content", ns_tag("atom")).first.text system_group = record.xpath("gContact:systemGroup").first system_group = system_group["id"] unless system_group.nil? Googletastic::Group.new( :id => id, :title => title, :description => description, :system_group => system_group ) end records end |
.valid_queries ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/googletastic/group.rb', line 16 def valid_queries { :order => "orderby", :sort => "sortorder", :group => "group" }.merge(super) end |