On 6 Nov., 00:26, Trevor Johns <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 2:16 AM, Danelund <[EMAIL PROTECTED]> wrote:
> > There isn't any way that I can post data to the google batch schema
> > using javascript?
>
> Unfortunately, no. The JavaScript client library doesn't support batch
> requests at the moment.
>
> --
> Trevor Johns

Would it be impossible to do something like:

              // Create the calendar service object
              var calendarService = new
google.gdata.calendar.CalendarService('SomeCal');

              // The default "private/full" feed is used to update
existing event from the
              // primary calendar of the authenticated user
              var feedUri = 'http://www.google.com/calendar/feeds/
default/private/full';

              // Create a CalendarEventQuery, and specify that this
query is
              // applied toward the "private/full" feed
              var query = new
google.gdata.calendar.CalendarEventQuery(feedUri);

              // Set the query with the query text
              query.setFullTextQuery(searchText);

              // Flag to indicate whether a match is found
              var eventFound = false;

              // Flag to indicate whether a match is found
              var eventFound = false;

              // This callback method that will be called when
getEventsFeed() returns feed data
              var callback = function(result) {

                  // Obtain the array of matched CalendarEventEntry
                  var entries = result.feed.entry;

                  // If there is matches for the full text query
                  if (entries.length > 0) {

                      // update the first matched event's title
                      var event1 = entries[0];
                      var event2 = entries[1];
                      event1.updateEntry(
        function(result) {
                      document.getElementById("information").innerHTML
+= (event1.getTitle().getText());
        },
        handleError
    );
event2.updateEntry(
        function(result) {
                      document.getElementById("information").innerHTML
+= (event2.getTitle().getText());
        },
        handleError
    );
                  } else {
                      // No match is found for the full text query
                  document.getElementById("information").innerHTML +=
(' ' + 'Cannot find event(s) with text: ' + searchText);
                  }
              }

              // Error handler to be invoked when getEventsFeed() or
updateEntry()
              // produces an error
              var handleError = function(error) {
                  PRINT(error);
              }

              // Submit the request using the calendar service object
              calendarService.getEventsFeed(query, callback,
handleError);
          }

--~--~---------~--~----~------------~-------~--~----~
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