Skip to content

get_all_events gets result -1 #91

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 maverick...@gmail.com on 6 Aug 2012 at 11:44

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions