I've updated GoogleCal - my ColdFusion API for Google's Calendar service. It now "officially" supports adding events. I also added code to retrieve all the calendars for a user.
Let me take this opportunity to once again complain about Google's API. I've already complained about their Add Entry API (it requires 3 HTTP calls).
Today I discovered yet another issue. To get a calendar, let's say calendar A, you have a URL X. This URL does not require authentication, which by itself is a cool idea. It means you can share the URL with others. However - that is the only URL you have. There is no option to use a URL that requires authentication.
So guess what - the URL to add an entry does not have the authentication token in it. You use it along with a username/password value to add your data.
So in case it isn't clear - what this means is that for one calendar you have 2 different URLs. One for reading and one for adding. What is even better is that you can't get the "Add Entry" URL yourself unless you manually modify the "Read" URL.
Total. Pain. In. The. Rear.
Anyway - enjoy the updated version. I'll be happily switching back to more Yahoo demos this week.
Archived Comments
Can you confirm that this does NOT work with Coldfusion 6.1? I get an "Attribute validation error for tag http. The tag does not have an attribute called result." The result attribute is new to CF 7. Is there any way to make this compatible with CF 6.1? Thanks!
That is confirmed. To make it work for cfmx 6, remove any result= and use cfhttp. instead of result. in the code. It won't be as threadsafe anymore but it should work fine then.
I am a little confused about caching with google cal.
I ran the testa.cfm file with the public holidays calendar url, and it worked fine, but when I changed the URL to my calendar, it still shows the output for the Holiday calendar. I cleared the browser cache, and CF template cache, but it still shows the holiday info. So I took out the url all together, and it still shows the holiday info...
thoughts?
Russ
Did you pass use ?reinit=1 in the URL? The caching I used there isn't specific to googlcal per se, I just wanted it to be a bit fster for playing with it.