I need to integrate my rails 3 application with google calendar. The following are requirements of the application:
- Within my application I can create calendar events and invite people (pretty m开发者_如何学Gouch most of the google calendar features).
- I want to be able to pull a users existing google calendars and sync? (potentially).
- I need to ability to show the calendar in different forms (daily, weekly, monthly) and put additional graphics in the calendar.
- I need to use items created in the calendar for other features and functions. Specifically I need to keep track of a calendar item with something in my database. For example, the ID of a new appointment is tied to a user's foo in my database.
At first I was thinking that I should just bring in google calendar into my application (directly into a div) but then with #4 I really need much more than that.
I found the following http://cookingandcoding.com/docs/gcal4ruby/ (for API integration)
and
http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php (for the visual display of calendars)
Before I go down this path I wanted to see if others had input on this. I'm mostly concerned about how to architect this solution, specifically:
- let's assume I use the api listed above to create a calendar specifically for my application in google calendar and I interface with this single calendar.
- let's also assume that I can create events in that calendar, get the ID back from google calendar and place that ID of each event in my database (where I need to store it and make reference to specific events I've created).
- I also want to bring in existing calendars from the user (and resync them). Can this API do that?
Are these the right tools for this architecture?
Also I think I need to use omniauth so that I don't have to store the users google calendar user name and password.
Another JQuery Calendar plugin you might want to look at is Full Calendar. There is even a demo project that provides code to integrate it with Rails 3 available on GitHub
精彩评论