How to get notification on my server if any event is edited or deleted on user Google calender - calendar

After the successful authentication on Google, user get event information
Which is processed on our server.
But if any events edit or delete user is not able to getting update regarding this, user need again call calender api.
How we can get changing update regarding google calendar events on our server without again call of calendar api.

If I understand you correctly, you want to receive a notification to your server whenever a calendar event changes.
If that's the case, consider using push notifications:
First, set up a URL where notifications will be received.
Second, call Events: watch to set up the notification channel.
Take a look at push notifications for a complete guide on this, and Events: watch for documentation on the method you'll have to call after setting up the webhook.

Related

Firebase Notification Inbox in Web App (Not FCM)

I'm trying to implement notification inbox similar to stack overflow inbox where I can see related notification.
For now, I just want user to be notified whenever new comment is posted in the post (show number of notification when user logs in and whenever user opens that inbox it should go away).
I'm not sure how this can be done using firebase and how I should structure the data.
I'm thinking of having a comment collection inside a Post collection and use the onSnapshot to listen to changes in Post collection but how would i actually implement the notification part (whether comment is read or not)?
I would recommend to have a collection just for notifications like notifications/{userUid}/notifications/{notificationID} like here:
We use that structure for all of our apps that have such a feature. The notification itself is send using FCM but we store the data of it in such a separate collection. It also has the value isRead where we store just a boolean or a timestamp when the notification is read from the user. Each user has his own notifications collection and can only see those and change only the isRead value by the security rules.
With a limit query we show him only the last 25 to 50 messages.
If you don't know how to trigger the sending of the notifications: You will need to use the Firebase Cloud Functions and setup a trigger when a post/comment is created and send an FCM message and a notification in your users notifications collection as shown above.

Does the Commerce API allow you to receive a query (via Webhooks or REST) that lets you know when a payment has been detected?

I'm rebuilding the CoinbaseCommerceButton component from scratch, and in order to improve the end-user experience I want to allow the user to continue on using my app after a payment has been detected. Is there a way to do this?
There are currently two ways to do this.
1. CoinbaseCommerceButton
There is an onPaymentDetected callback as documented here. After the callback is triggered, you can safely remove the button from the DOM and allow the user to continue using your application.
2. Webhook Subscriptions
Detected payments can also be registered for via webhooks with the charge:pending event type. See here for a more detailed explanation of how this can be achieved.

Office 365 'Delete' Subscriptions for Calendar

I have been using 'Subscriptions' mechanism to get real time updates on Office calendar and mail. Now I just tried to listen for calendar events cancellation using the same mechanism but I noticed that I am not receiving 'delete' notifications for calendar events. Does anybody know if its an issue with api?
Cancelled events are not deleted until and unless user removes the event from the calendar. The event is updated to reflect that it's been canceled.
So you should get an update notification and the event being updated will have IsCancelled set to true.

Send updates to a user using Socket.io and nodejs

I'm building an app using MEAN Stack (something like Facebook). So a user can login to my app using different browsers and I want for example, if there user will add a new message to the MongoDB, I want to update his messages in the other sessions. The same of he will remove a massage. At the same time, there maybe logged in different users from different browsers and I want to notify the user with his update in the other sessions.
Does Socket.io supports such an option? And what is the best way to do it?
Thanks.
Yes socket.io do support that. Here is an example made by socket.io themselves: https://github.com/socketio/socket.io/tree/master/examples/chat
You should be looking for socket.on() which are the listeners for an event on the server side and look into socket.emit() which are the senders of the events. the .emit()could be added into an function which are triggered on a button click for example.
Depending on you needs, if you're going to send the message to every user using your app then you could use this above code. But if you only wants to send to a specific list of persons you should look into something called Rooms (http://socket.io/docs/rooms-and-namespaces/#rooms).
This does exactly what it sounds like, it emits the messages to the specific room where users have been added to when they connect to your application.

Creating and modifying calendar subscriptions using the google API

I want the ability to create a calendar using the calendar API and issue one-way syncs to this calendar when changes happen on my end. I do not want the user to be able to make changes, i.e., it should work like a subscription but instead of google pulling changes, I want to push changes. This way users can get the changes in real time as opposed to having to wait for a long time to see updates.
I looked through the APIs and I could find no way to a) create subscription b) force subscribed calendar refresh. I also tried creating a secondary calendar and setting ACLs on it for the current user but this also doesn't work, I get the following error:
"reason": "cannotChangeOwnAcl",
"message": "Cannot change your own access level."
Is there a way to accomplish this with the API?

Resources