Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Pushback.io – Interactive push notifications with curl (pushback.io)
9 points by amozoss on Nov 27, 2019 | hide | past | favorite | 2 comments



I've used this for awhile now as a quick way to control some things on my raspberry pis running in my home from my phone.

Sometimes you just want something quick and a little bash script is perfect. For example, I use getmail to periodically fetch my email from all of my email providers, gmail, hotmail, etc.. Whenever I needed to get email quicker (like if I was sent a security code or something) I had to SSH into the server and manually call getmail to fetch it before the scheduled time. With pushback I have a little simple script that gives me the ability to do it from the pushback app and it is a real time saver.

Here is my script I used in case anyone is interested:

  #!/bin/bash
  while true; do
        result="$(curl https://api.pushback.io/v1/send_sync \
                -u <my_token>: \
                -d 'id=Channel_379' \
                -d 'title=Check Email?' \
                -d 'body=Choose from the actions' \
                -d 'action1=gmail' \
                -d 'action2=hotmail' \
                -d 'action3=personal')"
        if [[ "$result" == "gmail" ]]; then 
                getmail -r gmail
        elif [[ "$result" == "hotmail" ]]; then 
                getmail -r hotmail
        elif [[ "$result" == "personal" ]]; then 
                getmail -r personal
        fi 
        sleep 15
  done
I've used it to also notify me when long running commands finish, as a way to add manual review to an otherwise automated process, etc.


Author here, Pushback has been a side project of mine for a few years. It has been a playground for me to learn web development and continue learning about mobile. The goal of Pushback is to make a simple API that can utilize all the features of push notifications. Right now it just has actionable notifications, but it'd be cool to add some other things such as location and custom notifications. I've recently started to use Pushback to communicate information to my friends, family, and co-workers. I had a cronjob that scraped classifieds for minivans and it would post a message to Pushback. My wife could then see the post and leave a comment if she liked it. We ended up getting a van for a pretty sweet deal. Another thing I use it for is to coordinate what time some of my co-workers are riding the public transit. We can just select which time we're thinking of on the notification. I hope it can be a tool that helps you make prototypes quickly without much hassle.




Applications are open for YC Winter 2023

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: