BTW-- to access this information in the Java Client lib, you can do:
entry.getAccessLevel().getValue())

Here's a modified version of the sample/calendar/
CalendarClient::printUserCalendars method that outputs the accesslevel
as well.

  /**
   * Prints a list of all the user's calendars.
   *
   * @param service An authenticated CalendarService object.
   * @throws Exception If an error occurs during feed retrieval.
   */
  private static void printUserCalendars(CalendarService service)
      throws Exception {
    URL feedUrl = new URL("http://www.google.com/calendar/feeds/
default");

    new
CalendarFeed().declareExtensions(service.getExtensionProfile());

    // Send the request and receive the response:
    CalendarFeed resultFeed = service.getFeed(feedUrl,
CalendarFeed.class);

    System.out.println("Your calendars:");
    System.out.println();
    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      CalendarEntry entry = resultFeed.getEntries().get(i);
      System.out.println("\t" + entry.getTitle().getPlainText());
      System.out.println("\t" + entry.getAccessLevel().getValue());
    }
    System.out.println();
  }


Cheers,

-Ryan

On Apr 1, 11:50 am, "Ryan Boyd (Google)" <[EMAIL PROTECTED]> wrote:
> Yes, there is a <gCal:accesslevel...> element in the calendar meta-
> feed (when authenticated):http://www.google.com/calendar/feeds/default
>
> The documentation on gCal::accesslevel is 
> at:http://code.google.com/apis/calendar/reference.html#gcal_reference
>
> Note, there is also an additional access level which is called
> 'root'.  This is held by a domain admin of Google Apps for all
> calendars on their domain.  It has the same privileges as 'manager'.
> Also, note, 'contributor' should be 'editor'.  These bugs have been
> filed against our documentation.
>
> Cheers,
>
> -Ryan
>
> On Apr 1, 9:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > is there an API call which will allow me to check the permission I
> > have on a certain calendar?
>
> > I want to know if a calendar is read-only before i try and insert an
> > event into it, via the API.
>
> > Thanks


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