Sha256: 6ae9927052877466e9ce3021a8bcf98164b33d901e3ca7fb94759430d3832b30
Contents?: true
Size: 928 Bytes
Versions: 14
Compression:
Stored size: 928 Bytes
Contents
module GoogleContactsApi class Group < GoogleContactsApi::Result include GoogleContactsApi::Contacts # Populate from a single entry element in the result response # when requesting a set of Contacts def system_group? !self["gContact$systemGroup"].nil? end def contacts(params = {}) # contacts in this group @contacts ||= super({"group" => self.id}.merge(params)) end def contacts!(params = {}) # contacts in this group @contacts = super({"group" => self.id}.merge(params)) end # Returns the array of links, as link is an array for Hashie. def links self["link"].map { |l| l.href } end def self_link _link = self["link"].find { |l| l.rel == "self" } _link ? _link.href : nil end def edit_link _link = self["link"].find { |l| l.rel == "edit" } _link ? _link.href : nil end end end
Version data entries
14 entries across 14 versions & 1 rubygems