Dear friends

I started to work 2 moths ago in a ANSI C implementation of a google
calendar library (since at that time I was not aware of any C library
to do that).

I have succeeded to implement the following operations:

 - authentication
 - get all events
 - atom stream parsing
 - access to individual events).

You can see an example of use here: http://pastebin.com/m2654d0c6
and access the git repository here: http://repo.or.cz/w/libgcal.git

The code was written using TDD (Test Driven Development) and has a
unit test coverage of 85%. It depends only on libxml and libcurl, and
features support to pkg-config. The license is BSD and its going to be
free software and the library is tentatively named libgcal.

Currently, I'm struggling to implement 'adding a new entry'
functionality.

There is a part of google calendar protocol specification that I think
is a little bit confusing. In 'creating single occurrence events',
there is the following paragraph:

"
If you received the redirect, then send the same POST request again,
with the same Authorization header and the same content, but with the
gsessionid parameter appended.
"

I assume that gsessionid should be added in the HTTP header. And so I
did it, sending a new request with the following header (source code
gcal.c:gcal_create_event, in line 594):

"
Authorization: GoogleLogin
auth=DQAAAHMAAADMep7apQOyMvWP0Cn06ObGT1gmQfMOA4r9YVREwlFnDE9T6gjsuG9EyMG85-
dTMJgSsplKnelETp73GKo5t8M3SObzAXhsET1WG9sVdnzFOGJvZK6V6kCxPPpIXbKlRGCO39sD8HSis2uo1wsUOUlQvQtXN9y_Nj9a_rh3otNhAQ
 gsessionid=xKH9fRV783hSfG5lBhT9nw
"

But the request fails with HTTP code 401 and returns a webpage with
"Token invalid".

Any of you guys known what is missing or what I did wrong here?


Best regards



Adenilson Cavalcanti
ps: after cloning the repository, to compile the code and run the unit
tests you should do:

$autoreconf -i -f
$mkdir build
$cd build
$../configure --enable-devel
$make check

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to