14 messages in com.googlegroups.google-calendar-help-dataapiRe: Issue about max-results in query| From | Sent On | Attachments |
|---|---|---|
| Jacky.S | 02 Jul 2007 19:15 | |
| Jacob Basham | 02 Jul 2007 19:58 | |
| Ray Baxter | 03 Jul 2007 00:08 | |
| Ray Baxter | 03 Jul 2007 00:30 | |
| Jacky.S | 03 Jul 2007 00:38 | |
| Jacky.S | 03 Jul 2007 00:46 | |
| Jacob Basham | 03 Jul 2007 06:49 | |
| Jacky.S | 03 Jul 2007 18:52 | |
| Jacky.S | 03 Jul 2007 23:10 | |
| Jacob Basham | 04 Jul 2007 00:07 | |
| Jacky.S | 10 Jul 2007 00:45 | |
| Lane LiaBraaten (Google) | 10 Jul 2007 06:48 | |
| Jacky.S | 16 Jul 2007 23:18 | |
| Lane LiaBraaten (Google) | 24 Jul 2007 13:40 |
| Subject: | Re: Issue about max-results in query![]() |
|---|---|
| From: | Lane LiaBraaten (Google) (api....@gmail.com) |
| Date: | 07/24/2007 01:40:34 PM |
| List: | com.googlegroups.google-calendar-help-dataapi |
Hi Jacky,
You can use the CalendarFeed.getLink method to get the next link. Here's a short sample:
CalendarEventFeed resultFeed = service.getFeed(new URL(DEFAULT_EVENTS_FEED), CalendarEventFeed.class); for (CalendarEventEntry event : resultFeed.getEntries()) { System.out.println(event.getTitle().getPlainText()); }
Link nextLink = resultFeed.getLink("next", "application/atom +xml");
CalendarEventFeed nextFeed = service.getFeed(new URL(nextLink.getHref()), CalendarEventFeed.class); for (CalendarEventEntry event : nextFeed.getEntries()) { System.out.println(event.getTitle().getPlainText()); }
Hope that helps, Lane
On Jul 16, 11:19 pm, "Jacky.S" <Jack...@gmail.com> wrote:
Hi Lane,
I'm very sorry not replying you for a long time. Thanks for your advice about using "next"linkto page the result. It works fine!
And by the way, does current Java client API support this function (so that one can call some API to obtain the same effect)?
Thanks,
Jacky
On 7月10日, 下午9时49分, "Lane LiaBraaten (Google)" <api....@gmail.com> wrote:
Hi Jacky.S,
I think the solution to your paging problem is to use the "next"link in the calendar event feed. When you send a query like:
GEThttp://www.google.com/calendar/feeds/default/private/full?updated-min...
The response feed will contain the followinglinkelement (if there are more than 25 results that match the query):
<linkrel="next" type="application/atom+xml"
href="http://www.google.com/calendar/feeds/default/private/full?updated-min......"/>
You can use this "next"linkto get thenext25 results.
Hope that helps, Lane
On Jul 10, 12:45 am, "Jacky.S" <Jack...@gmail.com> wrote:
Jacob,
Please let me try to explain more. I have to query data by "set Updated Min/Max Datetime" (that is querying by modified date) because I have to know about which schedule was deleted recently for my sync. (When query by "Updated Min/Max Datetime", Google will return data with event Status=cancel, which means the event was deleted so that I can find and delete this event from my Database).
Jacky.S
On 7月4日, 下午3时07分, Jacob Basham <jaco...@gmail.com> wrote:
Im not sure I fully understand your question... What do you mean by querying by modified date, I thought you could only query by start date.
Why don't you page by the start dates as discussed before, and compare the modified date on the client side.
On Jul 4, 2007, at 1:10 AM, "Jacky.S" <Jack...@gmail.com> wrote:
But one more thing, when query events by specified update datestamp to do sync, the start min datetime and start max datetime will no longer work. So how to "page" this result is still need to be figured out.
Thanks,
Jacky.S
On 7??3??, ????9 49??, Jacob Basham <jaco...@gmail.com> wrote:
If I remember correctly, the default max is 1000, so you don't need to worry about setting it. If there is no until date, you will have to "page" by dates. Month to month, or year to year.
Perhaps a good question to ask would be, if you are syncing with google and you are running into issues of a single event having more then 1000 changes... Perhaps you need to sync more often?
And yes, recieving 1000 entries each query will take a while, and will take time to parse which is why the default max is 1000. You have to find a happy medium between query time and procesing time.
On Jul 3, 2007, at 2:38 AM, "Jacky.S" <Jack...@gmail.com> wrote:
Hi Jacob,
If the recurring event contains no until information, how to calculate the amount of MAX result ? And I've already set the MAX value to be 1000, which took time while querying from Google server via network. However, to do the synchronization, I've to have my app done this query times by times, which would be a very time issue.
Thanks,
Jacky.S
On 7??3??, ????10 59??, Jacob Basham <jaco...@gmail.com> wrote:
Use the recurring event data to calculate how many times the event happens between the curent date and the date the event occurs until. If the number is over 1000, add the max query amount to that number.
On Jul 2, 2007, at 9:16 PM, "Jacky.S" <Jack...@gmail.com> wrote:
Hi,
May I have a question?
How to query schedule when schedule's count is more than the MAX of max-result?
To synchronized schedule with Google Calendar, I tried to query some updated recurrent entities by setting "singleevents=true" and I set "max-result" is 1000. But because of "single recurrent event", the count of entities may be easily exceed 1000. So there would always be some updated events that can't be queried.
However, I can temporarily sovle this problem by resetting "max- result" value to a larger one. But I can't guarantee that if the count of schedule that is going to be queried would still be more than the value of max-result or even more than the MAX value of max-result.
Anyone can help me?
Thanks,
Jacky.S- ??? >>???????? -
- ???3/4??? ????? -- ??? >>???????? -
- ???3/4??? ????? -- 隐藏被引用文字 -
- 显示引用的文字 -- 隐藏被引用文字 -
- 显示引用的文字 -




