Package com.google.api.gwt.services.calendar.shared.Calendar

Examples of com.google.api.gwt.services.calendar.shared.Calendar.EventsContext


  }

  /** Insert a new event for the given calendar ID. */
  private void insertEvent(final String calendarId) {
    String today = DateTimeFormat.getFormat("yyyy-MM-dd").format(new Date());
    EventsContext ctx = calendar.events();
    Event event = ctx.create(Event.class)
        .setSummary("Learn about the Google API GWT client library")
        .setStart(ctx.create(EventDateTime.class).setDateTime(today))
        .setEnd(ctx.create(EventDateTime.class).setDateTime(today));

    // Note that the EventsContext used to insert the Event has to be the same one used to create
    // it.
    ctx.insert(calendarId, event).fire(new Receiver<Event>() {
      @Override
      public void onSuccess(Event inserted) {
        // The event has been inserted.

        // Now we'll demonstrate retrieving it and updating it.
View Full Code Here


    });
  }

  /** Get an event for the purposes of updating it. */
  private void getEventForUpdate(final String calendarId, final String eventId) {
    final EventsContext ctx = calendar.events();
    ctx.get(calendarId, eventId).fire(new Receiver<Event>() {
      @Override
      public void onSuccess(Event event) {
        // Note that the EventsContext used to update the event has to be the same one that was
        // used to retrieve it.
        updateEvent(ctx, event, calendarId, eventId);
View Full Code Here

TOP

Related Classes of com.google.api.gwt.services.calendar.shared.Calendar.EventsContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.