Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_all_events gets result -1 #91

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments
Open

get_all_events gets result -1 #91

GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

I'm using this peace of code to get all events of my calender, but i always get 
-1 result when calling gcal_get_events, the weird thing is that i have two 
google accounts, and this works for one of them and not for the other.

        /* Create a gcal 'object' and authenticate with server */
        if (!(gcal = gcal_new(GCALENDAR)))
                exit(1);
        if (argc == 3)
                result = gcal_get_authentication(gcal, argv[1], argv[2]);
        else
                result = gcal_get_authentication(gcal, (char*)"user", (char*)"password");

        if (result!=0){
                printf("AUTHENTICATION - ERROR (HTTP code: %d | msg: %s) - result=%d.\n", gcal_status_httpcode(gcal),gcal_status_msg(gcal),result);
                return -1;
        }

        printf("AUTHENTICATION: OK\n");

        result = gcal_get_events(gcal, &all_events);

        if (result!=0){
                printf("GET EVENTS - ERROR (HTTP code: %d | msg: %s) - result=%d.\n", gcal_status_httpcode(gcal),gcal_status_msg(gcal),result);
                return -1;
        }

Original issue reported on code.google.com by [email protected] on 6 Aug 2012 at 11:44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant