Hi Brett,

Well - that was just an example.  If you already used the entry
variable name, you could use something else.  In this case, 'entry'
should represent a CalendarEntry from the calendar meta-feed (notice
the example method retrieves /calendar/feeds/default rather than
something like /calendar/feeds/default/private/full).

Have you taken a look at the full method posted?  This retrieves the
meta feed and looks through each calendar and prints out the title and
access level.

Cheers,

-Ryan


On Apr 1, 3:02 pm, "brettmoreton2111" <[EMAIL PROTECTED]>
wrote:
> Hi Ryan thanks for your reply, however i'm still having some problems:
>
> entry.getTitle().getPlainText()); is returning the title of the last
> event inserted
> entry.getAccessLevel().getValue());  is causing a NullPointerException
>
> does the entry.getAccessLevel refer to the calendar or an individual
> entry within the calendar?
>
> i'm creating a web application using AuthSub login, if that makes any
> difference?
>
> thanks
>
> On Apr 1, 7:59 pm, "Ryan Boyd (Google)" <[EMAIL PROTECTED]> wrote:
>
> > 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