I have inferred from my searches that the URI for a Google Calendar feed that limits the date range should include timeMin and timeMax and should also include singleEvents and orderBy. This is the URI that I've constructed:
https://www.google.com/calendar/ical/myuserid#gmail.com/public/full?singleEvents=true&orderBy=startTime&timeMin=2014-01-01T00:00:00&timeMax=2018-03-24T23:59:59
Regardless of what query parameters I put after the projection value, I still get back all events dating from 8/2008 through whatever future dates I have in the calendar.
I really am "constructing" this based on very little knowledge. Can anyone set me straight, please?
It also took me quite some trials and errors to realize that offset is actually mandatory, not optional, as documented in
https://developers.google.com/google-apps/calendar/concepts
Try to add "Z" to the end of your URL:
https://www.google.com/calendar/ical/myuserid#gmail.com/public/full?singleEvents=true&orderBy=startTime&timeMin=2014-01-01T00:00:00Z&timeMax=2018-03-24T23:59:59Z
Mastoll, I think you are using calendar v3, is that right? You may try:
https://www.google.com/calendar/ical/myuserid#gmail.com/public/full?singleEvents=true&orderBy=startTime&start-min=2014-01-01T00:00:00&start-max=2018-03-24T23:59:59&
You can try using start-min and start-max instead of timeMin and timeMax. This is the parameter for calendar v2, I don't why, but v2 parameter works for public calendar. You can also add the futureevents=true parameter. For the details information for v2, please refer to the following:
https://developers.google.com/google-apps/calendar/v2/reference?hl=de&csw=1#Parameters
Related
I am working on a specific requirement to filter out any meetings that are going to start in next 15 mins of a given calendar.
I can see that there is timeMax query option which will give events starting before given time but the problem I am facing is that I am also getting older events (which are done in past). Any way to get records only froj now to next 15 mins?
I tried query using syncToken but I guess that doesnt works with timeMax so not able to get just the delta and instead getting all the events.
Calendar Event List API
As suggested under the comments, you could be using timeMin and timeMax. It should be something similar to:
timeMin = 2022-12-27T15:30:00+01:00
timeMax = 2022-12-27T15:45:00+01:00
Notes:
Use the query parameters from above and make sure to respect that it must be RFC3339 timestamp.
This might be the only available option or suggestion when utilizing the event.list to filter them by the 15 minutes mark and check their status. It would be a loop process that could potentially hit a quota.
var request = Calendar.events.list({
'calendarId': calendar_id,
"singleEvents" : true,
"orderBy" : "startTime",
"timeMin": startDate.toISOString(),
"timeMax": maxDate.toISOString()
});
Calendar API limitation
If these suggestions or options are not enough or can be considered workarounds due to the limitations, you could always request a feature by going under Issue Tracker.
References
Events: list
Issue Tracker
Im using the "avoidareas" parameter to remove some points from the initial trip. This method worked a couple of months ago, but now it returns the same route as the initial trip, ignoring the "avoidareas" parameter.
Here is the exemple im working with:
"https://fleet.ls.hereapi.com/2/calculateroute.json?apiKey={YOUR API KEY}&mode=fastest;truck;traffic:enabled;¤cy=EUR&restTimes=EU&traverseGates=true&tollVehicleType=3&trailerType=2&trailersCount=1&length=13.6&width=2.4m&height=3m&limitedWeight=24000kg&legAttributes=li,-mn,sh&linkAttributes=wn,le,sh,-fc&mapMatchRadius=5000&ignoreWaypointVehicleRestriction=5000;0;all&departure=2022-09-08T16:00:00&waypoint0=40.613223,-3.2451044&waypoint1=39.919898,-8.634333&avoidareas41.6419,-5.16831;41.541900000000005,-5.06831"
Am i doing something wrong? Has something been updated?
The 'avoidAreas' feature works, but the request needs to be verified for the following:
the parameter name is in camelCase, so it should be 'avoidAreas', you are missing "=" sign right after avoidareas in your request url,
avoid area rectangle should be specified by latMax,lonMin;latMin,lonMax
A sample request looks like https://fleet.api.here.com/2/calculateroute.json?waypoint0=50.112698,8.675777&waypoint1=48.544180,9.662530&mode=fastest;truck;traffic:enabled&departure=2022-08-09T13:12:35&alternatives=0&weightPerAxle=3.25t&limitedWeight=7.5t&height=3.4m&width=2.5m&length=7.2m&trailersCount=1&avoidAreas=48.988757459020015,8.436328214242295;48.94714399157084,8.493687099461848
Thanks
/MS
I'm working with moment and moment-timezone and I don't get it. Can anyone explain me why this happens?
THIS (which is what I want):
moment('2018-11-28T00:00:00.000-02:00').toISOString()
Prints 2018-11-28T02:00:00.000Z
BUT:
moment('2018-11-28T00:00:00.000').zone('-02:00').toISOString()
moment('2018-11-28T00:00:00.000').utcOffset('-02:00').toISOString()
Both print 2018-11-27T23:00:00.000Z
PD: My zone is GMT+1.
Why are different? it is not supposed to be equals?
How do I set the offset (not in the constructor but with a method after I have de moment object)?
Thanks! BR
As I can see, you want to keep the existing time of day when using utcOffset method. It accepts a second parameter, which is a boolean. As the documentation says:
Passing true will keep the same local time, but at the expense of choosing a different point in Universal Time.
// "2018-11-28T02:00:00.000Z"
moment('2018-11-28T00:00:00.000').utcOffset('-02:00', true).toISOString();
For more information check the documentation
I am calling the Google Analytics API (w/ e-commerce) to get a simple set of data:
Dimensions
ga:medium
ga:transactionId
Metrics
ga:transactionsThis should in theory give me 0 or 1, since the data is broken down by transactionId
What I'm assuming I will get is something like:
['organic','transaction_1000001','1']
['organic','transaction_1020001','1']
['organic','transaction_1000501','1']
['organic','transaction_1001001','1']
...
['email', 'transaction_1001001','1']
...
But instead, I don't get the ga:transactionId dimension. I only get results grouped by ga:medium:
['organic','1238']
['email','151']
...
I don't really care about the metric, it could be anything. What I need want is to get the medium with the transactionId.
So, is there a way to get a result set grouped by ga:medium and ga:transactionId? Why is the ga:transactionId dimension ignored?
I solved this issue. Hopefully this answer helps anyone facing this problem.
I was using the NodeJS api bindings. Turns out, the dimensions (and metrics) properties need to be strings. I was using an array.
The dimensions value needs to be specified like this:
ga:medium,ga:transactionId
So a simple dimensions.join(',') fixed it.
How can you modify the URL for the current page that gets passed to Google Analytics?
(I need to strip the extensions from certain pages because for different cases a page can be requested with or without it and GA sees this as two different pages.)
For example, if the page URL is http://mysite/cake/ilikecake.html, how can I pass to google analytics http://mysite/cake/ilikecake instead?
I can strip the extension fine, I just can't figure out how to pass the URL I want to Google Analytics. I've tried this, but the stats in the Google Analytics console don't show any page views:
pageTracker._trackPageview('cake/ilikecake');
Thanks,
Mike
You could edit the GA profile and add custom filters ...
Create a 'Search and Replace' custom filter, setting the filter field to 'Request URI' and using something like:
Search String: (.*ilikecake\.)html$
Replace String: $1
(was \1)
Two possibilities come to mind:
it can take a while, up to about 24 hours, for visits to be reflected in the Analytics statistics. How long ago did you make your change?
try beginning the pathname with a "/", so
pageTracker._trackPageview('/cake/ilikecake');
and then wait a bit, as per the first item.
Usually you have the ga script code at the end of your file, while special _trackPageviews() calls are often used somewhere else.
Have you made sure you have your call to pageTracker._trackPageview() after you have defined the pagetracker?
Like this:
var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
pageTracker._trackPageview();
otherwise you just get a JavaScript error I suppose.