I want to create an ICS-File containing some 'private' events but also some 'public' ones I'm not in charge for the dates.
Use case:
I want to add to a calendar in addition to some own appointments the dates for the waste disposal. For this a public calendar released by the company for waste disposal exists, but e.g. the summaries contain information about village / street which is superfluous for 'My' calendar. Also I want to add alarms as reminder suitable for my life style.
I export the public calendar in an ICS-File, read out of it the relevant data, modify them and write for each entry a related one with an own UID in the ICS-File for my calendar.
This works fine so far. But: Is there also a possibility to set a relation for those events to the official calendar of the company for waste disposal, means: If they change one date, the date get changed in my calendar as well, but my other attributes (Summary, Description, Reminders, …) stay the same?
Related
I am currently listing all events from a Google Calendar using the "singleEvents" parameter set to true, which splits recurring events into individual events – which is good. However, I'm running into an issue when an instance of a recurring event is edited, and the edits are saved with the "Only this event" option in the Calendar UI.
What I need to do is be able to identify which of these recurring event instances have been edited, and which have not. It seems the API response data does not provide any indications of whether this is an instance of the unedited recurring event, or an edited one-off. The response for an unedited instance of a recurring event and an edited instance are more-or-less the same, save the description field, which was edited.
The reason I need to differentiate edited versus unedited recurring event instances is that I am dynamically creating event detail pages from the list of single events. I would like to have one page be for the recurring event itself, and another for a "one-off" of that recurring event. E.g:
allmyevents.com/events/my-recurring-event --> page showing recurring event with recurrence information
allmyevents.com/events/my-recurring-event/16-4-2020 --> page showing specific instance of recurring event, which has been edited
Currently, I'm able to do this by creating an entirely new event at the same date and with the same title as the recurring event instance I want to replace, and writing hacky comparison logic to tell if this is a replacement event, but this is counter-intuitive for event/content management.
Answer:
You can use the Calendar API Events: instances endpoint to return all instances of a recurring event. All the events which have been edited on their own will not be returned.
More Information:
The Events: instances endpoint of the Calendar API will return all instances of a recurring event for a calendarId and eventId specified. Any of these that have been edited are omitted.
It's a bit of a workaround, as these events can't be obtained directly, but by obtaining the list of events as you have already been doing and then removing the events which are returned by Events: instances, you can build a list of all the events which have been edited with the 'Only this event' option.
Psuedo-code:
You can do something like this:
eventsList = Calendar.Events.List(calendarId, singleEvents=true)
eventsInstances = Calendar.Events.Instances(calendarId, recurringEventId)
singleEvents = eventsList
for each instance in eventsInstances :
if eventsList.items contains instance :
singleEvents.remove(instance)
return singleEvents
Where the returned singleEvents variable will be a list of all the events that have been edited manually.
References:
Events: instances | Calendar API | Google Developers
Recurring Events | Calendar API | Google Developers
I've been puzzling through this same issue, and I think I've found a way forward that doesn't involve going through every single instance to check if they've been moved/edited:
Each event returned by the Calendar API has an iCalUID field. For a standalone event, this should match the event's id, with an #google.com suffix. e.g. an event with the id of abcdef has an iCalUID of abcdef#google.com.
When it comes to recurring series, every single instance of that event has the same iCalUID value - and, most importantly, you can use iCalUID as a filter when listing events, which will return the main recurring series event and all modified instances. Unmodified instances are not returned.
Tracking which instances have been deleted is slightly more fiddly. They might be returned in the list with the matching iCalUID, but with a status set to cancelled. Or, they may be specified within the recurrence property (an array of strings) on the main series event as timestamps (within the given time-zone, which should match whichever time-zone the main series event uses):
[
"RRULE:FREQ=WEEKLY,COUNT=5",
"EXDATE;TZID=Australia/Melbourne:20211227T110000,20220103T110000"
]
I haven't figured out why some recurring events use the specific-instances-as-cancelled approach, and others use the EXDATE approach (and I think they can also be combined, so don't presume the presence of one rules out the other). Given both are possible, you'll have to allow for that.
I have a Symfony 4 application on which users can view sports events and register themselves for these events. I use Doctrine as ORM and EasyAdminBundle for an admin panel.
I'm having difficulty with figuring out how to structure my entities and how things should be stored in the database. I have 2 main entities, Event and Registration. I will explain these in detail.
Event
Event stores all details about an event. There are some fixed properties that all events have, like:
id
title
description
startDate
endDate (optional)
isPublic
eventType
As you can see, each event has a type. Most events are simple and do not contain additional properties. However, there is an event type for which I want to store some additional properties. I'll call this type complexEventType from here on out. I'll describe what kind of properties I want to keep for these events:
How many days does the event take (this varies)?
For each day: what activities can be done one this day. This should be editable by an admin in the admin panel. There are activities like running, biking, walking, but it should be possible to add other sports.
Each activity has an optional array of generic options (string). Most of the time, these represent distances.
An example complexEventType could look like this:
Day 1
Walking
5km
8km
12km
Running
10km
12km
16km
Biking
30km
40km
60km
Day 2
Walking
8km
10km
12km
Running
12km
14km
18km
Biking
40km
50km
70km
Day 3
Swimming
Running
12km
14km
18km
Biking
40km
50km
70km
Some questions arise here:
Should I subclass the Event instead of keeping a type property?
If I subclass, should each event type have a separate table?
Instead of subclassing, should I keep the options property and make it nullable so that it doesn't need to be set for events where there are no options?
How to store the options in the database? As a JSON object? Or separate tables for days and activities?
Registration
Users can register for events. Their registration will be saved in a Registration object. A registration contains the following properties:
id
event (reference to the event object)
user (reference to the registered user)
If the isPublic boolean from the event is true, the event is public and non-authenticated users can register for them. In that case, I want to keep some extra information:
firstName
lastName
email
Depending on the eventType property from the event, some extra properties need to be saved. For example, one event type takes places in a foreign country. For this event type, I want to know if the user wants to stay in a hotel (boolean) and whether it's ok if he/she sleeps in a shared room (boolean). For another event type, no details are kept. For the complexEventType, we need to store which activity the user is doing on what days, and the chosen option for each activity (distance).
I'm kind of in the dark about how I should approach this situation. For now, I created an abstract Registration entity, which is subclassed by PublicRegistration and PrivateRegistration. PublicRegistration keeps properties like firstName and lastName, while PrivateRegistration stores a pointer to the User object. Right now, Registration stores all possible options, which are all nullable. This works, but it doesn't look good at all. I'd rather have the options separated. I was thinking to make an RegistrationOptionInterface. Then, for each event type, I could create a class that implements this interface and adds options. However, I don't know how this would then be saved to the database...
Can anybody point me in the right direction? Has anybody encountered a similar situation before, and if so, how did you solve it?
Is there any way to get the calendar events specifically with attendee name.
I have checked the API for this,
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
If I pass event name with q='abc'. I able to get the matched event.
But particularly I want to pass the attendee name to get the event from calendar.
With the above API, I suspect we might get by using privateExtendedProperty or sharedExtendedProperty request parameters (propertyName=Name) but I didn't get. I stuck while passing the values and get the desired results.
The search for google calendar events is free text.
Free text search terms to find events that match these terms in any field, except for extended properties. Optional. (string)
Which means that you add the text you want to search for and it will search for that value in all of the fields its designed to search. You cant specifiy that it should check only items(attendees%252Femail) for example
example Just add the persons email address you want to search for then you will have to process it again on your end to ensure that its actually the attended thats set and not some other field.
I'm writing an app that reads a Google Sheet that I have read access to. This is working just fine. It contains upcoming dates for things. The sheet contains usually no more than 20 - 30 upcoming events. Events that have passed are ignored.
I need to take these upcoming events and add them to a calendar. Adding events is ok. The problem is that if the app runs again say a week later, the events that are already on the sheet are added again, so I need a way of searching for an event in a calendar based on the date of the event. If I find an event at that date and time, then I can ignore it and move to the next one. It seems that searching for an event requires a calendar ID and an event ID. Is there a way to search for an event by giving a date and time, and say a partial summary?
Failing that, any other options? The data in the Google Sheet I have read access to only. My app doesn't store anything locally. The intention is to read the sheet and add events but not add duplicate events.
To get events you either use events.get where you provide the calendarId and eventId to fetch a specific event or Events.list to get all events.
I have been tasked with using Google Analytics to report of use of a desktop app so we can see which parts of the program are being used and how heavily, and potentially also see which companies are using which parts of the program (each company has a unique companyID). Ideally I'd like to be able to look at correlations (e.g., How many users who use report A also use process B?)
I currently have my program set to fire off a call to analytics. I've set it up to use the event tracking, but I'm open to app/screen tracking or something else if something would work better. I'm passing values like
v=1
&t=event // Event hit type
&tid=UA-XXXXX-Y // our ID; real code has valid value here
&cid=12345 // CustomerID
&ec=JobFinancialReport // Event Category
&ea=Run // Event Action
&el=Manager // Event label
&ev=7 // Event value
What I can't figure out is how in Google Analytics to set up reports that would show me something like:
CustomerID Category Label Total Hits Unique Users
12345 JobFinancialReport Manager 27 2
12345 MarketingReport1 Manager 6 4
I'm totally new to analytics so pardon my ignorance if I have some key misconception here. I've searched Googles sites and other questions here, but I may be wording my question incorrectly so I'm not finding something that's there. This is only one example; in some cases we might want to see how broadly each customer is using the program; in other cases we'd want to take the customerID out and just see how much a particular report is being used overall. Appreciate any guidance. Thanks.
The "cid" parameter is the client id, the value that is used to stitch single interactions into sessions and users.
The first problem that comes to mind with your setup is that the client id is not exposed in the user interface (with the single exception of the user explorer report) or the API.
You would need to implement this via a custom dimension (probably user scope, since it probably will never change for a given user) where you pass in the client id (you still need the cid parameter).
Then you could create a custom report (or create a report in Google Data Studio) with the custom value as primary dimension and your selected metric.
If you want to report "Unique Users" you would probably need to create a cid per logged-in user (if all users of the app have the same cid then you will always have but a single user reported). You should then probably create a second custom dimension for the company id, so you can segment your reports by company.
you can use custom reports in google analytics to get your desired output. here is how to create custom reports https://support.google.com/analytics/answer/1151300?hl=en