Parse and Uber API Webhooks - parse-platform

I’m building an iOS app that utilizes Uber’s API and Parse. After a user requests a ride in my app and the ride status changes, I’d like to update the in app screen and send a push notification. Uber’s docs say to use web hooks for this. I’m trying to figure out how I would do this if I’m using Parse. As far as I know, a Parse backend doesn’t have the ability to receive POST data from the Uber web hooks. I was thinking of making a small express server that would receive the web hooks POST data, clean it up, and send it to Parse’s API which would in turn send it to the client as a push notification. Is there a better way to do this?

I think you're on the right track. It looks like there are some projects in the Parse OpenSource Hub you could re-use for your purpose.
The alternative is to simply do a GET /v1/requests/current every few seconds within your app.

Related

What is the technolpgy, does Facebook/Youtube Notification Systems use?

I am currently working on an web application, which need to implement a notification system, just like Facebook and Youtube does. (Not mobile PUSH Notification. Just to show how many notifications are in the notification couter and, when soneone expand it, show all notifications. Just as Facebook) What I need to know is, what is the following best method to use.
1.Websocket
2.SSE
3 XMPP
Our application is on budget and, we are running it on a VPS server.

Is it possible to trigger TravisCI build by Slack message w/o spinning up my own server?

When I did research online, most of the solutions are about triggering Slack notification from TravisCI. Now I want to do the reverse direction - type some message in slack, and trigger a build task in TravisCI.
I'm looking at Slack's Outgoing WebHooks - under their "Custom Integrations" in Slack app directory. However, their webhook POST data spec is fixed, not seem to be programmable through just their webpage UI. They have a column in the UI that lets you fill in URL(s) to POST to. But I don't see any ways that I can customize the data field of the POST request.
Same as TravisCI's Triggering Builds API v3, the data fields they expect in the POST are fixed and unchangeable.
I know I can sign up a cloud service, write some code and spin up a server to re-package the parameters to do the work, like a middleware between these 2 APIs. But just want to see if anyone manages to achieve triggering TravisCI by Slack in such way that doesn't involve spinning up a server myself?
I ended up hosting a server and writing the porting logic myself. I guess there's no simple way to do this, after all they are different APIs. Here is the code where I request against travisCI API, and here is the code where I unpack the slack webhook POST request.

Trigger PubSub messages on Google Sheets save actions

I am trying to automate a Google Sheet import as soon as someone has committed their changes to Google Sheet's version control (and not just edited any cell like the onEdit event seems to trigger, I need it committed).
While polling is an option, I'd rather really have Google Sheets send out a message to PubSub. Now PubSub requires the authentication JSON and such and I haven't seen any integration with Google Sheets that integrates this concept, which surprised me.
I searched on the internet for triggers in Google Sheet and some way to automate code to connect to external resources. Apparently, the Google Drive Push Notification API seems to be the way to go. I'd really like to keep everything in my Google Cloud space so I went for a Google Cloud Function with an HTTP(S) endpoint. I already started working out the Function and PubSub channel when I went back to the documentation to read up on how to send a call to the HTTP endpoint.
Bad luck. Seems you need to register the domain to prove you own it and wishing I could, I can not prove that I own cloudfunctions.net. So there went my plan.
It seems very not-Google like to not integrate its Cloud SDK on Google Sheets triggers since they do offer a Sheets API using Cloud Service Accounts.
So my conclusion is I have two options:
1) I am able to send an HTTP callback on a onEdit() function but only if it's my own domain and I seem to require to set up an environment just for that.
2) I would have to poll the last version of the Google Sheets commit compared to the latest version to trigger it myself.
Am I overlooking something very simple or are these my only options?
Cloud functions count as an AppEngine Standard Endpoint as described here and here, and so do not require domain verification. You can use a cloud function using a Cloud Pub/Sub trigger freely- you don't even need to explicitly set up a subscription.
Edit: I didn't understand the OPs question correctly, they want to prove their ownership of a cloud function to the Google Drive Push Notification API, not Cloud Pub/Sub push. This should be possible through HTML tag verification as described here. In whatever framework you are using for your web server, you should be able to set the appropriate HTML meta tag on the response.

Sending web push notifications from Laravel

I have a website running Laravel in the back-end, where users can create reports for other users.
When the report is created I would like to send a push notification to recipient user's desktop.
Do I need to use services like Pusher, OneSignal?
Any useful site with examples would be appreciated.
Your question
You could use Pusher, Redis/Socket.io, Pubnub, etc. Which one to use? well, this is more an opinion-based question.
These services broadcast events, then in your client apps (like your web front-end) you configure the client-side libraries of the service you choose to subscribe (to channels) and listen to those events. The documentation explains it better.
Examples/tutorials
Pusher
This is a tutorial published by the Pusher team.
Redis/Socket.io
This one
is a Laracasts series about this.
Just google.
Update
There is a Laravel-specific alternative, a package created exclusively for Laravel:
Laravel WebSockets
This is the post talking about the package and its inner working.
This is the repo.
Here you have the documentation.
If you like to show Native Desktop notification then i would suggest Web Push notification. In this way once user subscribed to push notification ,they will get real time notification and does not need to be on your website.
https://github.com/laravel-notification-channels/webpush

Create webhook with only ruby?

I'm creating a telegram bot in ruby , right now I'm using long polling , but I wanna change to webhooks, but I'm only found information about creating webhooks in rails , so I don't know if is possible to set a webhook in a ruby only project.
Anyone did this? or have a tutorial? Maybe a lighter application in sinatra or rails api mode?
You could start with a simple socket server: https://ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html
However, creating a Rails app with one route for the web hook will not take you a lot of time. This will also give you a lot of flexibility to do more with your inbound data and app in the future e.g. admin dashboard, security, background processing, etc.

Resources