Module: Zimbra
- Defined in:
- lib/zimbra.rb,
lib/zimbra/acl.rb,
lib/zimbra/cos.rb,
lib/zimbra/auth.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/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: HandsoapAccountNamespaces, HandsoapAccountUriOverrides, HandsoapErrors, HandsoapNamespaces, HandsoapUriOverrides Classes: A, ACL, Account, AccountService, Appointment, AppointmentService, Auth, AuthService, Boolean, Calendar, CalendarService, Cos, CosService, DateHelpers, DelegateAuthToken, DelegateAuthTokenService, DistributionList, DistributionListService, Domain, DomainService, Folder, FolderService, HandsoapAccountService, HandsoapService, Hash
Constant Summary collapse
- VERSION =
"0.0.6"
Class Method Summary collapse
- .account_api_url ⇒ Object
- .account_api_url=(url) ⇒ Object
- .account_auth_token ⇒ Object
- .account_login(username) ⇒ Object
-
.admin_api_url ⇒ Object
The URL that will be used to contact the Zimbra SOAP service.
-
.admin_api_url=(url) ⇒ Object
Sets the URL of the Zimbra SOAP service.
-
.auth_token ⇒ Object
Authorization token - obtained after successful login.
-
.debug ⇒ Object
Whether debugging is enabled.
-
.debug=(val) ⇒ Object
Turn debugging on/off.
-
.login(username, password) ⇒ Object
Log into the zimbra SOAP service.
-
.reset_login(username, password) ⇒ Object
re-log into the zimbra SOAP service.
Class Method Details
.account_api_url ⇒ Object
31 32 33 |
# File 'lib/zimbra.rb', line 31 def account_api_url @@account_api_url end |
.account_api_url=(url) ⇒ Object
35 36 37 |
# File 'lib/zimbra.rb', line 35 def account_api_url=(url) @@account_api_url = url end |
.account_auth_token ⇒ Object
57 58 59 |
# File 'lib/zimbra.rb', line 57 def account_auth_token @@account_auth_token end |
.account_login(username) ⇒ Object
73 74 75 76 77 78 |
# File 'lib/zimbra.rb', line 73 def account_login(username) delegate_auth_token = DelegateAuthToken.for_account_name(username) return false unless delegate_auth_token @@account_auth_token = delegate_auth_token.token true end |
.admin_api_url ⇒ Object
The URL that will be used to contact the Zimbra SOAP service
23 24 25 |
# File 'lib/zimbra.rb', line 23 def admin_api_url @@admin_api_url end |
.admin_api_url=(url) ⇒ Object
Sets the URL of the Zimbra SOAP service
27 28 29 |
# File 'lib/zimbra.rb', line 27 def admin_api_url=(url) @@admin_api_url = url end |
.auth_token ⇒ Object
Authorization token - obtained after successful login
53 54 55 |
# File 'lib/zimbra.rb', line 53 def auth_token @@auth_token end |
.debug ⇒ Object
Whether debugging is enabled
48 49 50 |
# File 'lib/zimbra.rb', line 48 def debug @@debug ||= false end |
.debug=(val) ⇒ Object
Turn debugging on/off. Outputs full SOAP conversations to stdout.
Zimbra.debug = true
Zimbra.debug = false
42 43 44 45 |
# File 'lib/zimbra.rb', line 42 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
63 64 65 66 |
# File 'lib/zimbra.rb', line 63 def login(username, password) return @@auth_token if defined?(@@auth_token) && @@auth_token reset_login(username, password) end |
.reset_login(username, password) ⇒ Object
re-log into the zimbra SOAP service
69 70 71 |
# File 'lib/zimbra.rb', line 69 def reset_login(username, password) @@auth_token = Auth.login(username, password) end |