I am working with Google calendar recurring events. I created a recurring event with ten instances, now by using Zend_Gdata i want to delete any single instance of this recurring event not the complete event.
The following line delete the complete recurring event.
$gdata->delete($feedEntry->getEditLink()->href);
But i want to delete only one instance ...
Can any one help me in this regards.
I am very thankful in advance!!!
waiting for your reply!
I propose you migrate off GData as the API will be shut down in November (http://googleappsupdates.blogspot.ch/2014/06/calendar-gdata-api-google-calendar.html) and take a look at the v3 api (https://developers.google.com/google-apps/calendar/). Once on v3, you can delete an instance of a recurring event by calling a delete(instance.getId()) where you can retrieve the instance id using the instances() call.
Related
In one of my iOS app I am using a cloud function that is continuously observing Firebase Events(like first_open, etc.) and we are able to observe predefined firebase events like (first_open). But when we create our own custom event(like "new_event") then observe not working.
A function that I am using for observing events :
exports.Test_Second_Function = functions.analytics.event('testFunction').onLog((event) => {
});
I am able to call the events from the Firebase audience with the trigger. But can we observe these events through cloud functions?
Because when I am sending this event from mobile devices then we can observe.
Thank you.
The solution which worked for me is that -
Hit a simple event(from mobile) that we want to trigger when new entries come into the audience or when the audience refreshes.
e.g. Analytics.log("sample_event", parameters: [:])
This event we can check in debug view and real-time inside the Firebase Analytics section.
After some time entry of this event will come in event sections of the Firebase(In my case this took around 12 hours).
After that we just need to check "mark as conversion" from the events section(this again takes some time to reflect, In my case, this took around 8 hours).
Now when any user comes into our audience then this event will trigger and we can check the count also for the event(for cross check that event is called or not).
Thank you.
I have a recurring event created in Google Calendar.
How can I accept all the future events ("this and following events") for a guest using Google Calendar API?
I found only examples where responseStatus was set for the entire event (all instances) or for a single instance.
I can't follow the solution from: https://developers.google.com/calendar/recurringevents#modifying_all_following_instances, because only event's creator is allowed to modify recurring rule of the original event - I have access only to guest's account.
Since you cannot update the recurrence rules of the main event, you can do the following instead:
Using the eventId of the recurring event, call Events: instances to list all the instances of the event.
Filter the returned instances according to their start and/or end dates, so that past events are removed from the list.
For each of the remaining events, call Events: patch in order to update the attendee's responseStatus, this status being:
The only event change that is propagated from attendees back to the organizer
I've been trying all day to figure out how to "rehydrate" instances of a recurring event from my app.
Let me explain the flow real quick:
User grants access to my app to edit their calendar
The app sets up a recurring event
The app subscribes to the /watch endpoint for that calendar
So far so good, now when the creator moves that event to another time, I get a notification on the webhook url, which is fine (well, sorta), it looks like this:
'x-goog-channel-id': 'my_specified_channel_id',
'x-goog-channel-expiration': 'Thu, 29 Sep 2016 12:58:10 GMT',
'x-goog-resource-state': 'exists',
'x-goog-message-number': '333384',
'x-goog-resource-id': 'some-resource-id', // This id apparently has nothing to do with any resources I know of
'x-goog-resource-uri': 'https://www.googleapis.com/.../resource-uri'
So I would figure that I could call https://www.googleapis.com/calendar/v3/calendars/primary/events/some-resource-id and get the updated resource, but the resource-id doesn't seem to have anything to do with any events in the calendar, nor is it the id of the calendar itself (I use the 'primary' keyword)
So I thought, I could as a work-around get all the instances of the recurring event using the https://www.googleapis.com/calendar/v3/calendars/primary/events/recurring-event-id/instances endpoint, but now the event that was moved is no longer part of that payload anymore. I'm guessing google removes the event from the parent event because it doesn't happen at the same time of day anymore (I haven't been able to confirm this anywhere)?
So what I'm asking is:
Am I interpreting x-goog-resource-id wrong?
Can someone confirm that once an event is edited from the google calendar app it looses its relation to the recurring parent event?
To answer my own question:
x-goog-resource-id is the identifier of the calendar, as that is the entity you're putting the watcher on
Once an event that is part of a recurring set is edited, it is no longer part of that set
I'm experiencing issues with the Google Calendar API.
When deleting an event instance that instance belongs to a recurring event made from an RDATE I never get consistent answers of if it is deleted (read "cancelled") or not.
From my experience the after event instance is deleted via the API the status becomes "cancelled" as you would expect. But I can only see/confirm this if I do an API GET call.
If I do an Google API List call (getting all the instances) show the status is always "confirmed" and the event instance appears whether or not showDeleted is true or false.
Also if I do an API instances call on the master recurring event... they all show "confirmed"... none display "cancelled"... yet I know I deleted one and GET gets the result.
Does anyone else have this issue? Or have a solution. (and EXDATE is out...as I don't affect other event instance data stored which gets wiped if I change the recurring rule...)
I have a web service with three methods: StartReport(...), IsReportFinished(...) and GetReport(...), each with various parameters. I also have a client application (Silverlight) which will first call StartReport to trigger the generation of the report, then it will poll the server with IsReportFinished to see if it's done and once done, it calls GetReport to get the report. Very simple...
StartReport is simple. It first generates an unique ID, then it will use System.Threading.Tasks.Task.Factory.StartNew() to create a new task that will generate the report and finally return the unique ID while the task continues to run in the background. IsReportFinished will just check the system for the unique ID to see if the report is done. Once done, the unique ID can be used to retrieve the report.
But I need a way to cancel the task, which is implemented by adding a new parameter to IsReportFinished. When called with cancel==true it will again check if the report is done. If the report is finished, there's nothing to cancel. Otherwise, it needs to cancel the task.
How do I cancel this task?
You could use a cancellation token to cancel TPL tasks. And here's another example.