I want to listen to any updates from StackOverflow in Discord/Gitter, just like GitHub Repository Webhooks sending events to Discord/Slack.
Is it possible to create webhooks in StackOverflow to POST to Discord/Gitter?
Update on 2018-04-19
Found a workaround to active polling SO at a interval, by sending GET to /events this API.
It's better to use pubsub style to be notified by SO, kindly advice for improvements.
Related
I have a PERN(Postgres, Express, React, Node) e-commerce app. I want to notify a user that the payment is successful by redirecting to a payment successful page after a user scans QR code to pay.
However, I'm not sure how do I achieve this.
Currently, after the user completed a payment, I will receive a REST's POST request for payment confirmation from a bank API. . However, I'm also using GraphQL and I think that Graphql's Subscription could be what I'm trying to achieve.
Does anyone know how am I supposed to achieve this?
Are there anyways to send a request from REST to Graphql on my own server?
Or are there any better ways to do this?
Just like what is done in this video:
Do I understand correctly that you are looking for a way to notify your client that the payment was successful?
I assume you know how to handle redirect logic so here are the ways you can notify your web-app from the server.
1. Regular HTTP request
The client sends a regular HTTP-request to your server and you withhold the response until you received the 'payment completed' request from the bank API. If your request times out before the bank API confirms the payment - you simply send the same request again. This pattern is also known as Long Polling
2. Server-Sent Events
Your client can open a channel to your server that allow your server to send Events to your client (one-way). It is fairly easy to implement and a solid way to handle one-way communication. Check out the MDN documentation.
3. Web-Sockets MDN
You are probably familiar with these since they are the de-facto standard nowadays. Similar to Server-Sent Events but they allow two-way communication.
Most libraries that handle client-server communication implement a combination of these technologies in order to provide a fallback solution. I would recommend to stick to one of these libraries as they handle many edge-cases that are otherwise work-intensive to cover.
As you pointed out, if you are already using GraphQL you can simply use its subscriptions api. It uses WebSockets with a fallback to long-polling underneath.
Other popular options include socket.io or graphql-sse.
I have created 2 chatbots using AWS lex and Azure bot framework each. I have integrated them with slack and they respond to the mentions in channels.
Currently, the bot responds as a new message however I want it to respond in the slack thread of the original message posted by the user. I tried to look for articles in various places but could not find anything helpful. Does anyone have any idea on how to achieve this or a reference to a GitHub repo for a sample?
Since you are able to post replies, I am assuming that you are using chat.postMessage API.
https://api.slack.com/methods/chat.postMessage
To send the reply as a thread, all you need to do is that add thread_ts argument in the api call.
(Provide original message's ts (timestamp) value to make this message a reply.)
I'm building a Telegram bot for myself that should send to me notifications when I get any. I'm trying to achieve the same behavior as GitHub's email notifications. The problem is that I'm not sure if it's even possible. I'm working with GitHub API for few days straight trying to solve this issue but I still have no idea how to do it. It's like GitHub API doesn't provide enough information about the notification.
For example, it provides field "reason", which describes why I got this notification but how to understand what this notification is about? Like, if I was assigned to the issue or pull request (right now it seems like notifications are the same whether I got assigned to the issue or got a new message in the assigned issue), or got a new message in a watching issue/pull request or anything else.
Is there a way to modify the webhook receiver's POST payload?
If not: is there documentation or a template on how to write an own receiver?
Was looking for the same thing, and ended-up finding couple of issues on alertmanager repository informing that webhook receiver currently does not support this type of customization.
Seems the general consensus is that when using a webhook receiver one should write its own application to send notifications to the provider of choice.
Prometheus/Alertmanager: Issue 1422
Prometheus/Alertmanager: Issue 1496
I have running on NodeJs/MongoDB and Android/HTML client where people are able to follow posts, I store their ids in an array of followers in the post's document.
I want to implement a notification feature when a new comment comes I want to notify all the followers.
So, I have looked across the web but I couldn't get one tutorial where I understood exactly how things work.
I have seen many recommend the Redis Pub/Sub, but from what I have read Redis is a in-memory database, so I was thinking, I could create a channel in Redis with the post's Id, when the user follows that post I would subscribe him to the channel, then when a new comment comes i just publish to the channel. Is this how it works?? If so, then how about when the user goes off then comes back in later, And how about when there are many posts, won't Redis clear the channel then I wouldn't be able to send the notification to all the followers?
I think I'm understanding it all wrong,I'd appreciate your help. How exactly can I be able to send a notification to all followers?