Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
2007!
Crankin will get that joke, he is to be thanked for assistance on this.
This is an open sourced wrapper for the Zimbra API. I only added functionality for CRUD on Calender Appointments, because that's all I needed for the job I'm getting done. However, the code already contained within the libraries for calendars and the structure make this an easily extensible gem if you need it for other purposes.
The API documentation I am using is located at
http://files.zimbra.com/docs/soap_api/8.0/soapapi-zimbra-doc/api-reference/index.html
Everybody who's interested in finally wrapping Zimbra well for Ruby, please download the gem and submit pull requests with more of the methods on this API built out(there are over 100.)
This gem is still in it's infancy and has little to no error handling! I appreciate all the help I can get on this project, Zimbra is big!
Add this line to your application's Gemfile:
gem 'em-zimbreasy'
And then execute:
$ bundle
Or install it yourself as:
$ gem install em-zimbreasy
It's pretty simple to use, I will post some examples:
zs = Em::Zimbreasy::Account.new('username', 'password', "https://yourzimbraserver.com/service/soap"); #login
zm = Em::Zimbreasy::Mail.new(zs); #create a Zimbreasy::Mail object. This has methods for the ZimbraMail submodule of their API.
z = zm.create_appointment({
:appointee_email => "neo@matrix.com",
:start_time => Time.now+1.days,
:end_time => (Time.now+1.days+1.hours),
:name => "Joss Whedon Meeting",
:subject => "Hallelujah",
:desc => "Ridiculous stuff happening here"
}) #I create an appointment.
=> "BEGIN:VCALENDAR\r\nCALSCALE:GREGORIAN\r\nPRODID:iCalendar-Ruby\r\nVERSION:2.0\r\nBEGIN:VEVENT\r\nDESCRIPTION:Poopmaster\r\nDTEND:20130208T171612\r\nDTSTAMP:20130207T161614\r\nDTSTART:20130208T161612\r\nCLASS:PRIVATE\r\nSEQUENCE:0\r\nSUMMARY:Jossss\r\nUID:336-335\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"
create_appointment returns ics formatted data, for use with icalendar. Notice that the UID in the data is 336-335. This is an invitation id, not an appointment id. The appointment id is 336, the first part of it.
The other methods of note:
zm.get_appointment(336) #takes appt id
zm.modify_appointment({
:appointee_email => "neo@matrix.com",
:start_time => Time.now,
:end_time => (Time.now+2.hours),
:name => "Joss Whedon!!!",
:subject => "Hallelujah 2: The Electric Boogaloo",
:desc => "Yoda Fights Back", :inv_id => "336-335"
})
zm.cancel_appointment("336-335")
You'll notice get_appointment uses an actual appointment id, whereas modify appt and cancel appt need inv ids. I don't know why this is, it seems Zimbra API only works with invitation, not appointment ids, when it comes to these methods. Get just needs appt ids. The final method of note is
zm.get_appt_summaries(Time.now-1.days, Time.now)
This just returns appointment Ics texts in an array. First arg is a Time object representing start date, second arg is end date.
It'd be great if someone could write tests for these methods, I haven't had the time. If you want to write tests, please do!
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that em-zimbreasy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.