Thank you for this awesome library!
When I try to use orderBy: starttime
(or startTime) I get the following error:
The requested ordering is not available for the particular query
.
I've been going over https://developers.google.com/google-apps/calendar/v3/reference/events/list and no matter what I try I'm out of luck.
Any help would be appreciated!
response { Error: The requested ordering is not available for the particular query.
at Request._callback (/Users/peter/Sites/preposterous/followup-backend/node_modules/google-auth-library/lib/transporters.js:85:15)
at Request.self.callback (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:194:7)
at Request.<anonymous> (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at IncomingMessage.<anonymous> (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
cause:
{ Error: The requested ordering is not available for the particular query.
at Request._callback (/Users/peter/Sites/preposterous/followup-backend/node_modules/google-auth-library/lib/transporters.js:85:15)
at Request.self.callback (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:194:7)
at Request.<anonymous> (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at IncomingMessage.<anonymous> (/Users/peter/Sites/preposterous/followup-backend/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9) code: 400, errors: [ [Object] ] },
isOperational: true,
code: 400,
errors:
[ { domain: 'global',
reason: 'invalid',
message: 'The requested ordering is not available for the particular query.',
locationType: 'parameter',
location: 'orderBy' } ] }
I'm trying to solve same problem. It looks like ordering is working only with singleEvents: true
. This will expand recurring events… but then it's a mess when listing events. Maybe someone knows any workaround.
Definitively both query params are not compatible. You can not sort non-single events. The only workaround I can see is to define internally (inside your client code) a criteria for ordering such recurring events.
Greetings! They call this out in the doc you linked:
"startTime": Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True)
This library just calls out to those APIs.... so there ain't much we can do here. The answer (for now) is to set singleEvents
is set to true.
Most helpful comment
I'm trying to solve same problem. It looks like ordering is working only with
singleEvents: true
. This will expand recurring events… but then it's a mess when listing events. Maybe someone knows any workaround.