Unable to Order By StartTime

1,822 views
Skip to first unread message

Keith Ellis

unread,
Dec 12, 2011, 11:03:55 AM12/12/11
to google-ca...@googlegroups.com
I'm querying a calendar using the .Net API and I'm getting the following error when trying to order by StartTime. It's fine if I order by 'Update' or don't order at all.

The requested ordering is not available for the particular query

The code I'm using is;

        Dim service As New CalendarService(auth)
        Dim MyRequest As New EventsResource.ListRequest(service, My.Settings.CalID)
        MyRequest.MaxResults = 100
        MyRequest.OrderBy = EventsResource.OrderBy.StartTime
        Dim results As Events = MyRequest.Fetch

Matt

unread,
Dec 12, 2011, 11:09:10 AM12/12/11
to google-ca...@googlegroups.com
Hi Keith

Sorry I can't help you with your query, but where did you get the information you needed to create your query to the new v3 API?

I can't find anything :-(

I know I'm doing something stupid.

Matt

Keith Ellis

unread,
Dec 12, 2011, 11:15:22 AM12/12/11
to google-ca...@googlegroups.com
Hello Matt,

Really just from here http://code.google.com/apis/calendar/v3/using.html#client plus a lot of trial and error - and I mean a lot!

My C# isn't great so most of the challenge has been converting the samples into VB

Keith

Matt

unread,
Dec 12, 2011, 11:27:53 AM12/12/11
to google-ca...@googlegroups.com
Thanks Keith.  I was hoping that wasn't where you found it :-(

I'm using ruby, no help for that.  I'll have to do the same as you and use something that is sort of similar and transcribe it, deep deep joy.

Our of interest, are you doing all this because of the recent changes to the google calendar security settings?

Some genius in google decided to mess around with it and now I am forced into accessing a once public secondary calendar, that is now private.

Then another genius in google, decided to remove the private element of the calendar so I can't use that approach, which I was using for the private primary calendars in our google apps product.

Thanks again.


Keith Ellis

unread,
Dec 12, 2011, 11:31:19 AM12/12/11
to google-ca...@googlegroups.com
I only recently started using the old API so I thought I may as well start again with the new one. Does seem a bit of a struggle though. Having said that, now I've got my head around the authentication it's starting to make a little more sense.

Matt

unread,
Dec 12, 2011, 11:33:32 AM12/12/11
to google-ca...@googlegroups.com
I take it all back, there is some ruby stuff.  I'm sure they didn't list ruby in some other page.

Here we go!!

Matt

unread,
Dec 12, 2011, 11:36:59 AM12/12/11
to google-ca...@googlegroups.com
no, sorry, it's only for the v3, which can change at any moment, so I'd be mad to put it into production :-)

Not having a good day 

Matt

Keith Ellis

unread,
Dec 12, 2011, 1:05:24 PM12/12/11
to google-ca...@googlegroups.com
Sorted the problem. RTFM.

startTime: Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True)


Brian Solomons

unread,
Nov 24, 2014, 6:47:20 AM11/24/14
to google-ca...@googlegroups.com
Just wanted to say thanks for taking the time to put up your solution.  I couldn't figure out why my sort wasn't working!
Reply all
Reply to author
Forward
0 new messages