locked
Calendar Events only bring back one event per calendar? RRS feed

  • Question

  • Hi

    I am trying to get all events for each calendar however I only seem to be getting back 1 event for each calendar??? here is my code.

    private async void GetCalendarEvents() { int c = 0; while (c < MyCalendars.Count()) { try {

    LiveConnectClient liveClient = new LiveConnectClient(App.Session); LiveOperationResult operationResult = await liveClient.GetAsync(MyCalendars[c].ID + "/events"); dynamic result = operationResult.Result; List<object> data = (List<object>)result.data; foreach (IDictionary<string, object> folders in data) { CalendarEvents calendareventitem = new CalendarEvents(); calendareventitem.ID = (string)folders["id"]; calendareventitem.EventName = (string)folders["name"]; calendareventitem.Location = (string)folders["location"]; calendareventitem.Description = (string)folders["description"]; calendareventitem.StartTime = (string)folders["start_time"]; calendareventitem.EndTime = (string)folders["end_time"]; calendareventitem.AllDayEvent = (bool)folders["is_all_day_event"]; calendareventitem.Recurrence = (string)folders["recurrence"]; MyCalendars[c].MyCalendarEvents.Add(calendareventitem); } c++; } catch (LiveConnectException exception) { c++; } // }



    Juan Rodriguez Celltrac Software

    Wednesday, June 27, 2012 1:19 AM

Answers

  • That's correct. With the possibility of recurrent events, we have to keep the APIs in check with that.
    Wednesday, June 27, 2012 3:55 AM

All replies

  • I have actually found the issue with getting all events however it seems that if I use "start_time=2012-01-01T00:00:00Z&end_time=2012-12-31T00:00:00Z"

    it only brings back the first 4 months is there a limit on the amount of months you can ask for?


    Juan Rodriguez Celltrac Software

    Wednesday, June 27, 2012 1:53 AM
  • That's correct. With the possibility of recurrent events, we have to keep the APIs in check with that.
    Wednesday, June 27, 2012 3:55 AM
  • hi

    I am trying to get all events from a calendar, but i got java.lang.NullPoniterException. Here is my code:

      LiveSdkSampleApplication app = (LiveSdkSampleApplication) getApplication();
    mConnectClient = app.getConnectClient();
    mOperationListener = new OperationListener();

      mConnectClient.getAsync(calenderID+"/events?start_time=2014-08-01T00:00:00Z&amp;end_time=2014-08-30T00:00:00Z",mOperationListener);

    but if i use 

      mConnectClient.getAsync(calenderID+"/events",mOperationListener);

    i got the result but it show future events. I want to show all the events between two dates.

    Please tell me where is wrong....
    Thursday, August 28, 2014 12:42 PM