class GoogleContactsApi::User

Attributes

api[R]

Public Class Methods

new(oauth) click to toggle source
# File lib/google_contacts_api/user.rb, line 7
def initialize(oauth)
  @api = GoogleContactsApi::Api.new(oauth)
end

Public Instance Methods

contacts(params = {}) click to toggle source

Return the contacts for this user and cache them.

# File lib/google_contacts_api/user.rb, line 12
def contacts(params = {})
  # contacts in this group
  @contacts ||= get_contacts(params)
end
contacts!(params = {}) click to toggle source

Return the contacts for this user, retrieving them again from the server.

# File lib/google_contacts_api/user.rb, line 18
def contacts!(params = {})
  # contacts in this group
  @contacts = nil
  contacts(params)
end
groups(params = {}) click to toggle source

Return the groups for this user and cache them.

# File lib/google_contacts_api/user.rb, line 25
def groups(params = {})
  @groups ||= get_groups(params)
end
groups!(params = {}) click to toggle source

Return the groups for this user, retrieving them again from the server.

# File lib/google_contacts_api/user.rb, line 30
def groups!(params = {})
  @groups = nil
  groups(params)
end