Module: Zimbra

Defined in:
lib/zimbra.rb,
lib/zimbra/acl.rb,
lib/zimbra/cos.rb,
lib/zimbra/auth.rb,
lib/zimbra/base.rb,
lib/zimbra/alias.rb,
lib/zimbra/domain.rb,
lib/zimbra/folder.rb,
lib/zimbra/account.rb,
lib/zimbra/version.rb,
lib/zimbra/calendar.rb,
lib/zimbra/ext/hash.rb,
lib/zimbra/directory.rb,
lib/zimbra/ext/string.rb,
lib/zimbra/appointment.rb,
lib/zimbra/common_elements.rb,
lib/zimbra/handsoap_service.rb,
lib/zimbra/appointment/alarm.rb,
lib/zimbra/appointment/reply.rb,
lib/zimbra/distribution_list.rb,
lib/zimbra/appointment/invite.rb,
lib/zimbra/extra/date_helpers.rb,
lib/zimbra/delegate_auth_token.rb,
lib/zimbra/appointment/attendee.rb,
lib/zimbra/appointment/recur_rule.rb,
lib/zimbra/handsoap_account_service.rb,
lib/zimbra/appointment/recur_exception.rb

Overview

Defined Under Namespace

Modules: Directory, HandsoapAccountNamespaces, HandsoapAccountUriOverrides, HandsoapErrors, HandsoapNamespaces, HandsoapUriOverrides Classes: A, ACL, Account, AccountService, Alias, Appointment, AppointmentService, Auth, AuthService, Base, BaseService, Boolean, Calendar, CalendarService, Cos, CosService, DateHelpers, DelegateAuthToken, DelegateAuthTokenService, DirectoryService, DistributionList, DistributionListService, Domain, DomainService, Folder, FolderService, HandsoapAccountService, HandsoapService, Hash, String

Constant Summary collapse

VERSION =
'0.7.9'

Class Method Summary collapse

Class Method Details

.account_api_urlObject



36
37
38
# File 'lib/zimbra.rb', line 36

def 
  @@account_api_url
end

.account_api_url=(url) ⇒ Object



40
41
42
# File 'lib/zimbra.rb', line 40

def (url)
  @@account_api_url = url
end

.account_auth_tokenObject



71
72
73
# File 'lib/zimbra.rb', line 71

def 
  @@account_auth_token
end

.account_login(username) ⇒ Object



87
88
89
90
91
92
# File 'lib/zimbra.rb', line 87

def (username)
  delegate_auth_token = DelegateAuthToken.(username)
  return false unless delegate_auth_token
  @@account_auth_token = delegate_auth_token.token
  true
end

.admin_api_urlObject

The URL that will be used to contact the Zimbra SOAP service



28
29
30
# File 'lib/zimbra.rb', line 28

def admin_api_url
  @@admin_api_url
end

.admin_api_url=(url) ⇒ Object

Sets the URL of the Zimbra SOAP service



32
33
34
# File 'lib/zimbra.rb', line 32

def admin_api_url=(url)
  @@admin_api_url = url
end

.auth_tokenObject

Authorization token - obtained after successful login



63
64
65
# File 'lib/zimbra.rb', line 63

def auth_token
  @@auth_token
end

.auth_token=(token) ⇒ Object

Checking if we can update the token



58
59
60
# File 'lib/zimbra.rb', line 58

def auth_token=(token)
  @@auth_token = token
end

.debugObject

Whether debugging is enabled



53
54
55
# File 'lib/zimbra.rb', line 53

def debug
  @@debug ||= false
end

.debug=(val) ⇒ Object

Turn debugging on/off. Outputs full SOAP conversations to stdout.

Zimbra.debug = true
Zimbra.debug = false


47
48
49
50
# File 'lib/zimbra.rb', line 47

def debug=(val)
  Handsoap::Service.logger = (val ? $stdout : nil)
  @@debug = val
end

.login(username, password) ⇒ Object

Log into the zimbra SOAP service. This is required before any other action is performed If a login has already been performed, another login will not be attempted



77
78
79
80
# File 'lib/zimbra.rb', line 77

def (username, password)
  return @@auth_token if defined?(@@auth_token) && @@auth_token
  (username, password)
end

.reset_login(username, password) ⇒ Object

re-log into the zimbra SOAP service



83
84
85
# File 'lib/zimbra.rb', line 83

def (username, password)
  @@auth_token, @@session_lifetime = Auth.(username, password)
end

.session_lifetimeObject



67
68
69
# File 'lib/zimbra.rb', line 67

def session_lifetime
  @@session_lifetime
end