Example #1
0
 /// <summary>
 /// Returns the feed at the end URI specified.
 /// </summary>
 /// <param name="uri">the URI of the feed</param>
 /// <param name="shouldGetAllPages">if true, returns all the pages</param>
 /// <returns></returns>
 public AppsExtendedFeed QueryExtendedFeed(Uri uri, Boolean shouldGetAllPages)
 {
     try
     {
         Stream           feedStream = base.Query(uri);
         AppsExtendedFeed feed       = new AppsExtendedFeed(uri, this);
         feed.Parse(feedStream, AlternativeFormat.Atom);
         feedStream.Close();
         if (shouldGetAllPages)
         {
             if (true)
             {
                 AtomLink next, prev = null;
                 while ((next = feed.Links.FindService("next", null)) != null &&
                        next != prev)
                 {
                     feedStream = base.Query(new Uri(next.HRef.ToString()));
                     feed.Parse(feedStream, AlternativeFormat.Atom);
                     feedStream.Close();
                     prev = next;
                 }
             }
         }
         return(feed);
     }
     catch (GDataRequestException e)
     {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }
        /// <summary>
        /// overwritten Query method
        /// </summary>
        /// <param name="feedQuery">The FeedQuery to use</param>
        /// <returns>the retrieved NicknameFeed</returns>
        public NicknameFeed Query(NicknameQuery feedQuery)
        {
            try
            {
                Stream       feedStream = Query(feedQuery.Uri);
                NicknameFeed feed       = new NicknameFeed(feedQuery.Uri, this);
                feed.Parse(feedStream, AlternativeFormat.Atom);
                feedStream.Close();

                if (feedQuery.RetrieveAllNicknames)
                {
                    AtomLink next, prev = null;
                    while ((next = feed.Links.FindService("next", null)) != null && next != prev)
                    {
                        feedStream = Query(new Uri(next.HRef.ToString()));
                        feed.Parse(feedStream, AlternativeFormat.Atom);
                        feedStream.Close();

                        prev = next;
                    }
                }

                return(feed);
            }
            catch (GDataRequestException e)
            {
                AppsException a = AppsException.ParseAppsException(e);
                throw (a == null ? e : a);
            }
        }
Example #3
0
 /// <summary>
 /// Inserts a new user account entry into the specified feed.
 /// </summary>
 /// <param name="feed">the feed into which this entry should be inserted</param>
 /// <param name="entry">the entry to insert</param>
 /// <returns>the inserted entry</returns>
 public UserEntry Insert(UserFeed feed, UserEntry entry)
 {
     try {
         return(base.Insert(feed, entry) as UserEntry);
     } catch (GDataRequestException e) {
         AppsException a = AppsException.ParseAppsException(e);
         throw a ?? e;
     }
 }
Example #4
0
 /// <summary>
 /// Overridden Delete method that throws AppsException
 /// </summary>
 /// <param name="entry">the entry to delete</param>
 public void Delete(UserEntry entry)
 {
     try {
         base.Delete(entry);
     } catch (GDataRequestException e) {
         AppsException a = AppsException.ParseAppsException(e);
         throw a ?? e;
     }
 }
Example #5
0
 /// <summary>
 /// Overridden Delete method that throws AppsException
 /// </summary>
 /// <param name="uri">the URI to delete</param>
 public new void Delete(Uri uri)
 {
     try {
         base.Delete(uri);
     } catch (GDataRequestException e) {
         AppsException a = AppsException.ParseAppsException(e);
         throw a ?? e;
     }
 }
Example #6
0
 /// <summary>
 /// Inserts a new nickname entry into the specified feed.
 /// </summary>
 /// <param name="feed">the feed into which this entry should be inserted</param>
 /// <param name="entry">the entry to insert</param>
 /// <returns>the inserted entry</returns>
 public NicknameEntry Insert(NicknameFeed feed, NicknameEntry entry)
 {
     try {
         return(base.Insert(feed, entry) as NicknameEntry);
     } catch (GDataRequestException e) {
         AppsException a = AppsException.ParseAppsException(e);
         throw a ?? e;
     }
 }
Example #7
0
 /// <summary>
 /// Overridden Delete method that throws AppsException
 /// </summary>
 /// <param name="entry">the NicknameEntry to delete</param>
 public void Delete(NicknameEntry entry)
 {
     try {
         base.Delete(entry);
     } catch (GDataRequestException e) {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }
 /// <summary>
 /// Inserts a new nickname entry into the feed at the
 /// specified URI.
 /// </summary>
 /// <param name="feedUri">the URI of the feed into which this entry should be inserted</param>
 /// <param name="entry">the entry to insert</param>
 /// <returns>the inserted entry</returns>
 public NicknameEntry Insert(Uri feedUri, NicknameEntry entry)
 {
     try
     {
         return(base.Insert(feedUri, entry) as NicknameEntry);
     }
     catch (GDataRequestException e)
     {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }
Example #9
0
 /// <summary>
 /// Updates this AppsExtendedEntry.
 /// </summary>
 /// <returns>the updated GroupsEntry</returns>
 public new AppsExtendedEntry Update()
 {
     try
     {
         return(base.Update() as AppsExtendedEntry);
     }
     catch (GDataRequestException e)
     {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }
 /// <summary>
 /// Inserts a new email list entry into the specified feed.
 /// </summary>
 /// <param name="feed">the feed into which this entry should be inserted</param>
 /// <param name="entry">the entry to insert</param>
 /// <returns>the inserted entry</returns>
 public EmailListEntry Insert(EmailListFeed feed, EmailListEntry entry)
 {
     try
     {
         return(base.Insert(feed, entry) as EmailListEntry);
     }
     catch (GDataRequestException e)
     {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }
Example #11
0
 /// <summary>
 /// Overridden Delete method that throws AppsException
 /// </summary>
 /// <param name="entry"></param>
 public void Delete(EmailListRecipientEntry entry)
 {
     try
     {
         base.Delete(entry);
     }
     catch (GDataRequestException e)
     {
         AppsException a = AppsException.ParseAppsException(e);
         throw (a == null ? e : a);
     }
 }